To solve the problem JDK1.6 compatible with CXF

Yesterday afternoon before the written CXF demo turned out to a colleague reference, because we JDK version of the inconsistencies between the machine (my 1.5, he's 1.6) lead

To run the process in the summer the Department of exception occurred, exception information is as follows:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in class path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw exception; nested exception is java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar: file: / D: / apache-tomcat-6.0.20/webapps/were/WEB-INF/lib/jaxb-impl-2.1.12.jar! / com / sun / xml / bind / v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs / guide / standards /)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean (AbstractAutowireCapableBeanFactory.java: 883)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java: 839)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java: 440)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory $ 1.run (AbstractAutowireCapableBeanFactory.java: 409)

at java.security.AccessController.doPrivileged (Native Method)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java: 380)

at org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject (AbstractBeanFactory.java: 264)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java: 222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java: 261)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java: 185)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java: 164)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java: 429)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java: 728)

at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java: 380)

at org.springframework.web.context.ContextLoader.createWebApplicationContext (ContextLoader.java: 255)

at org.springframework.web.context.ContextLoader.initWebApplicationContext (ContextLoader.java: 199)

at org.springframework.web.context.ContextLoaderListener.contextInitialized (ContextLoaderListener.java: 45)

at org.apache.catalina.core.StandardContext.listenerStart (StandardContext.java: 3934)

at org.apache.catalina.core.StandardContext.start (StandardContext.java: 4429)

at org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java: 791)

at org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java: 771)

at org.apache.catalina.core.StandardHost.addChild (StandardHost.java: 526)

at org.apache.catalina.startup.HostConfig.deployDirectory (HostConfig.java: 987)

at org.apache.catalina.startup.HostConfig.deployDirectories (HostConfig.java: 909)

at org.apache.catalina.startup.HostConfig.deployApps (HostConfig.java: 495)

at org.apache.catalina.startup.HostConfig.start (HostConfig.java: 1206)

at org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java: 314)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java: 119)

at org.apache.catalina.core.ContainerBase.start (ContainerBase.java: 1053)

at org.apache.catalina.core.StandardHost.start (StandardHost.java: 722)

at org.apache.catalina.core.ContainerBase.start (ContainerBase.java: 1045)

at org.apache.catalina.core.StandardEngine.start (StandardEngine.java: 443)

at org.apache.catalina.core.StandardService.start (StandardService.java: 516)

at org.apache.catalina.core.StandardServer.start (StandardServer.java: 710)

at org.apache.catalina.startup.Catalina.start (Catalina.java: 583)

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.catalina.startup.Bootstrap.start (Bootstrap.java: 288)

at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java: 413)

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw exception; nested exception is java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar: file: / D: / apache-tomcat-6.0.20/webapps/were/WEB-INF/lib/jaxb-impl-2.1.12.jar! / com / sun / xml / bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0 / docs / guide / standards /)

at org.springframework.beans.BeanUtils.instantiateClass (BeanUtils.java: 115)

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java: 61)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean (AbstractAutowireCapableBeanFactory.java: 877)

... 40 more

Caused by: java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar: file: / D: / apache-tomcat-6.0.20/webapps/were/WEB-INF/lib / jaxb-impl-2.1.12.jar! / com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader . (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)

at com.sun.xml.bind.v2.model.impl.ModelBuilder. <clinit> (ModelBuilder.java: 173)

at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet (JAXBContextImpl.java: 456)

at com.sun.xml.bind.v2.runtime.JAXBContextImpl. <init> (JAXBContextImpl.java: 302)

at com.sun.xml.bind.v2.runtime.JAXBContextImpl $ JAXBContextBuilder.build (JAXBContextImpl.java: 1136)

at com.sun.xml.bind.v2.ContextFactory.createContext (ContextFactory.java: 154)

at com.sun.xml.bind.v2.ContextFactory.createContext (ContextFactory.java: 121)

at com.sun.xml.bind.v2.ContextFactory.createContext (ContextFactory.java: 202)

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

at javax.xml.bind.ContextFinder.find (ContextFinder.java: 286)

at javax.xml.bind.JAXBContext.newInstance (JAXBContext.java: 372)

at javax.xml.bind.JAXBContext.newInstance (JAXBContext.java: 337)

at org.apache.cxf.wsdl.JAXBExtensionHelper.createJAXBContext (JAXBExtensionHelper.java: 196)

at org.apache.cxf.wsdl.JAXBExtensionHelper.getJAXBContext (JAXBExtensionHelper.java: 183)

at org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions (JAXBExtensionHelper.java: 168)

at org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions (JAXBExtensionHelper.java: 88)

at org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions (WSDLManagerImpl.java: 239)

at org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions (WSDLManagerImpl.java: 219)

at org.apache.cxf.wsdl11.WSDLManagerImpl. <init> (WSDLManagerImpl.java: 109)

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 org.springframework.beans.BeanUtils.instantiateClass (BeanUtils.java: 100)

... 42 more

2010-5-14 17:13:37 org.apache.catalina.core.StandardContext start

ÑÏÖØ: Error listenerStart

2010-5-14 17:13:37 org.apache.catalina.core.StandardContext start

From these error messages point of view: nested exception is java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar: file: / D: / apache-tomcat-6.0.20 / webapps/were/WEB-INF/lib/jaxb-impl-2.1.12.jar! / com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API, like saying I used jaxb-api.jar package version does not, but this program on my machine (jdk versions 1.5 below) is completely no problem running, so make sure that this anomaly and jaxb-api.jar package version is independent, but with the JDK's version of the.

Back through the google one, to find a solution, in the JDK installation directory endorsed lib directory under the new directory ($ JAVA_HOME / lib / endorsed)

And jaxws-api.jar, jaxb-api.jar package (see Annex) copy to the directory can be resolved.

分类:Java 时间:2010-05-15 人气:220
分享到:
blog comments powered by Disqus

相关文章

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.605 (s). 12 q(s)