jetty异常和启动失败

时间:2016-10-22 13:24:04

标签: java spring maven gwt jetty

我从2.3 to 2.7和其他一些模块升级gwt版本。 maven build end成功,但是当我在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
  • Jetty 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)

2 个答案:

答案 0 :(得分:2)

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

答案 1 :(得分:0)

我从我的gwt-dev.jar中删除了WEB-INF/lib,并通过在我的蚂蚁的类路径中添加一个路径来为此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>