I'm using Tess4j 2.0.0 in oracle-glassfish3.1.1, Exception is:
java.lang.NoSuchFieldError: RESOURCE_PREFIX at net.sourceforge.tess4j.util.LoadLibs.(LoadLibs.java:60) at net.sourceforge.tess4j.TessAPI.(TessAPI.java:40) at net.sourceforge.tess4j.Tesseract.init(Tesseract.java:360) at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:273) at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:256) at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:237) at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:221) at cn.uxcard.util.CaptchaUtil.getCaptcha(CaptchaUtil.java:29) at cn.uxcard.util.HttpConnection.getCaptcha(HttpConnection.java:60) at cn.uxcard.util.HttpConnection.tryCaptcha(HttpConnection.java:78) at cn.uxcard.util.HttpConnection.login(HttpConnection.java:90) at cn.uxcard.util.HttpConnection.tryLogin(HttpConnection.java:121) at cn.uxcard.util.HttpConnection.init(HttpConnection.java:148) at cn.uxcard.util.HttpUtil.getConnection(HttpUtil.java:28) at cn.uxcard.executor.FetchTodayConsumeRecordExecutor.run(FetchTodayConsumeRecordExecutor.java:29) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662)
the glassfish load com.sun.jna.Platform class, don't use WEB-INF/lib/jna-4.1.0.jar but use "bundle://185.0:1/com/sun/jna/Platform.class". Can I change the glassfish classload order and if so how?