• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Error: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI needs 2.2 API

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to deploy a Java web service into a Tomcat 5.5.20 server. I have the web service packaged in a .war file in Tomcat's webapps directory, and I can see that the .war file gets extracted when I start Tomcat.

However, I get the following error when I start Tomcat:

Apr 22, 2012 5:16:31 AM com.sun.xml.ws.transport.http.servlet.WSServletContextLstener contextInitialized
INFO: WSSERVLET12: JAX-WS context listener initializing
Apr 22, 2012 5:16:31 AM com.sun.xml.ws.transport.http.servlet.WSServletContextLstener parseAdaptersAndCreateDelegate
SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/home/username/WebNMS/apache/tomcat/webapps/WebServices/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/home/username/WebNMS/apache/tomcat/webapps/WebServices/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:178)

In the /home/username/WebNMS/apache/tomcat/webapps/WebServices/WEB-INF/lib directory is where all the jar files from JAX-WS 2.2.6 are, including jaxb-api.jar.

I already added "-Djava.endorsed.dirs=/home/username/WebNMS/apache/tomcat/webapps/WebServices/WEB-INF/lib" to the command that starts the WebNMS process that starts Tomcat, but that didn't help.

Also, I tried adding a symbolic link called "endorsed" in the /home/username/WebNMS/jre/lib directory that points to /home/username/WebNMS/apache/tomcat/webapps/WebServices/WEB-INF/lib, and that didn't help either.

One interesting thing is that when I do a "find /home/username/WebNMS -name jaxb-api.jar", it only finds the one jaxb-api.jar in the /home/username/WebNMS/apache/tomcat/webapps/WebServices/WEB-INF/lib directory. There are no other jaxb-api.jar files. So I don't know why the error is saying that the JAXB 2.1 API is being loaded, when there's only the JAXB 2.2.6 API jar file. Unless it's finding something outside the /home/username/WebNMS dir, but that shouldn't happen considering I tried 2 different ways to set up the endorsed dir.
 
Evacuate the building! Here, take this tiny ad with you:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic