的WebLogic的clientgen无法从WebLogic配合工作(WebLogic client

2019-09-18 21:25发布

我使用clientgen Ant任务(是的WebLogic的一部分),以从WSDL中生成JAX-WS客户端。 生成的代码工作得很好,当我使用它在类路径中的命令行和wlfullclient.jar。 不过,这并不从部署到从中生成wlfullclient.jar相同的实例EJB工作。 错误是很长,看起来像挂的类加载器,这是非常讨厌,因为我使用的是相同的Java版本,并且来了嵌入式与WebLogic其他库。 关于什么是错的任何想法?
错误日志是:

<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)
> 

Answer 1:

问题是通过类装入JAXB库overrided。 依赖条件清理后能正常工作。



文章来源: WebLogic clientgen doesn't work from WebLogic