【问题标题】:jetty exception and failed startup码头异常和启动失败
【发布时间】:2017-03-04 17:05:37
【问题描述】:

我从2.3 to 2.7 和其他一些模块升级gwt 版本。 maven build 成功结束,但是当我在 superDevMode 下运行时出现异常

java.lang.IllegalArgumentException: Object of class 'com.google.gwt.dev.shell.jetty.JettyLauncher.WebAppContextWithReload' is not of type 'org.eclipse.jetty.webapp.WebAppContext'. Object Class and type Class are from different loaders.

我不知道。

使用:

  • Intellij 14
  • 码头 9.3.12.v20160915
  • Spring 4.3.3.RELEASE
  • Servlet API 3.1.0
[WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload{/,file:/home/.../modules/core-war/target/x12/},/home/.../modules/core-war/target/x12
java.lang.IllegalArgumentException: Object of class 'com.google.gwt.dev.shell.jetty.JettyLauncher.WebAppContextWithReload' is not of type 'org.eclipse.jetty.webapp.WebAppContext'. Object Class and type Class are from different loaders.
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:323)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:281)
at org.eclipse.jetty.webapp.JettyWebXmlConfiguration.configure(JettyWebXmlConfiguration.java:103)
at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:468)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1237)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:541)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:162)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:282)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:740)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:632)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1054)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
at com.google.gwt.dev.DevMode.main(DevMode.java:413)

【问题讨论】:

  • 你也可以添加你的配置吗?
  • 什么配置? web.xml?
  • 这个问题也有类似的例外:stackoverflow.com/questions/10800922/… 接受的答案建议删除 jetty-maven-plugin。
  • 您的 WEB-INF/lib 中是否有一些 Jetty JAR?也可以试试刚刚发布的 GWT 2.8.0。
  • 我从WEB-INF/lib中删除了所有jetty jar文件,但问题没有解决

标签: java spring maven gwt jetty


【解决方案1】:

gwt-dev.jar 位于 Web 服务器类路径中,但不应位于。删除 gwt-dev.jar。如果它是 maven,则提供<scope>provided</scope> 的范围,它不会被放入 WEB-INF/libs 文件夹中。检查 WEB-INF/libs 文件夹中的 gwt-dev.jar 并在需要时将其删除。

【讨论】:

    【解决方案2】:

    我从我的WEB-INF/lib 中删除了gwt-dev.jar,并通过在我的 ant 的类路径中添加一个路径来向这个 jar 文件添加一个依赖项

            <java classname="com.google.gwt.dev.DevMode" dir="core-war/target/" failonerror="false" fork="true">
            <classpath>
                <path refid="project.source.path"/>
                <path refid="project.class.path"/>
                <path location="${basedir}/build-conf/lib/ojdbc-11g-1.6.jar" />
                <path location="${mvn.repo.dir}org/netezza/nzjdbc/4.6/nzjdbc-4.6.jar" />
                <path location="${mvn.repo.dir}/com/google/gwt/gwt-dev/${gwt.version}/gwt-dev-2.7.0.jar" />
            </classpath>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-04
      • 2017-01-05
      • 1970-01-01
      • 1970-01-01
      • 2015-12-27
      相关资源
      最近更新 更多