码头异常和启动失败

jetty exception and failed startup

我从 2.3 to 2.7 和其他一些模块升级了 gwt 版本。 maven构建成功结束,但是当我在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.

我不知道。

使用:

[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)

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

我从我的 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>