Bug 209011 - NPE in compiler run
Summary: NPE in compiler run
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.6.0 M1   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-07 07:42 EST by Markus Wolf CLA
Modified: 2008-01-22 12:27 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Wolf CLA 2007-11-07 07:42:13 EST
During compiling a class I'll get this exception:

java.lang.NullPointerException
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.getMethodsBase(ParameterizedTypeBinding.java:471)
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.getMethods(ParameterizedTypeBinding.java:1041)
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope.findMethod(Scope.java:1060)
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2165)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveMethodBinding(MessageSend.java:480)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:347)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.CastExpression.resolveType(CastExpression.java:380)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:326)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:326)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:199)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:422)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:178)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:400)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1088)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1137)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:305)
at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:519)
at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:329)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:974)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:262)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:214)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:185)
at org.aspectj.ajde.core.internal.AjdeCoreBuildManager.doBuild(AjdeCoreBuildManager.java:88)
at org.aspectj.ajde.core.AjCompiler.build(AjCompiler.java:96)
at org.eclipse.ajdt.core.builder.AJBuilder.build(AJBuilder.java:198)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:624)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:166)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:197)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:246)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:249)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:214)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:353)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:494)
at org.eclipse.core.internal.resources.Project.build(Project.java:75)
Comment 1 Matt Chapman CLA 2007-11-07 08:00:09 EST
passing over to compiler
Comment 2 Andrew Clement CLA 2007-11-07 08:13:51 EST
are you able to tell me anything about the class?  Is it pure java? is it generic?
Comment 3 Markus Wolf CLA 2007-11-07 09:08:43 EST
It is pure java and would compile with 1.4 (no generics, no enums, ...)
I could not post the whole class here, I'm sorry. Is there a way to get more debug output from ajdt than the thread dump?
Comment 4 Andrew Clement CLA 2007-11-07 09:23:28 EST
If you are able to check that it compiles under Eclipse 3.2 (or later) as pure java than I will mark this as a bug in AspectJ because we are currently based on the 3.1 compiler and so it will be fixed when we upgrade.

There are no extra diagnostics I could ask you to turn on - the only further thing you could do is try and distill the essence of your type into a simple example class that you could append on here that shows the problem.
Comment 5 Markus Wolf CLA 2007-11-07 09:59:39 EST
It is pure java and compile without AspectJ with JRE 5 Execution Environment in Eclipse 3.3.
This is our current environment.

One thing to mention is that the class has parent classes from Apache Cocoon. But that is a pre-java5 version of Cocoon.
Comment 6 Andrew Clement CLA 2007-11-07 11:28:23 EST
Ok - this will then be fixed in the first milestone of 1.6.0M1 when we upgrade to a newer version of the Eclipse Compiler.
Comment 7 Andrew Clement CLA 2008-01-22 12:27:34 EST
This should be fixed in the latest AJDT 1.5.2 dev builds for Eclipse 3.3 - available from the dev download site and update site:

http://www.eclipse.org/ajdt/downloads/
http://download.eclipse.org/tools/ajdt/33/dev/update

This includes AspectJ1.6.0m1