尝试在Tomcat中部署GWT项目,结束违规类错误 [英] Trying to deploy GWT project in Tomcat ends with offending class error
问题描述
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没有加载。请参见Servlet规范2.3,第9.7.2节。违规类:javax / servlet / Servlet.class
当我打开网页时,我得到以下错误:
HTTP状态404 - / rfds /
类型状态报告
message / rfds /
描述请求的资源不可用。
Apache Tomcat / 7.0.41
在mit web-inf / lib目录我找到了一个gwt-dev.jar(约33Mb)和一个gwt-servlet.jar(约6Mb)和大约10-20个其他jar文件关于我在项目中使用的其他工具(membrain,drools,jdbc驱动程序等) )。我有依赖问题吗?有人为这个问题提供解决方案吗?
提前感谢
p> 你不应该部署 gwt-user.jar
和/或 gwt-dev.jar
!
如果您使用GWT-RPC或RequestFactory,则部署 gwt-servlet.jar
如果您不使用托管依赖关系(Maven等),您可能还必须部署 gwt-servlet-deps.jar
,您可以在GWT SDK中找到拉链捆绑。否则,你的依赖管理器(Maven等)应该照顾你的传递依赖。
如果你使用托管依赖关系,把 gwt-
和 gwt-dev
在中提供
范围(或任何相当于您的构建工具/依赖关系管理器,如果您不使用Maven)。
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!
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).
这篇关于尝试在Tomcat中部署GWT项目,结束违规类错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!