无法使用JBoss AS或Wildfly运行Errai Dev Mode

时间:2014-02-26 11:49:49

标签: java gwt jboss wildfly errai

我正在尝试使用Errai 3的新功能,这是JBoss AS集成,但是我收到了这个错误:

  

[错误]无法加载服务器类   'org.jboss.errai.cdi.server.gwt.JBossLauncher'[错误]   抛出java.lang.ClassNotFoundException:   org.jboss.errai.cdi.server.gwt.JBossLauncher [ERROR] 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)[ERROR] at   java.net.URLClassLoader.findClass(URLClassLoader.java:354)[错误] at   java.lang.ClassLoader.loadClass(ClassLoader.java:425)[ERROR] at   sun.misc.Launcher $ AppClassLoader.loadClass(Launcher.java:308)[ERROR]     在java.lang.ClassLoader.loadClass(ClassLoader.java:358)[ERROR] at   java.lang.Class.forName0(Native Method)[ERROR] at   java.lang.Class.forName(Class.java:270)[ERROR] at   com.google.gwt.dev.DevMode $ ArgHandlerServer.setString(DevMode.java:118)   [错误]在   com.google.gwt.util.tools.ArgHandlerString.handle(ArgHandlerString.java:26)   [错误]在   com.google.gwt.util.tools.ToolBase.processArgs(ToolBase.java:238)   [错误]在   com.google.gwt.dev.ArgProcessorBase.processArgs(ArgProcessorBase.java:29)   [错误]:com.google.gwt.dev.DevMode.main(DevMode.java:310)

POM配置如下:

<configuration>
   <logLevel>WARN</logLevel>
   <runTarget>App.html</runTarget>
   <!--<extraJvmArgs>-Xmx1500m -XX:MaxPermSize=1000m -XX:-UseSplitVerifier</extraJvmArgs>-->
   <extraJvmArgs>-Xmx1500m -XX:CompileThreshold=7000 -XX:MaxPermSize=1000m -Derrai.jboss.home=${errai.jboss.home} -Derrai.jboss.javaagent.path=${settings.localRepository}/org/jboss/errai/errai-client-local-class-hider/${errai.devmode.version}/errai-client-local-class-hider-${errai.devmode.version}.jar</extraJvmArgs>
   <!--<soyc>false</soyc>-->
   <hostedWebapp>src/main/webapp</hostedWebapp>
   <!--<server>org.jboss.errai.cdi.server.gwt.JettyLauncher</server>-->
   <compileSourcesArtifacts>
      <compileSourcesArtifact>org.drools:guvnor-api</compileSourcesArtifact>
      <compileSourcesArtifact>org.drools:droolsjbpm-ide-common</compileSourcesArtifact>
      <compileSourcesArtifact>com.mycompany:models</compileSourcesArtifact>
   </compileSourcesArtifacts>
   <noServer>false</noServer>
   <server>org.jboss.errai.cdi.server.gwt.JBossLauncher</server>
   <disableCastChecking>true</disableCastChecking>
   <runTarget>webapp/App.html</runTarget>
   <!-- The GWT compiler must the correct JDT version -->
   <!-- drools-compiler has dependency on org.eclipse.jdt.core.compiler:ecj:jar:3.5.1:compile -->
   <gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath>
   <draftCompile>false</draftCompile>
</configuration>

这里可能缺少什么?

1 个答案:

答案 0 :(得分:1)

将此添加到您的pom.xml

<dependency>  
 <groupId>org.jboss.errai</groupId>  
 <artifactId>errai-cdi-jboss</artifactId>  
 <version>${errai.version}</version>  
</dependency>