|Re: Location of jaxb.index for JAXB [message #917012 is a reply to message #912442]
||Wed, 19 September 2012 18:30
| John Raspet
Registered: September 2012
Blaise Doughan wrote on Thu, 13 September 2012 11:40|
If the standard JAXB approach doesn't meet your requirements you could introduce your own config file, and then perform your own processing to convert the contents of that file to a Class. Then you could bootstrap a JAXBContext from that Class.
I'm attempting to pursue the solution quoted above as it seems like a good alternative. One hurdle I'm facing is using
I used to have this in my jaxb.properties file, but since I am no longer using a context path, I attempted to specify this property by using:
HashMap<String, Object> properties = new HashMap<String, Object>();
// ... load classes ...
JAXBContext jaxbContext = JAXBContext.newInstance(classes, properties);
and the result is:
javax.xml.bind.JAXBException: property "javax.xml.bind.context.factory" is not supported
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Any insight on how to continue using org.eclipse.persistence.jaxb.JAXBContextFactory when loading the classes from a file?
Scratch that, found another of your answers on SO that might work. I can't seem to link it since I have fewer than 25 messages, but for anyone else that might stumble on this issue, a quick google search for 6963996/can-i-replace-jaxb-properties-with-code should find the thread.
[Updated on: Thu, 20 September 2012 16:34]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.03772 seconds