Salesforce

For Web 8.5, error "ODataWebHandler - javax.xml.bind.JAXBException: ClassCastException: attempting to cast jar" when deploying the deprecated Content service war file to Websphere 9

« Go Back

Information

 
Article TypeSolution Article
Scope/EnvironmentWeb 8.5, Websphere 9
Symptoms/Context
- Developer is able to deploy Content service war successfully in local environment.
- On Websphere 9.0.5, Content service is deployed but displays None instead of expected endpoints as in below screenshot.
User-added image

- In Websphere stdout.log, below stacktraces are seen
2021-05-11 10:49:46,933 ERROR ODataWebHandler -
javax.xml.bind.JAXBException: ClassCastException: attempting to cast jar:file:/opt/was9/app-it4/endorsed_apis/jaxb-api.jar!/javax/xml/bind/JAXBContext.class to 
wsjar:file:/opt/was9/app-it4/profiles/p-c9it4-b/installedApps/c-c9it4/sdlcds1.ear/lib/jaxb-api-2.2.3.jar!/javax/xml/bind/JAXBContext.class.  
Please make sure that you are specifying the proper ClassLoader.    
    at javax.xml.bind.ContextFinder.handleClassCastException(ContextFinder.java:130)
...
2021-05-11 10:51:17,894 DEBUG ContentInfoResolverImpl - Checking https://CONTENT_SERVICE_URL/content.svc if is up and running

 
Resolution
Issue resolved after administrator removed the jaxb-api.jar file from final build by adding scope to the POM file of Maven build.
Root Cause
Reference
Attachment 1 
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by