简体   繁体   English

Eclipse火星和GWT

[英]Eclipse Mars and GWT

I'm doing some update about an old GWT project, moving to javaee 7, gwt 2.7, and so on. 我正在对旧的GWT项目进行一些更新,移至javaee 7,gwt 2.7等。 Once of the requirements is to move to latest Eclipse IDE, Mars, from the old Juno. 要求之一就是从旧的Juno迁移到最新的Eclipse IDE Mars。 Ok, I stardet updating the whole stuff. 好的,我看了更新所有内容。 Now I'm using java ee 7 and gwt 2.5.1 and I'm just upgrading from Eclipse Juno to Mars. 现在,我使用的是Java ee 7和gwt 2.5.1,我只是从Eclipse Juno升级到Mars。 Everything was fine, I set up the IDE and the workspace. 一切都很好,我设置了IDE和工作区。 I can successfully compile my GWT projects by GWT compile. 我可以通过GWT编译成功地编译我的GWT项目。 I stumble into a strange error as I try to run/debug those projects. 当我尝试运行/调试那些项目时,我遇到一个奇怪的错误。 When I run my gwt project, I got back this error stack: 当我运行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

I'm using eclipse Mars, GWT 2.5.1, javaee 7. Surely I misconfigure something but can't guess what. 我正在使用Eclipse Mars,GWT 2.5.1,javaee7。当然,我配置错误,但无法猜测是什么。

UPDATE: I forgot to mention: this is a maven (3.3.3 version) project too. 更新:我忘了提及:这也是一个Maven(3.3.3版本)项目。

I suspect you need to set your default output folder to your-project-name/war/WEB-INF/classes 我怀疑您需要将默认输出文件夹设置为your-project-name/war/WEB-INF/classes

To do that open your project properties (you can right click on the folder in Explorer or from the menu) and go to Java Build Path. 为此,请打开您的项目属性(可以右键单击资源管理器中的文件夹或从菜单中单击该文件夹),然后转到Java Build Path。 Select the source tab. 选择来源标签。 You can set the default folder there. 您可以在此处设置默认文件夹。

If you have classes to compile that shouldn't be in your /WEB-INF/classes folder, then then modify the output folder under each source folder that you don't want compiling to default. 如果您要编译的类不应该放在/ WEB-INF / classes文件夹中,请修改每个您不想编译为默认值的源文件夹下的输出文件夹。

In Run as configuration for your gwt web app, if you have not specified the VM arguments then specify it, say -Xmx1024M. 在gwt Web应用程序的“以配置方式运行”中,如果尚未指定VM参数,则将其指定为-Xmx1024M。

IllegalStateException occurs when the response is already committed and we are trying to add something to it. 当响应已经提交并且我们正在尝试向其中添加某些内容时,发生IllegalStateException。 The reason for this behavior is either the response buffer has reached max size or someone has called flush() explicitly. 出现这种现象的原因是响应缓冲区已达到最大大小,或者有人明确调用了flush()。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM