users@jaxb.java.net

NoClassDefFoundError: com/sun/xml/bind/marshaller/NamespacePrefixMapper

From: miguelle <michael.ganz_at_meltec.de>
Date: Mon, 15 Oct 2007 04:44:29 -0700 (PDT)

Hi,
I tried to upgrade my application from java 1.5 to 1.6 and jaxb 1.* to
jaxb-ri-20070917.
The application is a servlet (fedora, tomcat 6.0.14) that reads data from
xml files, performs some operations and stores new xml files.
Reading works well but saving causes an error (tomcat log):
java.lang.NoClassDefFoundError:
com/sun/xml/bind/marshaller/NamespacePrefixMapper.

I'm using the java endorsed mechanism and copied the jaxb-api.jar into
JAVA_HOME/jre/lib/endorsed.
The NamespacePrefixMapper is located in jaxb-impl.jar, but I cannot copy the
file in the endorsed dir, too.


Putting the jaxb-impl.jar into tomcat's lib directory isn't a solution, it
causes:
java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap
classloader, but this RI (from
jar:file:/var/apache-tomcat-6.0.14/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/)

any ideas??

-- 
View this message in context: http://www.nabble.com/NoClassDefFoundError%3A-com-sun-xml-bind-marshaller-NamespacePrefixMapper-tf4626728.html#a13211148
Sent from the java.net - jaxb users mailing list archive at Nabble.com.