Forums Register Login
how to install a standalone axis on jboss 4.0 (failed to compile .jws)
I tried to install a standalone axis on jboss 4.0. I copied 'axis' folder to jboss 'deploy' folder, rename from 'axis' to 'axis.war'. Create a new file jboss-web.xml and add a context root '/axis'. Now, start the jboss server, I can view happyaxis.jsp. Everything looks fine except when I try to visit EchoHeaders.jws. The axis failed to compile by not finding javax.servlet.http.HttpServletRequest. If I copied $JBOSS_HOME/server/all/lib/javax.servlet.jar to axis.war/WEB-INF/lib. Everything works. But I don't want my web services depend on jboss and that's not the right way to do it. Is there anyway that I can config to let axis know the classpath to that jar in jboss?





Error while compiling: D:\server\jboss-4.0.2\server\default\.\deploy\axis.sar\axis.war\WEB-INF\jwsClasses\EchoHeaders.java


Error compiling D:\server\jboss-4.0.2\server\default\.\deploy\axis.sar\axis.war\WEB-INF\jwsClasses\EchoHeaders.java:
Line 0, column 0: could not parse error message: Note: sun.tools.javac.Main has been deprecated.
D:\server\jboss-4.0.2\server\default\.\deploy\axis.sar\axis.war\WEB-INF\jwsClasses\EchoHeaders.java:21: Class javax.servlet.http.HttpServletRequest not found in import.
import javax.servlet.http.HttpServletRequest;


Thanks a lot!
This sounds odd. Axis (like any web app) needs to have access to the servlet API interfaces, because it uses those classes internally. So adding the jar file to the Axis lib directory shouldn't make a difference. JBoss may be different, but, e.g., with Tomcat it's not necessary to add the API jar.
You are right. Drop axis into Tomcat, everything just works.

The only explaination is that the standalone axis runtime classpath in jboss and the classpath picked by axis classloader to compile .jws are different.
I have the same problem.

any solution?
I attempted this same task today by removing jboss-4.0.4's jbossws14.sar and
adding axis.war as described on the axis install guide


The missing piece to getting the EchoHeaders.jws test script (and its dependence
on javax.servlet.http.HttpServletRequest was this text from the axis install guide:


"Java 1.4 changed the rules as to how packages beginning in java.* and javax.* get loaded. Specifically, they only get loaded from endorsed directories."

The instructions talk about jaxrpc.jar and saaj.jar, but the same seems to
apply to javax.servlet.jar. Various instructions for copying that jar into
jbossweb-tomcat55.sar/ or listing it in JBOSS_CLASSPATH didn't seem to work.
I was able to get it working by copying javax.servlet.jar into JBOSS_HOME/lib/endorsed/, and noticed an entry in boot.log that it was picked up. Alternately, I imagine you could muck with the JBOSS_ENDORSED_DIRS
variable in run.sh/run.conf.
Hi Mark
Thanks so much for posting that it really helped me out.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

All times above are in ranch (not your local) time.
The current ranch time is
Oct 23, 2017 07:59:04.