高分求救!!cxf生成客户端代码,测试环境jdk1.6+WebLogic10.3报错

zhaoyuup 2013-12-27 03:20:05
本机开发环境:jdk1.6+apache-tomcat-6.0.37,拿cxf-2.6.8自带的功能:wsdl2java.bat自动生成客户端代码。在本地运行没有任何问题,接口、数据传输没任何问题。但是将代码部署到测试服务器时,就报错。
测试服务器环境:jdk1.6+weblogic10.3,服务器端JDK和本地动行的JDK是同一个版本。
请高手帮我看看究竟是什么原因?我希望最好是能针对报错点,逐条排查,而不是泛泛而谈。
报错代码太长,我分两部分上传。报错代码如下:
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm
pl.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 org.apache.geronimo.osgi.locator.ProviderLocator.getService(ProviderLocator.java:234)
at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:176)
at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:160)
at javax.xml.ws.spi.Provider.provider(Provider.java:43)
at javax.xml.ws.Service.<init>(Service.java:35)
at com.sdmdm.mdmreturn.org.SI0319SDMTXTPT2MDMORGReturnService.<init>(SI0319SDMTXTPT2MDMORGRe
turnService.java:61)

Caused by: 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.su
n.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.su
n.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:217)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:363)
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:235)
... 88 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExc
eptions
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.su
n.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.su
n.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference

at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsE
xception.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:202)
... 92 more
2013-12-27 13:43:53 org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceInOutSyncMessageReceiver inv
okeBusinessLogic
严重: null
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
...全文
234 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
wenjie4892543 2013-12-27
  • 打赏
  • 举报
回复
可能是jar包 加载的时候错误 。。JAXB can't handle interfaces.
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cfx/geronimo-annotation_1.0_spec-1.1.1.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cfx/geronimo-jaxws_2.1_spec-1.0.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cfx/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cfx/geronimo-ws-metadata_2.0_spec-1.1.2.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cfx/jaxb-api.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cfx/jaxb-impl-2.1.13.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cfx/jetty-all-7.3.1.v20110307.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cfx/neethi-2.0.4.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cfx/saaj-api-1.3.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cfx/saaj-impl-1.3.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cfx/stax-api-1.0.1.jar"/>
看你的 全部 jar 包 是否 都加载 进去了

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧