我正在使用gwt开发一个应用程序。 直到现在我使用gwt版本2.7。 但现在我决定升级到2.8版。 我从http://www.gwtproject.org/download.html下载了gwt 2.8 并取代了eclipse中的版本。 在我运行应用程序(在超级开发模式下)和应用程序编译期间,我收到此错误:
[ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:111)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:72)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(JDeclarationStatement.java:49)
at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)
at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:92)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:135)
at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:786)
at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:778)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1401)
at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:896)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1410)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1222)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:1140)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:255)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:255)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:202)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:143)
at com.google.gwt.dev.Compiler.compile(Compiler.java:204)
at com.google.gwt.dev.codeserver.Recompiler.doCompile(Recompiler.java:362)
at com.google.gwt.dev.codeserver.Recompiler.compile(Recompiler.java:175)
at com.google.gwt.dev.codeserver.Recompiler.recompile(Recompiler.java:134)
at com.google.gwt.dev.codeserver.Outbox.recompile(Outbox.java:135)
at com.google.gwt.dev.codeserver.JobRunner.recompile(JobRunner.java:113)
at com.google.gwt.dev.codeserver.JobRunner.access$000(JobRunner.java:37)
at com.google.gwt.dev.codeserver.JobRunner$2.run(JobRunner.java:90)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: com/google/gwt/core/ext/typeinfo/HasMetaData
at com.google.gwt.maps.jsio.rebind.JSWrapperGenerator.hasTag(JSWrapperGenerator.java:129)
at com.google.gwt.maps.jsio.rebind.TaskFactory$WrapperPolicy.shouldConstruct(TaskFactory.java:221)
at com.google.gwt.maps.jsio.rebind.TaskFactory.extractMethods(TaskFactory.java:324)
at com.google.gwt.maps.jsio.rebind.JSWrapperGenerator.generate(JSWrapperGenerator.java:314)
at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:745)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:103)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:262)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:251)
at com.google.gwt.dev.PrecompilationContextCreator$1.getAllPossibleRebindAnswers(PrecompilationContextCreator.java:86)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:519)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:487)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.maybeHandleMagicMethodCall(UnifyAst.java:415)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.visit(UnifyAst.java:402)
at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:265)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
... 46 more
Caused by: java.lang.ClassNotFoundException: com.google.gwt.core.ext.typeinfo.HasMetaData
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 64 more
[ERROR] at EventImpl.java(303): GWT.create(EventImpl.class)
com.google.gwt.dev.jjs.ast.JMethodCall
[ERROR] at EventImpl.java(303): (EventImpl) GWT.create(EventImpl.class)
com.google.gwt.dev.jjs.ast.JCastOperation
[ERROR] at EventImpl.java(303): final static EventImpl impl = (EventImpl) GWT.create(EventImpl.class)
com.google.gwt.dev.jjs.ast.JDeclarationStatement
[ERROR] at EventImpl.java(42): {
Object.$clinit();
final static EventImpl impl = (EventImpl) GWT.create(EventImpl.class);
}
com.google.gwt.dev.jjs.ast.JBlock
[ERROR] at EventImpl.java(42): {
Object.$clinit();
final static EventImpl impl = (EventImpl) GWT.create(EventImpl.class);
}
com.google.gwt.dev.jjs.ast.JMethodBody
[ERROR] at EventImpl.java(42): com.google.gwt.maps.client.impl.EventImpl.$clinit()V
com.google.gwt.dev.jjs.ast.JMethod
[ERROR] Compiler returned false
[WARN] recompile failed
[WARN] continuing to serve previous version
这是我的类路径
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 8 [1.8.0_121]"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/dropbox-core-sdk-V2.jar"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/GWT FX v0.5.0 MS 1.jar"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/gwt-charts-0.9.10.jar"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/gwt-maps.jar"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/gwt-visualization.jar"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/gwtbootstrap3-0.9.3.jar"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/gwtexporter-2.5.0-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/gwtphonegap-3.5.0.1.jar"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/jackson-annotations-2.7.0.jar"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/jackson-core-2.7.0.jar"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/jackson-databind-2.7.0.jar"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/jxl.jar"/>
<classpathentry kind="lib" path="/Users/gallavie/Documents/workspace/eclipseWorkspace/kod-koma/jars/mgwt-2.0.0.jar"/>
<classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER"/>
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry kind="output" path="war/WEB-INF/classes"/>
</classpath>
答案 0 :(得分:0)
该HasMetaData
界面为deprecated in 2009(八年年前!)和deleted in late 2014(两年前)。
这意味着com.google.gwt.maps.jsio
已经过时(很久以前是IIRC),现在需要更换。