java.lang.ClassNotFoundException:javax.xml.rpc.Stub - 在tomcat上部署之后

时间:2014-01-02 11:26:35

标签: java eclipse tomcat oracle-agile-plm

Stacktrace:] with root cause
java.lang.ClassNotFoundException: javax.xml.rpc.Stub
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at com.agile.api.pc.EJBLookup.createFileSession(EJBLookup.java:462)
    at com.agile.api.pc.attachment.IFSInputStream.createFileSession(IFSInputStream.java:132)
    at com.agile.api.pc.attachment.IFSInputStream.<init>(IFSInputStream.java:37)
    at com.agile.api.pc.RowAttachment$GetFileAction.doSdkAction(RowAttachment.java:556)
    at com.agile.api.common.SDKAction.run(SDKAction.java:23)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.security.Security.runAs(Security.java:61)
    at com.agile.api.common.WebLogicAuthenticator.doAs(WebLogicAuthenticator.java:111)
    at com.agile.api.common.Security.doAs(Security.java:54)
    at com.agile.api.common.Security.doAs(Security.java:109)
    at com.agile.api.pc.RowAttachment.getFile(RowAttachment.java:343)
    at gt.ext.agile.test.AdvancedQuery.downloadAttach(AdvancedQuery.java:232)
    at org.apache.jsp.OrderAttach_jsp._jspService(OrderAttach_jsp.java:176)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1805)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

我收到此错误。我怎样才能避免这种异常?我在/WEB-INF/lib文件夹下有所有的jar,但我仍然得到这个例外。

当我从Eclipse运行项目时,它工作正常,但在将其部署到Agile PLM的Tomcat之后,它给了我上述异常。

2 个答案:

答案 0 :(得分:0)

检查是否有任何冲突的jar文件或检查lib目录下的jar文件中是否存在类javax.xml.rpc.Stub

答案 1 :(得分:0)

如果您使用WTP(Web Tools Platform)Eclipse插件,则无需将jar放入/ lib文件夹。您需要将所需的库添加到部署程序集中[项目属性(Alt + Enter) - &gt;部署程序集]在将所需的jar放入列表之后,Eclipse将把所需的jar放入/ lib文件夹中。