wood burning stoves*
The moose likes Other JSE/JEE APIs and the fly likes Facing problem to run JAXB in JDK- 1.6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Facing problem to run JAXB in JDK- 1.6" Watch "Facing problem to run JAXB in JDK- 1.6" New topic
Author

Facing problem to run JAXB in JDK- 1.6

somenath chatterjee
Greenhorn

Joined: Mar 20, 2008
Posts: 16
Hi,
I am using JAXB 2.1 for marshalling xml. When I run it in JDK 1.5 environment its working successfully. But when I use JDK 1.6 its giving a error �

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/dmsuite/WEB-INF/lib/jaxb-impl.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/)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:860)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/dmsuite/WEB-INF/lib/jaxb-impl.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/)
com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:135)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:389)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:253)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:84)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:66)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)
javax.xml.bind.ContextFinder.find(ContextFinder.java:368)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
com.dmsuite.common.xmlUtility.provision.utils.ProvisionXMLGenerator.executeMarshalling(ProvisionXMLGenerator.java:96)
com.dmsuite.manager.environment.EnvironmentManagerImpl.getExecutionId(EnvironmentManagerImpl.java:1605)
com.dmsuite.manager.environment.EnvironmentManagerImpl$$FastClassByCGLIB$$ea699c62.invoke(<generated>
net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:675)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:616)
com.dmsuite.manager.environment.EnvironmentManagerImpl$$EnhancerByCGLIB$$8253be56.getExecutionId(<generated>
com.dmsuite.web.environment.EnvironmentOverviewController.runJob(EnvironmentOverviewController.java:244)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:434)
org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:372)
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:820)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

Do you have any idea? What do I need to do?
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

See This other post on this same subject.. But to help you with your problem, there is a link in the error message, have you followed the link and read the page?
[ September 13, 2008: Message edited by: Steve Luke ]

Steve
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Facing problem to run JAXB in JDK- 1.6