JAXBContext.newInstance()gets Mapwith properties as a parameter.
What properties and how should I specify in order to make an instance JAXBContextinformed of several files with xml-mappings?
The example shows how to specify only one file in a way that is unacceptable for real systems (i.e. c new File(address)). Instead, I need to use classLoader.getResource()that which returns an object URL.
Thank!
UPD:
When I try to instantiate a JAXBContext, I get this release:
javax.xml.bind.JAXBException: property "eclipselink-oxm-xml" is not supported
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:118)
...
Obviously, the file was jaxb.propertiesnot found at startup. Where should I put this? (I use the maven, and in fact I tried to put it in /target/jaxb.properties, /target/classes/jaxb.properties, /target/classes/META-INF/definitions/jaxb.properties- close to the xml-mapping file, and /target/classes/com/myproject/experiment/jaxb.properties- next to the class that is trying to create an instance of JAXBContext).
source
share