Ololade enifeni
Ololade enifeni

Reputation: 111

java.lang.NoClassDefFoundError: javax.servlet.ServletInputStream Error deploying on websphere

I have created a jersey web service with neatbeans using glassfish as my server, everything works fine but i have issues trying to install the same app on websphere 7.

i get this error "Error 500 An error occurred while processing request: /ibm/console/upload.do Message: java.lang.NoClassDefFoundError: javax.servlet.ServletInputStream".

I even tried creating a simple web app and tried to deploy on websphere, again, i have the same error.

Anybody with ideas? I need your help so badly ya'll. Thanks in advance

Upvotes: 1

Views: 9040

Answers (4)

Mazahir
Mazahir

Reputation: 11

I suppose I am not too late to reply to this question. The HttpServlet class can be found in the j2ee.jar. WAS does not bundle it in servlet-api.jar, the way Tomcat does it.

Upvotes: 1

Mukund
Mukund

Reputation: 11

I did below steps which worked for me :

  1. Go to the server in console(which was stand - alone in my case i.e no DMGR)
  2. Change the class loader policy to "multiple".

Upvotes: 1

Santosh
Santosh

Reputation: 17893

You need to bundle servlet-api.jar file in your application.

Upvotes: -1

Bozho
Bozho

Reputation: 597046

Make sure you don't have servlet-api.jar in your WEB-INF/lib. If its there it may interfere with the one already present in websphere a trick the classloader

Upvotes: 5

Related Questions