我正在运行soap webservice,如果出现错误,我将收到以下异常。有人可以帮我解决这个问题:
[从文件中加载com.sun.xml.ws.message.jaxb.AttachmentMarshallerImpl:/ C:/Oracle/Middleware/Oracle_Home/oracle_common/modules/com.sun.xml.ws.jaxws-rt_2.2.jar ] 2017年2月18日上午2:06:47 com.sun.xml.ws.transport.http.HttpAdapter $ HttpToolkit句柄 严重:未知的JAXBContext实现:类com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl com.sun.xml.ws.spi.db.DatabindingException:未知的JAXBContext实现:class com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl at com.sun.xml.ws.spi.db.BindingContextFactory.getJAXBFactory(BindingContextFactory.java:207) at com.sun.xml.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:149) 在com.sun.xml.ws.message.jaxb.JAXBMessage.create(JAXBMessage.java:167) 在com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAP11Fault(SOAPFaultBuilder.java:439) 在com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaultBuilder.java:216) at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaultBuilder.java:204) at com.sun.xml.ws.server.WSEndpointImpl $ 2.process(WSEndpointImpl.java:425) at com.sun.xml.ws.transport.http.HttpAdapter $ HttpToolkit.handle(HttpAdapter.java:868) 在com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:422) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.invokeAsync(ServletAdapter.java:225) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:161) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:197) at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:81) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:751) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:844) 在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:280) 在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:254) 在weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136) 在weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346) 在weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243) at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.wrapRun(WebAppServletContext.java:3432) at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.run(WebAppServletContext.java:3402) 在weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) 在weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) 在weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57) 在weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285) 在weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201) 在weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179) 在weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572) 在weblogic.servlet.provider.ContainerSupportProviderImpl $ WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255) 在weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21) 在weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:147) 在weblogic.kernel.ExecuteThread.run(ExecuteThread.java:119)
答案 0 :(得分:1)
我尝试在各种博客上寻找答案,但找不到答案。然后我解开了罐子并在下面找到了帮助解决这个错误。错误是因为JDK和weblogic中具有不同版本的类。
-Djavax.xml.bind.JAXBContext=com.sun.xml.bind.v2.ContextFactory