GWT使用Eclipse Jetty而不是Mortbay

时间:2014-05-20 14:30:14

标签: java maven gwt jetty errai

如何让GWT使用Eclipse Jetty:

    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-server</artifactId>
        <version>${jetty.version}</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-plus</artifactId>
        <version>${jetty.version}</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-jndi</artifactId>
        <version>${jetty.version}</version>
    </dependency>

而不是Mortbay Jetty:

    <!--
    <dependency>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty</artifactId>
        <version>${jetty.version}</version>
    </dependency>

    <dependency>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-plus</artifactId>
        <version>${jetty.version}</version>
    </dependency>

    <dependency>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-naming</artifactId>
        <version>${jetty.version}</version>
    </dependency>
    -->

当我尝试使用Eclipse Jetty时,它会抛出GWT dev run:

  

抛出java.lang.ClassNotFoundException:   org.mortbay.jetty.plus.webapp.EnvConfiguration at   java.net.URLClassLoader $ 1.run(URLClassLoader.java:366)at   java.net.URLClassLoader $ 1.run(URLClassLoader.java:355)at   java.security.AccessController.doPrivileged(Native Method)at   java.net.URLClassLoader.findClass(URLClassLoader.java:354)at   java.lang.ClassLoader.loadClass(ClassLoader.java:425)at   sun.misc.Launcher $ AppClassLoader.loadClass(Launcher.java:308)at at   java.lang.ClassLoader.loadClass(ClassLoader.java:358)at   org.mortbay.util.Loader.loadClass(Loader.java:91)at   org.mortbay.util.Loader.loadClass(Loader.java:71)at   org.mortbay.jetty.webapp.WebAppContext.loadConfigurations(WebAppContext.java:837)     在   org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:417)     在   org.jboss.errai.cdi.server.gwt.JettyLauncher $ WebAppContextWithReload.doStart(JettyLauncher.java:525)     在   org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)     在   org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)     在   org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)     在   org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)     在   org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)     在org.mortbay.jetty.Server.doStart(Server.java:222)at   org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)     在   org.jboss.errai.cdi.server.gwt.JettyLauncher.start(JettyLauncher.java:738)     在com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)at   com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093)at at   com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)at at   com.google.gwt.dev.DevMode.main(DevMode.java:311)

0 个答案:

没有答案