Axis2 on Tomcat using Ubuntu: Internal Server Error

Problem

Following the tutorials for bottom-up web services for eclipse, I created a dynamic web project and added a few services using Axis2. These web services run without a problem on the local installation of tomcat. However, when I export the web project as war and deploy this war to a tomcat installation on ubuntu, a number of problems occur.

Basically, the war get deployed and started, but after clicking on „Services“ an „Internal Server Error“ occurs. This error depends on a number of exceptions:

„java.lang.NoClassDefFoundError: org/apache/http/HttpResponseFactory “

„load() exception
java.lang.ClassNotFoundException: org.apache.axis2.transport.http.AxisAdminServlet“

„org.apache.axis2.AxisFault: The system is attempting to engage a module that is not available: addressing“

Solution

The first exception HttpResponseFactory can be resolved by adding httpcore-4.0.1.jar to the folder WEB-INF/lib (just drag and drop in the folder in eclipse).

The other exceptions are a bit tricker. What I found was that the „standard“ installation of tomcat 6 using apt-get does not work correctly.

My problem was resolved after I manually installed Tomcat 6.0.29 loosely following the instructions here.

Resources

Download tomcat 6.0 (get the location of the jar for apt-get)
<a href="http://mail-archives.apache.org/mod_mbox/axis-java-user/201006.mbox/”>Mail list: Try to add axis2-core-m1.jar (Complete thread)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s