Trying to deploy GWT project in Tomcat ends with offending class error

≡放荡痞女 提交于 2020-01-16 18:05:29

问题


I'm trying to deploy my GWT project in Tomcat but i'm always getting this error:

Jul 16, 2013 9:16:52 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Users\Dennis\Documents\workspaceMA\xampp\tomcat\webapps\rfds\WEB-INF\lib\gwt-dev.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

When i'm trying to open the webpage i get following error:

HTTP Status 404 - /rfds/
type Status report
message /rfds/
description The requested resource is not available.
Apache Tomcat/7.0.41

After searching these jar files in mit web-inf/lib directory i found a gwt-dev.jar (about 33Mb) and a gwt-servlet.jar (about 6Mb) and about 10-20 other jar files regarding other tools i used in my project (membrain, drools, jdbc driver etc.). Do I have dependency issues? Has someone an solution for this problem?

Thanks in advance!


回答1:


Thou shall never deploy gwt-user.jar and/or gwt-dev.jar!

Deploy gwt-servlet.jar if you use GWT-RPC or RequestFactory. If you're not using managed dependencies (Maven, etc.) you might have to deploy gwt-servlet-deps.jar too, which you'll find in the GWT SDK zip bundle. Otherwise, your dependency manager (Maven, etc.) should take care of transitive dependencies fro you.

If you use managed dependencies, put gwt-user and gwt-dev in the provided scope (or whatever is equivalent for your build tool / dependency manager if you're not using Maven).

See http://www.gwtproject.org/doc/latest/DevGuideDeploying.html#DevGuideDeployingServletContainerUsingRPC



来源:https://stackoverflow.com/questions/17678410/trying-to-deploy-gwt-project-in-tomcat-ends-with-offending-class-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!