docx-html-editor:java.lang.ClassNotFoundException:org.plutext.htmleditor.JAXRS2Application

时间:2016-04-02 11:21:18

标签: java docx4j

我正在使用docx-html-editor(docx4j项目的一部分),我在运行应用程序时遇到问题。启动页面加载正常,但是当我选择文档时,它会抛出以下异常:

    SEVERE: Servlet [services] in web application [/docx-html-editor] threw load() exception
    java.lang.ClassNotFoundException: org.plutext.htmleditor.JAXRS2Application
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1856)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1705)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:191)
        at org.glassfish.jersey.internal.util.ReflectionHelper$6.run(ReflectionHelper.java:376)
        at org.glassfish.jersey.internal.util.ReflectionHelper$6.run(ReflectionHelper.java:366)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.glassfish.jersey.servlet.WebComponent.createResourceConfig(WebComponent.java:403)
        at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:275)
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:167)
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:349)
        at javax.servlet.GenericServlet.init(GenericServlet.java:158)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
        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)

我尝试了以下解决方案并且它工作了一段时间。

https://stackoverflow.com/a/31887840/2533611

当我更改docx4j版本并恢复到之前的版本时,重新发生的同样异常并未解决问题。

我怀疑它可能是我的项目属性。非常感谢任何帮助。

1 个答案:

答案 0 :(得分:0)

我重新导入了一个干净的项目副本,现在工作正常。我可能搞砸了项目属性。如果有人遇到相同的错误,请尝试以下答案:

https://stackoverflow.com/a/31887840/2533611