• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Apache Tomcat Axis and the web.xml

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've put Axis 1.4 under Tomcat 6.0.18 and it does almost everything
as described.

However, I can compile and deploy the calculator.jws app only because it imports no classes. Another app EchoHeaders.jws cannot be compiled and deployed because the class javax.servlet.http.HttpServletRequest cannot be found.

One observation : the web.xml file in D:\Tomcat\webapps\axis\WEB-INF has :

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
<display-name>Apache-Axis</display-name>

<listener>
<listener-class>org.apache.axis.transport.http.AxisHTTPSessionListener</listener-class>
</listener>

etc.

etc.

Then starting Tomcat shows a "can't find class" error :
..
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
- Unable to find config file. Creating new servlet engine config file: /WEB-INF/server-config.wsdd
- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart).

Attachment support is disabled.
27.12.2008 19:58:24 org.apache.coyote.http11.Http11Protocol start
..
..

But (!!!) when I reduce the axis web.xml to this :

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
</web-app>

Then Tomcat starts without a hitch :
..
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
27.12.2008 18:45:08 org.apache.coyote.http11.Http11Protocoll start
..
..
I've got Java 1.6 and the env vari classpath also points to j2ee.jar.

are axis and Tomcat stepping on each other's toes?

must server.xml in Tomcat be modified to take axis into account?

What am I doing wrong?
 
Dan Kempten
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are a few secrets I found in the last 12 hours.

One may define AXISCLASSPATH as all the D:\Tomcat\webapps\axis\lib jars, one after the other. An even better tactic is to effectively do :

set CLASSPATH = %CLASSPATH%;%AXISCLASSPATH%

then running java or javac in a cmd.exe box doesn't
require -cp %AXISCLASSPATH% each time.

The warning about two classes not being found, appearing in the start of Tomcat can be ignored when running java or javac while compiling and deploying web services.

To do away with the warning completely I found that one needs activation.jar and mail.jar in %CATALINA_HOME%\webapps\axis\lib and also !! %CATALINA_HOME%\webapps\axis\WEB-INF\lib. Both folders !!!

Both jars can be found in the j2ee SDK, known as Glassfish I believe.

After a check of the env varis and a complete restart of the windows system all the problems described above went away.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic