Fixed classloading problem with JBoss 5.1.0.GA, Axis 1.3, and JDK 1.6.0_23

For days I have spent trying to figure out why one small SOAP component on our website wasn’t working.  We are running JBoss 5.1.0.GA, Axis 1.3 and JDK 1.6.0_23.  Our SOAP file ProcessRequest.jws needs to create a javax.servlet.http.HTTPServletRequest object upon compile.  The error I was getting was this:

AXIS error
Sorry, something seems to have gone wrong... here are the details:
Fault - Error while compiling: C:\jboss-5.1.0.GA\server\csa\tmp\aac21-f5w8mf-gq48x7gj-1-gq493slz-ai\ROOT.war\WEB-INF\jwsClasses\

faultCode: {}Server.compileError
faultString: Error while compiling: C:\jboss-5.1.0.GA\server\csa\tmp\aac21-f5w8mf-gq48x7gj-1-gq493slz-ai\ROOT.war\WEB-INF\jwsClasses\
{}Errors:Error compiling C:\jboss-5.1.0.GA\server\csa\tmp\aac21-f5w8mf-gq48x7gj-1-gq493slz-ai\ROOT.war\WEB-INF\jwsClasses\
Line 1, column 25: package javax.servlet.http does not exist
Line 2, column 25: package javax.servlet.http does not exist
Line 11, column -1: cannot find symbol
Line 13, column -1: cannot find symbol
Line 16, column -1: cannot find symbol
Line 0, column 0:
5 errors

Finally after stumbling upon this article,, I moved the servlet-api.jar from <JBOSS_HOME>/common/lib to <JBOSS_HOME>/lib/endorsed and fixed the problem where compiling the JWS file couldn’t find the servlet libraries.  And our website still continues to work as well.

Leave a Reply

Your email address will not be published.