1

以下是我在尝试使用 Maven 运行 Errai 时看到的错误:

$mvn gwt:run-codeserver -Dgwt.bindAddress=0.0.0.0 -Dgwt.module=app.App

我的依赖中可能缺少什么?当我运行时:

$mvn gwt:run

没有问题,应用程序运行良好。

错误:

[INFO] Caused by: java.lang.NoClassDefFoundError: org.jboss.errai.marshalling.client.api.MarshallerFactoryImpl
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst.searchForTypeBySource(UnifyAst.java:983)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst.access$1500(UnifyAst.java:120)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleGwtCreate(UnifyAst.java:364)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:433)
[INFO]  at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:237)
[INFO]  at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:243)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO]  at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO]  ... 44 more
[INFO]       [ERROR] at MarshallerFramework.java(42): GWT.create(MarshallerFactory.class)
[INFO]          com.google.gwt.dev.jjs.ast.JMethodCall
[INFO]       [ERROR] at MarshallerFramework.java(42): (MarshallerFactory) GWT.create(MarshallerFactory.class)
[INFO]          com.google.gwt.dev.jjs.ast.JCastOperation
[INFO]       [ERROR] at MarshallerFramework.java(42): MarshallerFramework.marshallerFactory = (MarshallerFactory) GWT.create(MarshallerFactory.class)
[INFO]          com.google.gwt.dev.jjs.ast.JBinaryOperation
[INFO]       [ERROR] at MarshallerFramework.java(42): MarshallerFramework.marshallerFactory = (MarshallerFactory) GWT.create(MarshallerFactory.class)
[INFO]          com.google.gwt.dev.jjs.ast.JExpressionStatement
[INFO]       [ERROR] at MarshallerFramework.java(40): {
[INFO]   InitVotes.waitFor(MarshallerFramework.class);
[INFO]   MarshallerFramework.marshallerFactory = (MarshallerFactory) GWT.create(MarshallerFactory.class);
[INFO]   ParserFactory.registerParser(new MarshallerFramework$1());
[INFO]   InitVotes.voteFor(MarshallerFramework.class);
[INFO] }
[INFO]          com.google.gwt.dev.jjs.ast.JBlock
[INFO]       [ERROR] at MarshallerFramework.java(37): {
[INFO]   Object.$clinit();
[INFO]   {
[INFO]     InitVotes.waitFor(MarshallerFramework.class);
[INFO]     MarshallerFramework.marshallerFactory = (MarshallerFactory) GWT.create(MarshallerFactory.class);
[INFO]     ParserFactory.registerParser(new MarshallerFramework$1());
[INFO]     InitVotes.voteFor(MarshallerFramework.class);
[INFO]   }
[INFO] }
[INFO]          com.google.gwt.dev.jjs.ast.JBlock
[INFO]       [ERROR] at MarshallerFramework.java(37): {
[INFO]   Object.$clinit();
[INFO]   {
[INFO]     InitVotes.waitFor(MarshallerFramework.class);
[INFO]     MarshallerFramework.marshallerFactory = (MarshallerFactory) GWT.create(MarshallerFactory.class);
[INFO]     ParserFactory.registerParser(new MarshallerFramework$1());
[INFO]     InitVotes.voteFor(MarshallerFramework.class);
[INFO]   }
[INFO] }
[INFO]          com.google.gwt.dev.jjs.ast.JMethodBody
[INFO]       [ERROR] at MarshallerFramework.java(37): private static final void $clinit();
[INFO] 
[INFO]          com.google.gwt.dev.jjs.ast.JMethod
[ERROR] [INFO] [ERROR] Compiler returned false
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
[ERROR]     at com.google.gwt.dev.codeserver.Recompiler.compile(Recompiler.java:93)
[ERROR]     at com.google.gwt.dev.codeserver.ModuleState.<init>(ModuleState.java:54)
[ERROR]     at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:88)
[ERROR]     at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:51)
4

1 回答 1

0

您缺少 codeserver 的依赖项,即:com.google.gwt.gwt-codeserver

我个人在通过 Maven 运行它时遇到了问题。我改用 eclipse 运行:
NAME: GWT_CODESERVER
MAIN CLASS: com.google.gwt.dev.codeserver.CodeServer
ARGUMENTS: -workDir ../.codeserver -src src/main/java yourpackage.YourModule
VM ARGS: -Xms750m -Xmx750m -XX:PermSize=200M -XX:MaxPermSize=200M
CLASSPATH:(external jar) gwt-codeserver.jar

于 2013-06-14T10:48:48.117 回答