0

I have a web application which is working fine when I deploy it as a WAR on Tomcat. However, when I deploy the same war (or built an ear from the war) on WebSphere(8.5.5.0), I am getting the below error:

com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl scanClassesDir 
unable to open input stream for resource <Classname>.class - java.lang.IllegalArgumentException

Please let me know if while building the war any specific changes need to be done for deploying on WebSphere. Also, the error is showing up for all compiled Java classes.

Gas
  • 17,601
  • 4
  • 46
  • 93
Vivek Roy
  • 31
  • 3
  • Please add the full stack trace to your question. What class is failing? Did you compiled these classes with same JDK as your WebSphere runs? – Gas Dec 28 '15 at 21:45
  • The error which I am getting is as below - java.lang.RuntimeException: com.ibm.ws.naming.util.CannotBindObjectException: Object is not of any type which can be bound.at com.sun.jersey.server.impl.cdi.CDIExtension.initialize(CDIExtension.java:196)at com.sun.jersey.server.impl.cdi.CDIExtension.beforeBeanDiscovery(CDIExtension.java:297) It looks like Jersey is not working on Webspere 8.5. Please let me know if you have any inputs on this. – Vivek Roy Jan 12 '16 at 22:07
  • Vivek, Jersey by default doesnt work with WAS, since WAS is using other JAX-RS provider, check this [post](http://stackoverflow.com/questions/24684958/jax-rs-jersey-2-10-support-in-websphere-8/24713878#24713878) for Jersey on WAS – Gas Jan 13 '16 at 10:29
  • After weeks of struggle, I found that guava jar (version 16 or above) is needed for Websphere for my project to run. The project is running without that jar successfully in Tomcat. I am not not even using that jar file. It looks like Websphere, somehow, has a dependency on that jar to run. – Vivek Roy Jan 25 '16 at 19:26

0 Answers0