chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Robert.Willia...@wellsfargo.com>
Subject RE: ClassCastException: com.ibm.xml.xlxp2.jaxb.JAXBContextImpl incompatible with com.sun.xml.bind.api.JAXBRIContext
Date Fri, 10 Oct 2014 14:15:14 GMT
Hello Florian,

Thank you for your quick response.  It is much appreciated!

Do you know by chance if this problem is corrected in OpenCMIS 0.10.0?

Thanks again!

-----Original Message-----
From: Florian Müller [mailto:fmui@apache.org] 
Sent: Friday, October 10, 2014 9:53 AM
To: dev@chemistry.apache.org
Cc: Williams, Robert
Subject: Re: ClassCastException: com.ibm.xml.xlxp2.jaxb.JAXBContextImpl incompatible with
com.sun.xml.bind.api.JAXBRIContext

Hi Robert,

The WebSphere specific configuration had issues and therefore has been removed in later OpenCMIS
releases.

The best thing you can do is to upgrade to OpenCMIS 0.12.0 (because of several enhancements)
and use the standard OpenCMIS web service implementation, which is based on the Sun JAX-WS
RI. You may have to change the classloader configuration. But this setup is known to work
in WebSphere.

If upgrading is not an option, try adding this line to your META-INF/MANIFEST.MF file:
DisableIBMJAXWSEngine: true

It might help...


- Florian


> Hello,
> 
> I am new to CMIS and I am currently developing a CMIS Server using the 
> OpenCMIS 0.9.0.
> 
> At this point, I have operational "Happy Path" Proof-of-Concept code 
> and I am now introducing exception handling by throwing exceptions 
> such as the CmisNotSupportedException and CmisRuntimeException in 
> appropriate conditions.  This new code works fine in my local 
> Websphere environment.  However, when I deploy to Websphere on my 
> Linux server, I get the following message:
> 
> ClassCastException: com.ibm.xml.xlxp2.jaxb.JAXBContextImpl
> incompatible with com.sun.xml.bind.api.JAXBRIContext
> 
> In researching this problem, I have found two possible solutions:
> 
> *       First, I found documentation that Websphere specific files
> (i.e.  web.xml and webservices.xml) exist.  According to a 
> how-to-setup.txt file, I have copied them into the WEB-INF directory.
> Unfortunately, this modification results in the following new error:
> 
> [10/9/14 16:43:18:786 EDT] 00000037 webapp        E
> com.ibm.ws.webcontainer.webapp.WebApp commonInitializationFinally
> SRVE0266E: Error occured while initializing servlets: {0}
>                                  javax.servlet.UnavailableException:
> SRVE0201E: Servlet
> [org.apache.chemistry.opencmis.server.impl.webservices.NavigationService]:
> not a servlet class
> 
> I can see that the new web.xml file has the NavigationService 
> configured as a servlet.  However, if I look at the actual class and 
> its parent class, they are not servlets:
> 
> <servlet>
>     <servlet-name>NavigationService</servlet-name>
> 
> <servlet-class>org.apache.chemistry.opencmis.server.impl.webservices.NavigationService</servlet-class>
>     <load-on-startup>1</load-on-startup>
> </servlet>
> 
> public class NavigationService extends AbstractService implements 
> NavigationServicePort {
> 
> 
> *       Second, I found a post that creating a jaxb.properties file in
> the src/main/resources directory with the following contents would 
> correct the using the original web.xml and sun-jaxws.xml files.
> Unfortunately, this modification did not correct the problem.
> 
> javax.xml.bind.context.factory=com.sun.xml.bind.v2.ContextFactory
> 
> Please advise as to the most simple, straightforward solution to this 
> problem.
> 
> Thanks in advance for your help!

Mime
View raw message