Eclipse Mars和GWT

时间:2015-10-08 14:03:51

标签: java eclipse gwt jetty

我正在做一些关于旧GWT项目的更新,转移到javaee 7,gwt 2.7等等。曾经的要求是从旧的Juno迁移到最新的Eclipse IDE,Mars。好的,我stardet更新了整个东西。现在我使用java ee 7和gwt 2.5.1,我只是从Eclipse Juno升级到Mars。一切都很好,我设置了IDE和工作区。我可以通过GWT编译成功编译我的GWT项目。当我尝试运行/调试这些项目时,我偶然发现了一个奇怪的错误。当我运行我的gwt项目时,我收回了这个错误堆栈:

[WARN] Server class 'com.myapp.libs.client.gwt.server.PassThroughFilter' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/C:/sviluppo/wsmars-r210/MyLibs2.0.0/mylibs.web/target/classes/' to the web app classpath for this session
For additional info see: file:/C:/sviluppo/gwtsdk/gwt-2.5.1/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'com.myapp.libs.client.exception.ServerDelegateException' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/C:/sviluppo/wsmars-r210/MyApp2.0.0/myapplibs.ejb/target/classes/' to the web app classpath for this session
For additional info see: file:/C:/sviluppo/gwtsdk/gwt-2.5.1/doc/helpInfo/webAppClassPath.html
[WARN] Server resource 'log4j.properties' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/C:/Users/SIGMA6/.m2/repository/org/jboss/jbossts/jbossjts/4.16.2.Final/jbossjts-4.16.2.Final.jar' to the web app classpath for this session
For additional info see: file:/C:/sviluppo/gwtsdk/gwt-2.5.1/doc/helpInfo/webAppClassPath.html
log4j:WARN No appenders could be found for logger (com.myapp.libs.client.gwt.server.PassThroughFilter).
log4j:WARN Please initialize the log4j system properly.
[WARN] Server class 'com.allen_sauer.gwt.log.server.RemoteLoggerServiceImpl' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/C:/Users/SIGMA6/.m2/repository/com/allen-sauer/gwt/log/gwt-log/3.1.8/gwt-log-3.1.8.jar' to the web app classpath for this session
For additional info see: file:/C:/sviluppo/gwtsdk/gwt-2.5.1/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'com.myapp.shared.utility.StrMD5' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/C:/sviluppo/wsmars-r210/JSharedP1.2.0.2/target/classes/' to the web app classpath for this session
For additional info see: file:/C:/sviluppo/gwtsdk/gwt-2.5.1/doc/helpInfo/webAppClassPath.html
[WARN] /MyApp.jsp
java.lang.IllegalStateException
at org.apache.jasper.JspCompilationContext.<init>(JspCompilationContext.java:132)
at org.apache.jasper.servlet.JspServletWrapper.<init>(JspServletWrapper.java:96)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:319)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
at com.myapp.libs.client.gwt.server.PassThroughFilter.doFilter(PassThroughFilter.java:403)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
[ERROR] 500 - POST /MyApp.jsp?gwt.codesvr=127.0.0.1:9997&idSlot=000000001&SID=d2c9ebf6d218c4a5a66aa31f7ca7fd4f43 (127.0.0.1) 3439 bytes
Request headers
  Host: 127.0.0.1:8888
  User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  Accept-Language: en-US,en;q=0.5
  Accept-Encoding: gzip, deflate
  Cookie: JSESSIONID=1wyeek4kpnx2v
  Connection: keep-alive
  Referer: http://127.0.0.1:8888/startup.html?gwt.codesvr=127.0.0.1:9997
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 125
Response headers
  Set-Cookie: JSESSIONID=f7432bsuk10z;Path=/
  Content-Type: text/html; charset=iso-8859-1
  Content-Length: 3439

我使用的是eclipse Mars,GWT 2.5.1,javaee 7.当然我错误配置了一些东西,但无法猜出是什么。

更新:我忘了提及:这也是一个maven(3.3.3版本)项目。

2 个答案:

答案 0 :(得分:0)

我怀疑您需要将默认输出文件夹设置为your-project-name/war/WEB-INF/classes

要执行此操作,请打开项目属性(可以在资源管理器中或从菜单中右键单击该文件夹)并转到Java Build Path。选择源选项卡。您可以在那里设置默认文件夹。

如果您要编译的类不应该在/ WEB-INF / classes文件夹中,那么请修改您不希望编译为默认值的每个源文件夹下的输出文件夹。

答案 1 :(得分:0)

在您的gwt Web应用程序的运行配置中,如果您尚未指定VM参数,请指定它,例如-Xmx1024M。

当响应已经提交并且我们正在尝试向其添加内容时发生IllegalStateException。这种行为的原因是响应缓冲区已达到最大大小或有人明确调用了flush()。