gpt4 book ai didi

java - 在 SuperDevMode (Maven) 中运行时出错

转载 作者:行者123 更新时间:2023-12-01 04:40:00 26 4
gpt4 key购买 nike

下面是我尝试使用 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)

最佳答案

您缺少代码服务器的依赖项,即:com.google.gwt.gwt-codeserver

我个人在通过 Maven 运行它时遇到了问题。我使用 eclipse run 代替:
名称:GWT_CODESERVER
主类:com.google.gwt.dev.codeserver.CodeServer
参数:-workDir ../.codeserver -src src/main/java yourpackage.YourModule
虚拟机参数:-Xms750m -Xmx750m -XX:PermSize=200M -XX:MaxPermSize=200M
CLASSPATH:(外部 jar)gwt-codeserver.jar

关于java - 在 SuperDevMode (Maven) 中运行时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16709327/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com