javaee / metro

Metro has been contributed to Eclipse Foundation. Please use the link below to find the latest project
https://github.com/eclipse-ee4j/metro-jax-ws
Other
10 stars 1 forks source link

jaxbcontext.class. please make sure that you are specifying the proper classloader #29

Open glassfishrobot opened 10 years ago

glassfishrobot commented 10 years ago

Hi,

We are using Metro web service 2.2.1 in our code, we are getting the following ClassCastException. From the error it looks like it is using the JAXBContext.class from webservices-api.jar whereas during runtime it is expecting JAXB class from jdk1.7.0_17.

As per Metro guidelines we have to package the webservices-api.jar in our application ear to make it Metro compliant.

Please let me know if there is a solution to this issue as we cannot make our webservices Metro compliant until this issue is resolved.

javax.xml.bind.JAXBException: ClassCastException: attempting to cast zip:C:/RPS_workspace/rps/rpa/rpa-netserver/java/rpa1/Weblogic/servers/AdminServer/tmp/_WL_user/RPA/gamr3e/APP-INF/lib/webservices-api-2.2.1-1.jar!/javax/xml/bind/JAXBContext.class to jar:file:/C:/Program%20Files/Java/jdk1.7.0_17/jre/lib/rt.jar!/javax/xml/bind/JAXBContext.class. Please make sure that you are specifying the proper ClassLoader. at javax.xml.bind.ContextFinder.handleClassCastException(ContextFinder.java:115) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:251) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:235) at javax.xml.bind.ContextFinder.find(ContextFinder.java:432) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:637) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)

We are using WebLogic 12c server.

Regards, BalKrishna.

glassfishrobot commented 10 years ago

Reported by balkrishna

glassfishrobot commented 10 years ago

Was assigned to snajper

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA METRO-29