To solve the problem JDK1.6 compatible with CXF

sponsored links
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.
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of To solve the problem JDK1.6 compatible with CXF

  • java read file

    java read documents in two ways: java.io and java.lang.ClassLoader When using the java.io, when java.lang.ClassLoader use it? (Note: If prior to read xml file java read file clearly aware of these two methods have been like! Can take much less to understa

  • Hibernate primary key strategy-sequence

    Today, the use of hibernate in the company encountered a troublesome problem, the use of hibernate when the primary key generation strategy set sequence, but always reported in the implementation could not get next sequence value of the error, then o ...

  • spring myfaces hibernate richfaces

    1.web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j

  • hibernate using c3p0 connection pooling

    Private http://www.lifevv.com/tenyo/doc/20070605102040991.html c3p0 for open source's JDBC connection pool, with the release hibernate. This article describes how to use the hibernate configuration in c3p0. c3p0 connection pool configuration is v ...

  • Process migration from tomcat to websphere changes

    Process migration from tomcat to websphere changes Because customers use the web application server software used by different what tomcat5, tomcat6, websphere5.1, websphere6.1, weblogic8, and so on, and the software used inconsistent standards, ibm's

  • JAVA EE JSP_JNDI

    dsfdsa http://lindows.javaeye.com/admin/blogs/213348 Tomcat 6 with the connection pool data source configuration http://www.blogjava.net/ec2008/archive/2008/07/19/216063.html project: test Driver path: D: \ workspace \ test \ WebRoot \ WEB-INF \ lib ...

  • The EJB3 Persistence

    EJB3 persistence with Hibernate is very similar to the mechanism: Environment: Server: JBOSS5.0 Database: MySQL5.0 1. Set up a data source First of all, in jboss-5.0.0.GA \ server \ default \ deploy, the establishment of a database used to connect the dat

  • Servlet brief introduction

    Servlet brief introduction: Servlet is a small application server Are used to complete the B / S architecture, the client requests the response to treatment Platform independence, performance, able to run thread Servlet API for Servlet provides the s ...

  • Struts2 + hibernate + spring problem user log in

    dao layer services layer action jsp <tr> <td align="center"> <b> user name: </ b> </ td> <td> <s: textfield name = "czyNumber" cssClass = "textstyle" theme = "simple" size = &q

  • Great collection of java interview topics

    1, object-oriented features of what has 1. Abstract: Abstract is that it has overlooked a subject has nothing to do with the current goal of those aspects in order to more fully with the current objectives of the attention-related aspects. Abstract does n

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries