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!

jaxb.properties not found

843834Nov 24 2002 — edited Feb 6 2003
My application contains classes generated by Jaxb-1.0-beta apart from other classes. I am using jaxb generated code to marshal/unmarshall xml data files. Everything works fine as long as i am working in development envt with package structure present as folders in my classpath.

But things go for a toss when i package this application into a .jar file and use the jar file instead of expanded folders. The JAXBContext.getInstance() complains that it is not able to find the 'jaxb.properties' file. please see the trace below,

----------------------
javax.xml.bind.JAXBException: Unable to locate jaxb.properties for package com.hps.haf.jaxb.errorhandler
at javax.xml.bind.ContextFinder.searchcontextPath(ContextFinder.java:176)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:126)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:274)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:231)
at com.hps.haf.errorhandler.ErrorHandlerImpl.<init>(ErrorHandlerImpl.java:98)
at com.hps.haf.errorhandler.ErrorHandlerImpl.getInstance(ErrorHandlerImpl.java:174)
at com.hps.haf.errorhandler.test.Test.main(Test.java:34)
--------------------------------

I even tried putting a file named "javax.xml.bind.context.factory" in meta-inf/services directory. But this does not seem to help.

Can anyone help please? Thanks in advance.
cheers
Amit




Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 6 2003
Added on Nov 24 2002
2 comments
1,589 views