Apache axis2 jar文件不在运行时

时间:2013-01-25 06:55:35

标签: java web-services axis2 axis

运行应用程序时遇到以下错误。错误仅在运行时获得。它已成功编译。

它在日食下运行没有任何问题。但是使用Apache轴,我们在上传到服务器时会跟踪错误跟踪。 Apache axis2 jar文件在运行时没有进行。但是编译成功。

应用程序在Oracle R12服务器下运行。我没有在R12服务器中找到任何为运行时设置类路径的选项。

使用Java版本是1.6和Apache axis2.1.6.2

错误追踪:

Exception :java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis2.description.AxisService
Error : java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis2.description.AxisService
com.rightnow.ws.wsdl.RightNowSyncServiceStub.populateAxisService(RightNowSyncServiceStub.java:41)
com.rightnow.ws.wsdl.RightNowSyncServiceStub.(RightNowSyncServiceStub.java:636)
com.rightnow.ws.wsdl.RightNowSyncServiceStub.(RightNowSyncServiceStub.java:625)
com.rightnow.ws.wsdl.RightNowSyncServiceStub.(RightNowSyncServiceStub.java:673)
com.rightnow.ws.wsdl.RightNowSyncServiceStub.(RightNowSyncServiceStub.java:665)
com.rightnow.ws.util.ContactUtils.initializeService(ContactUtils.java:57)
_somejsp._jspService(_somejsp.java:189)
com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:473)
oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:642)
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
java.lang.Thread.run(Thread.java:619)

2 个答案:

答案 0 :(得分:0)

当Java虚拟机无法在运行时找到编译时可用的特定类时,Java中出现NoClassDefFoundError。我相信在您的服务器中应该丢失或错放了axis.jar。再次检查它。

答案 1 :(得分:0)

您需要将所有与axis2相关的库放在服务器的lib目录中,或者需要将它们与.war文件打包在一起。

要在eclipse中处理此问题,请选择您的项目并转到

属性 - >部署组件 - >添加 - > Java构建路径条目

并添加所有axis2罐子。这将确保所有相关的罐子与您的.war

捆绑在一起

另一个解决方案是将所有axis2 jar硬拷贝到WebContent / WEB-INF / lib