2

clientgen antタスク(WebLogicの一部)を使用して、WSDLからJAX-WSクライアントを生成しています。生成されたコードは、コマンドラインとクラスパスのwlfullclient.jarから使用すると非常にうまく機能します。ただし、wlfullclient.jarが生成されたのと同じインスタンスにデプロイされたEJBからは機能しません。エラーは非常に長く、クラスローダーにリンクされているように見えます。これは、WebLogicに組み込まれているのと同じJAVAバージョンと他のライブラリを使用しているため非常に厄介です。何が悪いのかについて何か考えはありますか?
エラーログは次のとおりです。

<1341096792539> <BEA-010065> <MessageDrivenBean threw an Exception in onMessage(). The exception was:
java.lang.ExceptionInInitializerError.
java.lang.ExceptionInInitializerError
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                at java.lang.Class.newInstance0(Class.java:355)
                at java.lang.Class.newInstance(Class.java:308)
                at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36)
                at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95)
                at javax.xml.ws.spi.Provider.provider(Provider.java:83)
                at javax.xml.ws.Service.<init>(Service.java:56)
                at s.mra.ws.client.proxy.MRADataExchangeService.<init>(MRADataExchangeService.java:115)
                at s.mra.ws.client.impl.WSMraClient.initialize(WSMraClient.java:222)
                at s.mra.ws.client.impl.WSMraClient.sendMessageToWS(WSMraClient.java:93)
                at s.mra.message.router.WSMessageRouterBean.onMessage(WSMessageRouterBean.java:171)
                at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
                at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
                at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
                at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547)
                at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233)
                at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709)
                at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114)
                at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058)
                at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
                at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
                at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
javax.xml.ws.WebServiceException: Error creating JAXBContext for W3CEndpointReference.
                at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:226)
                at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:221)
                at java.security.AccessController.doPrivileged(Native Method)
                at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:221)
                at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                at java.lang.Class.newInstance0(Class.java:355)
                at java.lang.Class.newInstance(Class.java:308)
                at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36)
                at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95)
                at javax.xml.ws.spi.Provider.provider(Provider.java:83)
                at javax.xml.ws.Service.<init>(Service.java:56)
                at s.mra.ws.client.proxy.MRADataExchangeService.<init>(MRADataExchangeService.java:115)
                at s.mra.ws.client.impl.WSMraClient.initialize(WSMraClient.java:222)
                at s.mra.ws.client.impl.WSMraClient.sendMessageToWS(WSMraClient.java:93)
                at s.mra.message.router.WSMessageRouterBean.onMessage(WSMessageRouterBean.java:171)
                at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
                at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
                at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
                at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547)
                at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233)
                at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709)
                at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114)
                at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058)
                at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
                at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
                at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
javax.xml.bind.JAXBException
- with linked exception:
[com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
org.w3c.dom.Element is an interface, and JAXB can't handle interfaces.
                this problem is related to the following location:
                                at org.w3c.dom.Element
                                at public java.util.List com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements.elements
                                at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
                                at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
                                at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
org.w3c.dom.Element does not have a no-arg default constructor.
                this problem is related to the following location:
                                at org.w3c.dom.Element
                                at public java.util.List com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements.elements
                                at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
                                at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
                                at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
]
                at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:226)
                at javax.xml.bind.ContextFinder.find(ContextFinder.java:372)
                at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
                at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
                at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:224)
                at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:221)
                at java.security.AccessController.doPrivileged(Native Method)
                at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:221)
                at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                at java.lang.Class.newInstance0(Class.java:355)
                at java.lang.Class.newInstance(Class.java:308)
                at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36)
                at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95)
                at javax.xml.ws.spi.Provider.provider(Provider.java:83)
                at javax.xml.ws.Service.<init>(Service.java:56)
                at s.mra.ws.client.proxy.MRADataExchangeService.<init>(MRADataExchangeService.java:115)
                at s.mra.ws.client.impl.WSMraClient.initialize(WSMraClient.java:222)
                at s.mra.ws.client.impl.WSMraClient.sendMessageToWS(WSMraClient.java:93)
                at s.mra.message.router.WSMessageRouterBean.onMessage(WSMessageRouterBean.java:171)
                at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
                at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
                at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
                at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547)
                at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233)
                at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709)
                at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114)
                at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058)
                at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
                at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
                at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
org.w3c.dom.Element is an interface, and JAXB can't handle interfaces.
                this problem is related to the following location:
                                at org.w3c.dom.Element
                                at public java.util.List com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements.elements
                                at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
                                at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
                                at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
org.w3c.dom.Element does not have a no-arg default constructor.
                this problem is related to the following location:
                                at org.w3c.dom.Element
                                at public java.util.List com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements.elements
                                at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
                                at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
                                at com.sun.xml.ws.developer.MemberSubmissionEndpointReference

                at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
                at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438)
                at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
                at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
                at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
                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:597)
                at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:211)
                at javax.xml.bind.ContextFinder.find(ContextFinder.java:372)
                at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
                at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
                at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:224)
                at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:221)
                at java.security.AccessController.doPrivileged(Native Method)
                at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:221)
                at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                at java.lang.Class.newInstance0(Class.java:355)
                at java.lang.Class.newInstance(Class.java:308)
                at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36)
                at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95)
                at javax.xml.ws.spi.Provider.provider(Provider.java:83)
                at javax.xml.ws.Service.<init>(Service.java:56)
                at s.mra.ws.client.proxy.MRADataExchangeService.<init>(MRADataExchangeService.java:115)
                at s.mra.ws.client.impl.WSMraClient.initialize(WSMraClient.java:222)
                at s.mra.ws.client.impl.WSMraClient.sendMessageToWS(WSMraClient.java:93)
                at s.mra.message.router.WSMessageRouterBean.onMessage(WSMessageRouterBean.java:171)
                at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
                at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
                at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
                at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547)
                at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233)
                at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709)
                at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114)
                at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058)
                at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
                at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
                at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
> 



<1341096792650> <BEA-010065> <MessageDrivenBean threw an Exception in onMessage(). The exception was:
java.lang.NoClassDefFoundError: Could not initialize class weblogic.wsee.jaxws.spi.WLSProvider.
java.lang.NoClassDefFoundError: Could not initialize class weblogic.wsee.jaxws.spi.WLSProvider
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                at java.lang.Class.newInstance0(Class.java:355)
                at java.lang.Class.newInstance(Class.java:308)
                at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36)
                at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95)
                at javax.xml.ws.spi.Provider.provider(Provider.java:83)
                at javax.xml.ws.Service.<init>(Service.java:56)
                at s.mra.ws.client.proxy.MRADataExchangeService.<init>(MRADataExchangeService.java:115)
                at s.mra.ws.client.impl.WSMraClient.initialize(WSMraClient.java:222)
                at s.mra.ws.client.impl.WSMraClient.sendMessageToWS(WSMraClient.java:93)
                at s.mra.message.router.WSMessageRouterBean.onMessage(WSMessageRouterBean.java:171)
                at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
                at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
                at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
                at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547)
                at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233)
                at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709)
                at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114)
                at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058)
                at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
                at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
                at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
> 
4

1 に答える 1

1

この問題は、JAXB ライブラリのクラスローディングによってオーバーライドされました。依存関係をクリーンアップすると、正常に動作します。

于 2012-07-05T19:35:40.823 に答える