Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InternalCompilerException: Error constructing Java AST #9467

Closed
fpizzichillo opened this issue Nov 24, 2016 · 2 comments
Closed

InternalCompilerException: Error constructing Java AST #9467

fpizzichillo opened this issue Nov 24, 2016 · 2 comments
Labels

Comments

@fpizzichillo
Copy link

Hello folks, I updated from GWT 2.7.0 to 2.8.0 and GWT Maven plugin from 2.7.0 to 2.8.0 and got this error

[ERROR] com.google.gwt.dev.jjs.InternalCompilerException: Error constructing Java AST
[ERROR] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.translateException(GwtAstBuilder.java:3099)
[ERROR] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:352)
[ERROR] at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.traverse(AllocationExpression.java:670)
[ERROR] at org.eclipse.jdt.internal.compiler.ast.ReturnStatement.traverse(ReturnStatement.java:373)
[ERROR] at org.eclipse.jdt.internal.compiler.ast.Block.traverse(Block.java:141)
[ERROR] at org.eclipse.jdt.internal.compiler.ast.IfStatement.traverse(IfStatement.java:283)
[ERROR] at org.eclipse.jdt.internal.compiler.ast.IfStatement.traverse(IfStatement.java:283)
[ERROR] at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:347)
[ERROR] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1379)
[ERROR] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.process(GwtAstBuilder.java:3058)
[ERROR] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater$UnitProcessorImpl.process(CompilationStateBuilder.java:141)
[ERROR] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:384)
[ERROR] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:470)
[ERROR] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:985)
[ERROR] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:339)
[ERROR] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:580)
[ERROR] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:513)
[ERROR] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:499)
[ERROR] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:668)
[ERROR] at com.google.gwt.dev.codeserver.Recompiler.initWithoutPrecompile(Recompiler.java:200)
[ERROR] at com.google.gwt.dev.codeserver.Outbox.maybePrecompile(Outbox.java:82)
[ERROR] at com.google.gwt.dev.codeserver.Outbox.(Outbox.java:61)
[ERROR] at com.google.gwt.dev.codeserver.CodeServer.makeOutboxes(CodeServer.java:156)
[ERROR] at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:118)
[ERROR] at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:91)
[ERROR] at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:50)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at com.google.gwt.dev.shell.SuperDevListener$1.run(SuperDevListener.java:84)
[ERROR] Caused by: java.lang.NullPointerException
[ERROR] at com.google.gwt.dev.jjs.impl.ReferenceMapper.get(ReferenceMapper.java:99)
[ERROR] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.pushNewExpression(GwtAstBuilder.java:2642)
[ERROR] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:350)

Any hints?
Regards

@rluble
Copy link
Contributor

rluble commented Nov 26, 2016

I am guessing you have some old gwt jars in your classpath. The line numbers in the exception trace don't match up against 2.8.

@fpizzichillo
Copy link
Author

You're right @rluble . I had gwt-dev 2.7.0 on classpath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants