This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to install a standalone axis on jboss 4.0 (failed to compile .jws)

 
sam joe
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

<pre>

<soapenv:Envelope>

<soapenv:Body>

<soapenv:Fault>
<faultcode>ns1:Server.compileError</faultcode>

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

<detail>

<Errors>
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;
</Errors>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

</pre>

Thanks a lot!
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sam joe
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Patrick Bernardina
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the same problem.

any solution?
 
Mark Kempster
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

http://ws.apache.org/axis/java/install.html

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:

http://ws.apache.org/axis/java/install.html#Tomcat4.xAndJava1.4


"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.
 
sunny theonly
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark
Thanks so much for posting that it really helped me out.
Sunny
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic