I would have expected this to work when you remove the myjar.jar file from the WEB-INF/lib folder. Which version of JBoss do you use? Do you have a application.xml file and/or jboss-app.xml file in the application? If yes, what are it's contents? And any jboss-web.xml file in the war?
Hi Jaikiran, thanks for your response.
I found a workaround to my issue:
AXIS required myjar.jar to be in the WEB-INF/lib directory in order to compile the web service class, but once compiled, the presence of this jar was preventing me from being able to do a successful JNDI lookup inside that web service class (due to the class cast exception mentioned above).
To get around this, I have been providing AXIS with a compiled version of that web service class (in the WEB-INF/jwsClasses directory). I just deploy the .class file with the rest of my webapp. AXIS sees this and doesn't attempt to compile the .jws file, and there are also no class loader conflicts with the presence of the additional myjar.jar.