Problems loading a WAR file in WebSphere 6.1

I am trying to deploy a web service to WebSphere using the WAR file that I was told directly about, quite possibly and was done many times before. WebSphere allows you to upload a file, specify the context root, and even launch the application. However, when I try to access it by specifying my base URIs, WebSphere 404s is on me. Relatively useless error message:

Error 404: SRVE0202E: Servlet [Jersey REST Service]: com.sun.jersey.spi.container.servlet.ServletContainer was found, but is corrupt: SRVE0227I: 1. Check that the class resides in the proper package directory. SRVE0228I: 2. Check that the classname has been defined in the server using the proper case and fully qualified package. SRVE0229I: 3. Check that the class was transferred to the filesystem using a binary transfer mode. SRVE0230I: 4. Check that the class was compiled using the proper case (as defined in the class definition). SRVE0231E: 5. Check that the class file was not renamed after it was compiled.

I checked my naming conventions, changed my web.xml to match this blog, tried packing it into an ear file (which gave my own errors when I tried to download it), and I'm trying to figure out which configurations I might have wrong . Any ideas on what I can change to make this work?

Edit

Here is the relevant part of my web.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
id="WebAppId"
xmlns="http://java.sun.com/xml/ns/j2ee"
xsi="http://www.w3.org/2001/XMLSchema-instance"
schemalocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>MYPROJECT'SDISPLAYNAME</display-name>
<servlet>
<servlet-name>Jersey REST Service</servlet-name> <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>MYPROJECTNAME</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey REST Service</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>

Other Editing

I'm using the latest release of jersey - is this part of the problem?

Another edit

I am sure the whole problem. WebSphere 6.1 launches jdk1.5, and Jersey has stopped supporting this after Jersey 1.2 ...

+3
source share
1 answer

As you suspect, your problem is not related to WebSphere support for Jersey (or rather JAX-RS).

I do not see JAX-RS in the list of supported WAS APIs.

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.help.ic.WS.doc/info_sching.html

WAS 6.1 runs on J2SE 1.5 (as shown in the URL above)

Specification or API Version 6.1

Java 2 Standard Edition (J2SE) J2SE 5 Specification

These are probably the causes of the errors you see in your WAS 6.1.

NTN

Manglu

+1
source

All Articles