tags:

views:

64

answers:

1

Hi ,

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:179)
 [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)
+1  A: 

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

DrDro
Thanks for your help , the error looks same , but how will javac can compile this kind of missing imports ? I will search through the code to find if we have such cases .
Vijay
I foundout the problem . Even enabling the trace of GWT compiler did not help so i just took the jdt compiler code and debugged using it. Anyway the problem was we had two inner classes . And one class referring another from the debugger i could see the type it was trying to load. thanks for your help !!
Vijay