我正在尝试在Weblogic 9.2上使用Axis2并收到错误。
我的代码工作正如我在Eclipse中成功测试过的那样。 当我从部署在Weblogic 9.2上的EAR运行时,我得到以下内容。
Wed Nov 11 15:59:27 GMT 2015
weblogic.xml.stax.XMLStreamInputFactory
at com.gmacfs.wholesale.common.edsfoundationwindows.Frame.display(Frame.java:6461)
at com.gmacfs.wholesale.common.edsfoundationwindows.Frame$AsyncRunner.run(Frame.java:491)
at com.gmacfs.wholesale.framework.Task$1.run(Task.java:90)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: weblogic.xml.stax.XMLStreamInputFactory
at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)
at org.apache.axiom.om.util.StAXUtils$8.run(StAXUtils.java:527)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axiom.om.util.StAXUtils.newXMLInputFactory(StAXUtils.java:517)
at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory_perClassLoader(StAXUtils.java:597)
at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(StAXUtils.java:171)
at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(StAXUtils.java:136)
at org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.java:223)
at org.apache.axiom.om.impl.llom.factory.AbstractOMMetaFactory.createXMLStreamReader(AbstractOMMetaFactory.java:60)
at org.apache.axiom.om.impl.llom.factory.AbstractOMMetaFactory.createOMBuilder(AbstractOMMetaFactory.java:105)
at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:154)
at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:134)
at org.apache.axiom.om.OMXMLBuilderFactory.createOMBuilder(OMXMLBuilderFactory.java:105)
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:590)
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:575)
at org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:97)
at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:90)
at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:857)
at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210)
at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:151)
at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:144)
at com.gmacfs.wholesale.interfaces.experian.service.MXINLiteStub.<init>(MXINLiteStub.java:115)
at com.gmacfs.wholesale.interfaces.experian.service.MXINLiteStub.<init>(MXINLiteStub.java:101)
at com.gmacfs.wholesale.interfaces.experian.service.MXINLiteStub.<init>(MXINLiteStub.java:150)
at com.gmacfs.wholesale.interfaces.experian.service.ExperianPolicyManager.appraisalCheckAndValuation(ExperianPolicyManager.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:77)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy127.appraisalCheckAndValuation(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:205)
at com.gmacfs.wholesale.framework.remoting.PluggableRemoteInvocationExecutor.invoke(PluggableRemoteInvocationExecutor.java:49)
at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78)
at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:114)
at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:73)
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:49)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:585)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.gmacfs.wholesale.httpsupport.SessionFilter.doFilterInternal(SessionFilter.java:145)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3251)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
at org.springframework.remoting.support.RemoteInvocationUtils.fillInClientStackTraceIfPossible(RemoteInvocationUtils.java:47)
at org.springframework.remoting.support.RemoteInvocationResult.recreate(RemoteInvocationResult.java:115)
at org.springframework.remoting.support.RemoteInvocationBasedAccessor.recreateRemoteInvocationResult(RemoteInvocationBasedAccessor.java:85)
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:148)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy16.appraisalCheckAndValuation(Unknown Source)
at com.gmacfs.wholesale.wholesale.edsaccvolwindows.AddVolumeWin.lookupRequested(AddVolumeWin.java:1765)
at com.gmacfs.wholesale.wholesale.edsaccvolwindows.AddVolumeWin.access$500(AddVolumeWin.java:232)
at com.gmacfs.wholesale.wholesale.edsaccvolwindows.AddVolumeWin$12.handleEvent(AddVolumeWin.java:2291)
at com.gmacfs.wholesale.framework.EventManager$ThreadData.handleNextEvents(EventManager.java:716)
at com.gmacfs.wholesale.framework.EventManager$ThreadData.waitForEvents(EventManager.java:802)
at com.gmacfs.wholesale.framework.EventManager._waitForEvent(EventManager.java:1741)
at com.gmacfs.wholesale.framework.EventManager.waitForEvent(EventManager.java:2051)
at com.gmacfs.wholesale.framework.EventManager.waitForEvent(EventManager.java:2067)
at com.gmacfs.wholesale.common.edsfoundationwindows.Frame.display(Frame.java:6416)
... 3 more
我们使用ANT来构建EAR,并且以下JAR包含在EAR的lib文件夹中。
axis2-adb-1.6.3.jar
axis2-kernel-1.6.3.jar
axis2-transport-base-1.6.3.jar
axis2-transport-http-1.6.3.jar
axis2-transport-local-1.6.3.jar
axiom-api-1.2.14.jar
axiom-impl-1.2.14.jar
neethi-3.0.2.jar
stax-1.2.0.jar
XmlSchema-1.4.7.jar
weblogic.xml文件包含以下部分。
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
weblogic-application.xml文件包含此部分。
<prefer-application-packages>
<package-name>javax.jws.*</package-name>
<package-name>javax.xml.bind.*</package-name>
<package-name>javax.xml.crypto.*</package-name>
<package-name>javax.xml.registry.*</package-name>
<package-name>javax.xml.rpc.*</package-name>
<package-name>javax.xml.soap.*</package-name>
<package-name>javax.xml.stream.*</package-name>
<package-name>javax.xml.ws.*</package-name>
<package-name>org.apache.*</package-name>
</prefer-application-packages>
MANIFEST文件包含以下部分。
<attribute name="Class-Path" value="lib/xalan-2.7.0.jar;lib/axis2-adb-1.6.3.jar;lib/axis2-kernel-1.6.3.jar;lib/axis2-transport-base-1.6.3.jar;lib/axis2-transport-http-1.6.3.jar;lib/axis2-transport-local-1.6.3.jar;lib/axiom-api-1.2.14.jar;lib/axiom-impl-1.2.14.jar;lib/neethi-3.0.2.jar;lib/stax-1.2.0.jar;lib/XmlSchema-1.4.7.jar" />
任何人都可以对可能发生的事情有所了解吗?
由于
帕特里克