users@glassfish.java.net

Endorsed JAXB ClassCastException

From: <forums_at_java.net>
Date: Fri, 2 Dec 2011 14:55:37 -0600 (CST)

Hi,

I have to deploy an ear with CXF SOAP webservice clients to a Glassfish 3.1.1
domain.  To use the JAX-WS CXF libraries instead of the Metro ones, the jars
in the ear's lib directory need to be placed in the domain/lib/ext
directory.  It was first tried to only place the CXF jars in the ext
directory, but it appears all jars need to be there.  However, when I try to
parse an XML file using JAXB, I get this error:

javax.xml.bind.JAXBException: ClassCastException: attempting to cast
bundle://3.0:1/javax/xml/bind/JAXBContext.class to
jar:file:/opt/glassfishv3/glassfish/modules/endorsed/jaxb-api-osgi.jar!/javax/xml/bind/JAXBContext.class.
Please make sure that you are specifying the proper ClassLoader.
Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */
table.MsoNormalTable {mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes;
mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in
5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan; font-size:11.0pt;
font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}

I removed jaxb-api-2.2.3.jar and jaxb-impl-2.2.4-1.jar from the
domain/lib/ext directory hoping that would solve the issue, but no luck.

Can anyone shed some light on what the root of this issue is?

Thanks!


--
[Message sent by forum member 'sdoca']
View Post: http://forums.java.net/node/870432