I have an EJB based application that exposes a set of services as RPC-style web services. I building a rich client front end using Laszlo. Laszlo is deployed as an exploded war and it ships with its own version of Axis. My web services work fine but of course on the Laszlo side of things I'm getting all kinds of NoSuchMethodExceptions since the forked Axis in axis-ws4ee.jar is loaded first. I've played with the settings in the jbossweb-tomcat50.sar jboss-service.xml particularly "Java2ClassLoadingCompliance" and "UseJBossWebLoader". I've also played with adding a jboss-web.xml to the WEB-INF of the exploded Laszlo deployment to no avail. My attempt to a jboss-web.xml to isolate classloaders looks like
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
<!-- Isolate the lazslo classes from other deployments -->
So, how do I have my Laszlo WAR use the Axis version in its WEB-INF/lib directory? I'm I missing something with this whole Unified Class Loader architecture?
Tweaking the tomcat service seems to break other things while adding the jboss-web.xml descriptor gives me following error during deployment. I've seen this error in the Forum but no definitive explanation of what the cause is...
2005-03-27 16:36:42,281 ERROR [org.jboss.web.WebModule] Starting failed jboss.web.deployment:id=1306057360,war=lps-3.0b2-servlet.war
org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (ReflectionException: Cannot find setter method setDocBase null Cause: java.lang.NoSuchMethodException: org.apache.commons.modeler.BaseModelMBean.setDocBase(java.lang.String))
Any help would be appreaciated.
Only one solution if you want to override the axis that is shipped with Jboss. You need to remove the JBossWS component and all it dependencies in JBoss 4.x.
Then you can use your own version of axis.
Unfortunately I am using JBossWS to serve the laszlo app so I can't do away with it. I can't believe that it is this hard to isolate a WAR deployment from the app server loaded classes. Thanks for the help.
I meant that Laszlo is a client to a set of Web Services served from a EJB-based app in JBoss.
Any other JBoss deployment/classloading gurus out there?
AFAIK, you cannot have two conflicting axis versions deployed in jboss at the same time. In theory you would need to scope your laszlo client in a seperate loader repository and set parent delegation to false. This would work if Axis did not do all sorts of funky things with static references to class loaders, etc - it just does not play nicely in server managed CL environments.
Starting from jboss-4.0.2, we moved the classes that WS4EE depends on from org.apache.axis to org.jboss.axis. So you should be able to deploy Axis to JBoss as part of your WS client.
Why do you prefer a Laszlo client over a WS4EE client?