2013-08-17 319 views
0

我正在使用Web服務(爲組件定製服務)來發送和接收信息。請求正在形成,我也得到了迴應。然而,應對實際DTO的映射過程中,我收到以下錯誤:無法初始化類org.apache.xerces.jaxp.datatype.xmlgregoriancalendar

could not initialize class org.apache.xerces.jaxp.datatype.xmlgregoriancalendar 

中有一些與響應calednar日期的形式,但我不知道,爲什麼它不能初始化xmlgregoriancalendar類。我用我的本地存根運行它,它根本不會給我帶來任何問題。

任何adivse將是有益的...在此先感謝

完整的堆棧跟蹤如下:

FindOrderController :: Exception encountered :: OrderRef :: 1185130652 :: UserId :: null : com.bt.collaboration.order.web.controller.FindOrderController-(340) 
javax.xml.ws.WebServiceException: org.apache.cxf.interceptor.Fault: Unmarshalling Error: Could not initialize class org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl 
     at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:144) 
     at $Proxy489.querySimplifiedOrder(Unknown Source) 
     at com.bt.collaboration.customer.client.mcso.McsoSyncPortClientImpl.findHeavyOrderByOrderRef(McsoSyncPortClientImpl.java:146) 
     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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) 
     at com.bt.custc.logging.performance.OutboundLoggingInterceptor.invoke(OutboundLoggingInterceptor.java:109) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 
     at $Proxy490.findHeavyOrderByOrderRef(Unknown Source) 
     at com.bt.collaboration.customer.service.OrderServiceImpl.findHeavyOrderByOrderRef(OrderServiceImpl.java:65) 
     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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) 
     at com.bt.custc.logging.performance.OutboundLoggingInterceptor.invoke(OutboundLoggingInterceptor.java:109) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
     at com.bt.netc.frameworks.throttle.ThrottleInterceptorImpl.invoke(ThrottleInterceptorImpl.java:92) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
     at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 
     at $Proxy498.findHeavyOrderByOrderRef(Unknown Source) 
     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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) 
     at com.bt.custc.logging.performance.OutboundLoggingInterceptor.invoke(OutboundLoggingInterceptor.java:109) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 
     at $Proxy498.findHeavyOrderByOrderRef(Unknown Source) 
     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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) 
     at com.bt.custc.logging.performance.OutboundLoggingInterceptor.invoke(OutboundLoggingInterceptor.java:109) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 
     at $Proxy499.findHeavyOrderByOrderRef(Unknown Source) 
     at com.bt.collaboration.order.web.controller.FindOrderController.handleRequestInternal(FindOrderController.java:255) 
     at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) 
     at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) 
     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) 
     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807) 
     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) 
     at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) 
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) 
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) 
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) 
     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) 
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) 
     at com.bt.netc.frameworks.filters.FilterProxyImpl.doFilter(FilterProxyImpl.java:83) 
     at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236) 
     at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) 
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) 
     at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129) 
     at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77) 
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) 
     at com.bt.collaboration.order.web.filter.PropertySetupFilter.doFilter(PropertySetupFilter.java:36) 
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) 
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730) 
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696) 
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) 
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) 
     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273) 
     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179) 
     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490) 
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) 
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:221) 
Caused by: org.apache.cxf.interceptor.Fault: Unmarshalling Error: Could not initialize class org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl 
     at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:771) 
     at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:623) 
     at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128) 
     at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:190) 
     at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) 
     at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:671) 
     at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2177) 
     at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2057) 
     at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1982) 
     at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47) 
     at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188) 
     at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) 
     at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637) 
     at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) 
     at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) 
     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483) 
     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309) 
     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261) 
     at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) 
     at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) 
     ... 83 more 
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl 
     at org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl.newXMLGregorianCalendar(Unknown Source) 
     at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$12.parse(RuntimeBuiltinLeafInfoImpl.java:583) 
     at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$12.parse(RuntimeBuiltinLeafInfoImpl.java:662) 
     at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:247) 
     at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:65) 
     at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:515) 
     at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.processText(StAXStreamConnector.java:339) 
     at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:217) 
     at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:186) 
     at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:368) 
     at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:347) 
     at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:749) 
     ... 102 more 
+0

它是什麼類型的網絡服務?它是JAX-RPC/WS嗎?你能否請添加完整的堆棧跟蹤? – UVM

+0

@UVM用stackTrace更新了評論 – IndianNoob

回答

1

我也得到了這個錯誤:NoClassDefFoundError: Could not initialize class org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl

這是我如何修復它。在weblogic.xml中添加以下行:

{prefer-web-inf-classes}true{/prefer-web-inf-classes} 

默認情況下它是false。

此修復程序告訴我存在jar版本衝突。但我不知道在哪個文件夾中導致衝突的具體罐子。

相關問題