jaxb.properties not found
843834Nov 24 2002 — edited Feb 6 2003My 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