部署WAR文件

时间:2016-05-19 04:20:19

标签: java tomcat servlets tesseract

我有一个基于servlet的应用程序,当我从Eclipse中运行它时,它可以工作。我创建了一个WAR文件并将其部署到Tomcat。部署后,我在webapps /目录中找到了我的WAR项目的解压缩文件。

但是当我尝试通过url打开servlet时,我收到以下错误:

exception

javax.servlet.ServletException: Servlet execution threw an exception
root cause

java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.tesseract$TessBaseAPI
com.gorcer.iseeyou.FounderMgr.prepareEnv(FounderMgr.java:80)
com.gorcer.iseeyou.Api.doGet(Api.java:54)
javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.56 (Debian) logs.

完整筹码:

май 19, 2016 5:52:03 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [ApiServlet] in context with path [] threw exception [Servlet execution threw an exception] with root cause
java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.tesseract$TessBaseAPI
    at com.gorcer.iseeyou.FounderMgr.prepareEnv(FounderMgr.java:80)
    at com.gorcer.iseeyou.Api.doGet(Api.java:54)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

我查看了WEB-INF / lib并找到了" tesseract-3.04-1.1.jar"。它包含名为" tesseract $ TessBaseAPI.class"的缺失类。

为什么不包含它?

0 个答案:

没有答案