com.sun.xml.ws.spi.db.DatabindingException:未知的JAXBContext实现:class com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl

时间:2016-04-18 20:56:28

标签: web-services

我们有一个使用@WebserviceProvider注释的EJB3.1无状态会话bean。不知何故,当抛出肥皂故障异常时,我们得到以下异常。此服务部署在weblogic 12c上,它使用Jdk 1.7。还有其他人遇到过这个问题吗?你能帮忙吗。提前谢谢。

com.sun.xml.ws.spi.db.DatabindingException: Unknown JAXBContext implementation:
class com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl
at com.sun.xml.ws.spi.db.BindingContextFactory.getJAXBFactory(BindingCon
textFactory.java:204)
at com.sun.xml.ws.spi.db.BindingContextFactory.create(BindingContextFact
ory.java:146)
at com.sun.xml.ws.message.jaxb.JAXBMessage.create(JAXBMessage.java:161)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAP11Fault(SOAPFaultBuil
der.java:423)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaul
tBuilder.java:200)
        at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaul
tBuilder.java:188)
        at com.sun.xml.ws.addressing.WsaServerTube.processException(WsaServerTub
e.java:214)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:887)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:841)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:804)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:706)
        at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:43
0)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdap
ter.java:640)
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:265
)
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAd
apter.java:163)
        at weblogic.wsee.jaxws.WLSServletAdapter.handle(WLSServletAdapter.java:1
71)
        at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServl
etAdapter.java:708)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:363)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
146)
        at weblogic.wsee.util.ServerSecurityHelper.authenticatedInvoke(ServerSec
urityHelper.java:103)
        at weblogic.wsee.jaxws.HttpServletAdapter$3.run(HttpServletAdapter.java:
311)
        at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:3
36)
        at weblogic.wsee.jaxws.JAXWSServlet.doRequest(JAXWSServlet.java:99)
        at weblogic.servlet.http.AbstractAsyncServlet.service(AbstractAsyncServl
et.java:99)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
(StubSecurityHelper.java:242)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
(StubSecurityHelper.java:216)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
tyHelper.java:132)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:338)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:221)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.wrapRun(WebAppServletContext.java:3284)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:3254)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
120)
        at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:
57)
        at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAp
pServletContext.java:2163)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
ervletContext.java:2089)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
ontext.java:2074)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
ava:1513)
        at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExec
utor.run(ContainerSupportProviderImpl.java:254)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

1 个答案:

答案 0 :(得分:0)

我有类似的问题,并设法通过修复wsdl文件中的小错误来修复它。我的情况是wsdl定义了两个请求和响应类型的操作。第二个操作是使用为第一个操作定义的类型,如下例所示:

<wsdl:message name="SecondOperationRequest">
    <wsdl:part name="parameters" element="tns:FirstOperationrequestType"/>
</wsdl:message>

将其修复为:

<wsdl:message name="FirstOperationRequest">
    <wsdl:part name="parameters" element="tns:FirstOperationrequestType"/>
</wsdl:message>

之前只有一个名称可以区分这些操作。