CXF动态客户端连接一直报这个错

java.lang.IllegalStateException: Unable to create JAXBContext for generated packages: “java.util” doesnt contain ObjectFactory.class or jaxb.index
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:398)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:241)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:234)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:189)
at cn.vjsp.it.synchronous.webservice.impl.ThreeSpecialInterfaceImpl.sendThreeSpecial(ThreeSpecialInterfaceImpl.java:130)
at cn.vjsp.it.synchronous.webservice.impl.ThreeSpecialInterfaceImpl.send(ThreeSpecialInterfaceImpl.java:76)
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.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:181)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:97)
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:232)
at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:69)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor 1. r u n ( S e r v i c e I n v o k e r I n t e r c e p t o r . j a v a : 59 ) a t j a v a . u t i l . c o n c u r r e n t . E x e c u t o r s 1.run(ServiceInvokerInterceptor.java:59) at java.util.concurrent.Executors 1.run(ServiceInvokerInterceptor.java:59)atjava.util.concurrent.ExecutorsRunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor 2. r u n ( S e r v i c e I n v o k e r I n t e r c e p t o r . j a v a : 126 ) a t o r g . a p a c h e . c x f . w o r k q u e u e . S y n c h r o n o u s E x e c u t o r . e x e c u t e ( S y n c h r o n o u s E x e c u t o r . j a v a : 37 ) a t o r g . a p a c h e . c x f . i n t e r c e p t o r . S e r v i c e I n v o k e r I n t e r c e p t o r . h a n d l e M e s s a g e ( S e r v i c e I n v o k e r I n t e r c e p t o r . j a v a : 131 ) a t o r g . a p a c h e . c x f . p h a s e . P h a s e I n t e r c e p t o r C h a i n . d o I n t e r c e p t ( P h a s e I n t e r c e p t o r C h a i n . j a v a : 307 ) a t o r g . a p a c h e . c x f . t r a n s p o r t . C h a i n I n i t i a t i o n O b s e r v e r . o n M e s s a g e ( C h a i n I n i t i a t i o n O b s e r v e r . j a v a : 121 ) a t o r g . a p a c h e . c x f . t r a n s p o r t . h t t p . A b s t r a c t H T T P D e s t i n a t i o n . i n v o k e ( A b s t r a c t H T T P D e s t i n a t i o n . j a v a : 274 ) a t o r g . a p a c h e . c x f . t r a n s p o r t . s e r v l e t . S e r v l e t C o n t r o l l e r . i n v o k e D e s t i n a t i o n ( S e r v l e t C o n t r o l l e r . j a v a : 234 ) a t o r g . a p a c h e . c x f . t r a n s p o r t . s e r v l e t . S e r v l e t C o n t r o l l e r . i n v o k e ( S e r v l e t C o n t r o l l e r . j a v a : 208 ) a t o r g . a p a c h e . c x f . t r a n s p o r t . s e r v l e t . S e r v l e t C o n t r o l l e r . i n v o k e ( S e r v l e t C o n t r o l l e r . j a v a : 160 ) a t o r g . a p a c h e . c x f . t r a n s p o r t . s e r v l e t . C X F N o n S p r i n g S e r v l e t . i n v o k e ( C X F N o n S p r i n g S e r v l e t . j a v a : 180 ) a t o r g . a p a c h e . c x f . t r a n s p o r t . s e r v l e t . A b s t r a c t H T T P S e r v l e t . h a n d l e R e q u e s t ( A b s t r a c t H T T P S e r v l e t . j a v a : 298 ) a t o r g . a p a c h e . c x f . t r a n s p o r t . s e r v l e t . A b s t r a c t H T T P S e r v l e t . d o P o s t ( A b s t r a c t H T T P S e r v l e t . j a v a : 217 ) a t j a v a x . s e r v l e t . h t t p . H t t p S e r v l e t . s e r v i c e ( H t t p S e r v l e t . j a v a : 650 ) a t o r g . a p a c h e . c x f . t r a n s p o r t . s e r v l e t . A b s t r a c t H T T P S e r v l e t . s e r v i c e ( A b s t r a c t H T T P S e r v l e t . j a v a : 273 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . i n t e r n a l D o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 303 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . d o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 208 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . S t a n d a r d W r a p p e r V a l v e . i n v o k e ( S t a n d a r d W r a p p e r V a l v e . j a v a : 218 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . S t a n d a r d C o n t e x t V a l v e . i n v o k e ( S t a n d a r d C o n t e x t V a l v e . j a v a : 122 ) a t o r g . a p a c h e . c a t a l i n a . a u t h e n t i c a t o r . A u t h e n t i c a t o r B a s e . i n v o k e ( A u t h e n t i c a t o r B a s e . j a v a : 505 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . S t a n d a r d H o s t V a l v e . i n v o k e ( S t a n d a r d H o s t V a l v e . j a v a : 169 ) a t o r g . a p a c h e . c a t a l i n a . v a l v e s . E r r o r R e p o r t V a l v e . i n v o k e ( E r r o r R e p o r t V a l v e . j a v a : 103 ) a t o r g . a p a c h e . c a t a l i n a . v a l v e s . A c c e s s L o g V a l v e . i n v o k e ( A c c e s s L o g V a l v e . j a v a : 956 ) a t o r g . a p a c h e . c a t a l i n a . c o r e . S t a n d a r d E n g i n e V a l v e . i n v o k e ( S t a n d a r d E n g i n e V a l v e . j a v a : 116 ) a t o r g . a p a c h e . c a t a l i n a . c o n n e c t o r . C o y o t e A d a p t e r . s e r v i c e ( C o y o t e A d a p t e r . j a v a : 442 ) a t o r g . a p a c h e . c o y o t e . h t t p 11. A b s t r a c t H t t p 11 P r o c e s s o r . p r o c e s s ( A b s t r a c t H t t p 11 P r o c e s s o r . j a v a : 1082 ) a t o r g . a p a c h e . c o y o t e . A b s t r a c t P r o t o c o l 2.run(ServiceInvokerInterceptor.java:126) at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:274) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:217) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082) at org.apache.coyote.AbstractProtocol 2.run(ServiceInvokerInterceptor.java:126)atorg.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)atorg.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)atorg.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)atorg.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)atorg.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:274)atorg.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)atorg.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)atorg.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)atorg.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)atorg.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298)atorg.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:217)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:650)atorg.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)atorg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)atorg.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082)atorg.apache.coyote.AbstractProtocolAbstractConnectionHandler.process(AbstractProtocol.java:623)
at org.apache.tomcat.util.net.JIoEndpoint S o c k e t P r o c e s s o r . r u n ( J I o E n d p o i n t . j a v a : 316 ) a t j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor SocketProcessor.run(JIoEndpoint.java:316)atjava.util.concurrent.ThreadPoolExecutorWorker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor W o r k e r . r u n ( T h r e a d P o o l E x e c u t o r . j a v a : 918 ) a t o r g . a p a c h e . t o m c a t . u t i l . t h r e a d s . T a s k T h r e a d Worker.run(ThreadPoolExecutor.java:918) at org.apache.tomcat.util.threads.TaskThread Worker.run(ThreadPoolExecutor.java:918)atorg.apache.tomcat.util.threads.TaskThreadWrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.xml.bind.JAXBException: “java.util” doesnt contain ObjectFactory.class or jaxb.index
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:197)
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:128)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:277)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:394)
… 49 more

你可能感兴趣的:(CXF动态客户端连接一直报这个错)