> -----Original Message-----
> From: KARR, DAVID (ATTCINW)
> Sent: Wednesday, December 09, 2009 2:45 PM
> To: users_at_jaxb.dev.java.net
> Subject: ClassCastException:
> com.sun.xml.bind.v2.runtime.JAXBContextImpl in WebLogic 10
>
> I'm running WebLogic 10MP1. I'm constructing an application that uses
> CXF, which uses jaxb-api-2.1.jar and jaxb-impl-2.1.12.jar.
>
> After I put those jars into WEB-INF/lib and restarted, I got the
> following:
>
> java.lang.ClassCastException:
> com.sun.xml.bind.v2.runtime.JAXBContextImpl
> at
> javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:150)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
> at
>
org.apache.cxf.wsdl.JAXBExtensionHelper.createJAXBContext(JAXBExtension
> H
> elper.java:196)
>
> I'm using "prefer-web-inf-classes" in weblogic.xml and
> "prefer-application-packages" in weblogic-application.xml (specifying
> "javax.wsdl.*" and "com.sun.xml.bind.v2.*").
It appears that after I constructed an EAR for this project, put my jars
into the EAR, and set "prefer-application-packages", I stopped getting
this error.