Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use my Xerces version of choice?

843834Mar 9 2009 — edited Mar 10 2009
Hello,

I am trying to unmarshall some xml DOM documents. My core irritation on this is the exception, that there would not be an implementation of org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl. My XML files do contain some date information.
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean: java.lang.NoClassDefFoundError: Could not initialize class org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl
        at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3731)
I already had Xerces2-J 2.9.1 in my build-path and wondered how the exception could be real. Xerces2-J 2.9.1 contains an implementation for it. Now I wonder, if the JDK may contain an older version of xerces and: if yes, if this older version is used, although I have included a newer version in my project' libs.

To get completely confused I made a new tutorial guided project with just some lines to unmarshall a really basic XML file and DID NOT include any libraries (no xalan, no xerces). The code was to read a XML file to DOM and then unmarshal it. And it worked. How can this be?

-> How can I set my Xerces and Xalan version of choice for my own project?


I am using this software:
- NetBeans 6.5 bundled with GlassFish 2
- Java SDK 6 update 12

I want to use this software:
- Xerces2-J 2.9.1

Edited by: Bassspieler on Mar 9, 2009 8:04 AM

Edited by: Bassspieler on Mar 9, 2009 8:04 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 7 2009
Added on Mar 9 2009
3 comments
2,775 views