0
我當前正在嘗試將JAR從已部署的WAR移動到只包含在Tomcat庫中。下面是依賴我pom.xml
將JAR從編譯更改爲提供時發生Servlet錯誤
<dependency>
<groupId>psft.pt8</groupId>
<artifactId>psjoa</artifactId>
<version>8.54.22</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
當範圍<scope>compile</scope>
一切工作正常。我構建工件,將其部署在Tomcat中,並可以訪問WSDL。當我將範圍更改爲提供的時候,我仍然可以構建工件,將它部署到Tomcat中,它看起來很好,但是當嘗試去WSDL時遇到此錯誤。
The server encountered an internal error that prevented it from fulfilling this request: Servlet.init() for servlet spring-ws threw exception
javax.servlet.ServletException: Servlet.init() for servlet spring-ws threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
psiprobe.Tomcat80AgentValve.invoke(Tomcat80AgentValve.java:45)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)
不確定從哪裏開始。
你把jar放在tomcat的lib文件夾中嗎 – esprittn
是的,我做了。我有另一個項目,我已經將相同的jar移動到lib文件夾,它工作正常。我已經試過這個當前的那個,它和jar以及它在被設置爲編譯時創建的jar。 – stumpbeard
看看這個SO討論可能會幫助你配置你的tomcat:http://stackoverflow.com/questions/267953/does-tomcat-load-the-same-library-file-into-memory-twice-if-他們,是合兩網 – esprittn