[英]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. 我使用glassfish作为我的服务器创建了带有neatbeans的jersey Web服务,一切正常,但是尝试在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". 我收到此错误“错误500处理请求时发生错误:/ibm/console/upload.do消息: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. 我什至尝试创建一个简单的Web应用程序,并尝试在Websphere上进行部署,同样,我也遇到同样的错误。
Anybody with ideas? 有人有想法吗? I need your help so badly ya'll. 我非常需要你的帮助。 Thanks in advance 提前致谢
Make sure you don't have servlet-api.jar in your WEB-INF/lib. 确保您的WEB-INF / lib中没有servlet-api.jar。 If its there it may interfere with the one already present in websphere a trick the classloader 如果它在那里可能会干扰Websphere中已经存在的那一招
I suppose I am not too late to reply to this question. 我想现在回答这个问题还为时不晚。 The HttpServlet class can be found in the j2ee.jar. 可以在j2ee.jar中找到HttpServlet类。 WAS does not bundle it in servlet-api.jar, the way Tomcat does it. WAS不会像Tomcat那样将其捆绑在servlet-api.jar中。
I did below steps which worked for me : 我做了以下对我有用的步骤:
您需要在应用程序中捆绑servlet-api.jar文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.