【问题标题】:Eclipse Mars and GWT日食火星和 GWT
【发布时间】:2015-10-08 14:03:51
【问题描述】:

我正在对旧的 GWT 项目进行一些更新,迁移到 javaee 7、gwt 2.7 等。其中一个要求是从旧的 Juno 迁移到最新的 Eclipse IDE,Mars。好的,我开始更新整个东西。现在我正在使用 java ee 7 和 gwt 2.5.1,我只是从 Eclipse Juno 升级到 Mars。一切都很好,我设置了 IDE 和工作区。我可以通过 GWT compile 成功编译我的 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 版本)项目。

【问题讨论】:

  • org.mortbay.jetty 是 Jetty 6(或更早版本)。最高支持 Servlet 2.5,JEE5 规范的一部分,而不是 JEE7。

标签: java eclipse gwt jetty


【解决方案1】:

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

为此,请打开您的项目属性(您可以右键单击资源管理器中的文件夹或从菜单中)并转到 Java 构建路径。选择源选项卡。您可以在那里设置默认文件夹。

如果您有不应该在 /WEB-INF/classes 文件夹中的类要编译,则修改您不想编译为默认的每个源文件夹下的输出文件夹。

【讨论】:

    【解决方案2】:

    在您的 gwt Web 应用程序的 Run as configuration 中,如果您尚未指定 VM 参数,请指定它,例如 -Xmx1024M。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-16
      • 2010-12-04
      • 2014-02-27
      • 2011-12-03
      相关资源
      最近更新 更多