Apache Muse - HTTP 500 Errors in Axis2 Deployments
If you are deploying an application with Apache Axis2 and an HTTP 500 error is returned to a client, the error is being generated by Axis2 and not Muse. This means that you need to use Axis2's logging mechanism or a TCP/IP monitor to see the actual error message and stack trace. Below is a list of common problems that might lead to HTTP 500 errors:
- WS-A Action not specified in the Axis2 services.xml file. If you
generated your project with WSDL2Java, it added the WS-A Action URIs for all
of the operations implemented by a resource type under the <service/>
element in the services.xml descriptor file used by Axis2. Without these URIs
in place, Axis2 will not even deliver a SOAP request to the Muse application.
If you added an operation to your resource type manually, you may have forgotten
to update the <service/> that represents the resource to include the new
Action URI.
- Class not found when initializing capabilities. If you manually added a
capability to your resource type, you may have forgotten to add the appropriate JAR
files to your application. If you added a standard capability (with Muse's default
implementation), you need to add the appropriate muse-*.jar files to
/WEB-INF/lib. If you added a custom capability, you need to add your code
to a JAR file and put it in WEB-INF/lib.
Do not put code for your custom capabilities in /WEB-INF/classes. The Axis2 service model overrides the J2EE application model and does not allow you to include implementation classes in the usual J2EE way; more specifically, it has its own class loader that does not consider /WEB-INF/classes when looking for classes referenced by deployed services.