Error in GWT compilation
I am compiling my project in GWT with any target . I get the following error on Linux and Solaris . I can compile the Samples which came with GWT but get this error .
I am using GWT 2.0.3 and JDK 1.6.17
[java] Compiling module com.calix.ex1.webgui.ex1embeddedclient.Ex1EmbeddedGui
[java] [ERROR] Unexpected
[java] java.lang.NullPointerException
[java] at com.google.gwt.dev.javac.JdtCompiler$FindTypesInCud.visit(JdtCompiler.java:17开发者_运维问答9)
[java] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1253)
[java] at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.traverse(QualifiedAllocationExpression.java:478)
[java] at org.eclipse.jdt.internal.compiler.ast.ReturnStatement.traverse(ReturnStatement.java:262)
[java] at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:239)
[java] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1350)
[java] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1223)
[java] at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:687)
[java] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:158)
[java] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
[java] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:467)
[java] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:142)
[java] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:281)
[java] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:182)
[java] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:280)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:502)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:414)
[java] at com.google.gwt.dev.Compiler.run(Compiler.java:201)
[java] at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
[java] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
[java] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
[java] at com.google.gwt.dev.Compiler.main(Compiler.java:159)
Maybe an answer here : GWT Issue 4552
If you neglect to add an import for an anonymous class like so:
FocusPanel dropdown = new FocusPanel();
dropdown.addClickHandler(new BloggiDiBlook() {});
where class BloggiDiBlook is neither in the enclosing class's package, nor imported in the enclosing class's .java file. There ought to be an appropriate "Class not found" or similar compiler error. Instead, the JDT Compiler throws the following NullPointerException
精彩评论