When I try the code block:
JAXBContext jc =
JAXBContext.newInstance(JaxbRootElement.class,jaxbElement.getClass());
I got the following error:
java.lang.NoSuchMethodError:
javax.xml.bind.JAXBContext.newInstance([Ljava/lang/Class;)Ljavax/xml/bind/JAXBContext;
How to tell OC4J server to use my own JAXB-API.jar instead of its own older version?
Ok I found the solution: As OC4J has java 1.5 embedded with it, I needed to find the missing extra jars for the JAXBContext usage.I Put jars in lib directory and add them to my server.xml Here the missing jars:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.