Bug 35066 - ResolvedTypeMunger.java:53 throws NullPointerException on 1.1RC1
Summary: ResolvedTypeMunger.java:53 throws NullPointerException on 1.1RC1
Status: RESOLVED DUPLICATE of bug 35688
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Jim Hugunin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 36388 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-14 16:51 EST by Christian Seifert CLA
Modified: 2003-05-01 16:08 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Seifert CLA 2003-03-14 16:51:23 EST
ResolvedTypeMunger.java:53 throws NullPointerException on 1.1RC1 when I try to 
compile our code.
Here the entire output:
[seifc@seadell3 seifc]$ ajc -cp $CLASSPATH -sourceroots ~/dev/guo/src/java/ -d 
~/dev/guo/build/preprocess/ 
can't find type javax.mail.1
java.lang.NullPointerException
	at org.aspectj.weaver.ResolvedTypeMunger.matches
(ResolvedTypeMunger.java:53)
	at org.aspectj.weaver.ConcreteTypeMunger.matches
(ConcreteTypeMunger.java:52)
	at 
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDecl
arations(AjLookupEnvironment.java:167)
	at 
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDecl
arations(AjLookupEnvironment.java:151)
	at 
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doPendingWeaves
(AjLookupEnvironment.java:112)
	at 
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindin
gs(AjLookupEnvironment.java:98)
	at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile
(Compiler.java:312)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:326)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile
(AbstractImageBuilder.java:232)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile
(AbstractImageBuilder.java:171)
	at 
org.aspectj.ajdt.internal.core.builder.AjBuildManager$BatchBuilder.run
(AjBuildManager.java:655)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild
(AjBuildManager.java:139)
	at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:55)
	at org.aspectj.tools.ajc.Main.run(Main.java:216)
	at org.aspectj.tools.ajc.Main.runMain(Main.java:155)
	at org.aspectj.tools.ajc.Main.main(Main.java:72)
/home/seifc/dev_branches/3_19/guo/src/java/gallup/gox/struts/GOWriteTag.java:0 
Internal compiler error
java.lang.NullPointerException
	at org.aspectj.weaver.ResolvedTypeMunger.matches
(ResolvedTypeMunger.java:53)
	at org.aspectj.weaver.ConcreteTypeMunger.matches
(ConcreteTypeMunger.java:52)
	at 
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDecl
arations(AjLookupEnvironment.java:167)
	at 
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDecl
arations(AjLookupEnvironment.java:151)
	at 
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doPendingWeaves
(AjLookupEnvironment.java:112)
	at 
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindin
gs(AjLookupEnvironment.java:98)
	at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile
(Compiler.java:312)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:326)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile
(AbstractImageBuilder.java:232)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile
(AbstractImageBuilder.java:171)
	at 
org.aspectj.ajdt.internal.core.builder.AjBuildManager$BatchBuilder.run
(AjBuildManager.java:655)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild
(AjBuildManager.java:139)
	at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:55)
	at org.aspectj.tools.ajc.Main.run(Main.java:216)
	at org.aspectj.tools.ajc.Main.runMain(Main.java:155)
	at org.aspectj.tools.ajc.Main.main(Main.java:72)


!! no source information available !!
ABORT
Exception thrown from AspectJ 1.1rc1

This might be logged as a bug already -- find current bugs at
  http://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Compiler

Bugs for exceptions thrown have titles File:line from the top stack, 
e.g., "SomeFile.java:243"

If you don't find the exception below in a bug, please add a new bug
at http://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ
To make the bug a priority, please include a test program
that can reproduce this exception.
null
java.lang.NullPointerException
	at org.aspectj.weaver.ResolvedTypeMunger.matches
(ResolvedTypeMunger.java:53)
	at org.aspectj.weaver.ConcreteTypeMunger.matches
(ConcreteTypeMunger.java:52)
	at 
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDecl
arations(AjLookupEnvironment.java:167)
	at 
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDecl
arations(AjLookupEnvironment.java:151)
	at 
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.doPendingWeaves
(AjLookupEnvironment.java:112)
	at 
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindin
gs(AjLookupEnvironment.java:98)
	at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile
(Compiler.java:312)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:326)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile
(AbstractImageBuilder.java:232)
	at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile
(AbstractImageBuilder.java:171)
	at 
org.aspectj.ajdt.internal.core.builder.AjBuildManager$BatchBuilder.run
(AjBuildManager.java:655)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild
(AjBuildManager.java:139)
	at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:55)
	at org.aspectj.tools.ajc.Main.run(Main.java:216)
	at org.aspectj.tools.ajc.Main.runMain(Main.java:155)
	at org.aspectj.tools.ajc.Main.main(Main.java:72)


1 fail|abort, 2 errors
[seifc@seadell3 seifc]$ ll
Comment 1 Jim Hugunin CLA 2003-03-24 12:43:34 EST
I need a little more information to track this down.  If you can reduce this 
to a small self-contained test case that would provide the most help, and 
virtually guarantee that the bug will be fixed promptly.
Comment 2 Christian Seifert CLA 2003-03-24 12:56:34 EST
I can try...

I tried to compile other simple code on my box and everything worked fine. 
However, the code I am getting the failure on contains 1500 class files. This 
will be a bit difficult to track down.

Now, the line number in the error msg is pretty specific. Can you point me into 
a direction to check into?!

Thanks -
Christian
Comment 3 Jim Hugunin CLA 2003-03-24 13:03:14 EST
This error could show up for many, many reasons.  perthis, pertarget, 
percflow, privileged, cflow, and inter-type declarations are also possible 
causes.  How many aspects do you have?  Is it a small number you could send?  
The "can't find type 'javax.mail.1'" is a bit of a concern.  Code that is 
trying to do something with the javax.mail package would also be a likely 
candidate.

Another thing that would help would be to know what verion of ajc this code is 
successfully compiled with.  Does it work on 1.1b4 (which would make this an 
obvious regression) or does it work on 1.0.6 which would mean it could be a 
feature that was just never implemented correctly in the new design.

-Jim
Comment 4 Christian Seifert CLA 2003-03-24 13:06:20 EST
Let me go about deleting our aspects (we have about 20) one by one and see 
whose is the culprit. I'll try to get back to you by tonite...

The code as is does compile with 1.0.6 just fine.
Comment 5 Christian Seifert CLA 2003-04-08 13:19:02 EDT
here some more info. 
I deleted all my aspects and tried to compile. The error msg about can't find 
type javax.mail.1 still exists followed by lines that state "compiling 
classname.java" - however no class files are generated...
Comment 6 Jim Hugunin CLA 2003-04-10 17:37:07 EDT
I'm marking this as a duplicate of a similar bug that I just resolved.  I hope 
this is accurate since this bug has been so difficult to turn into an isolated 
test case.  Please try to verify this fix works with you either with the 
latest source build of the compiler or with the preview release for 1.1rc2.

*** This bug has been marked as a duplicate of 35688 ***
Comment 7 Jim Hugunin CLA 2003-05-01 16:08:38 EDT
*** Bug 36388 has been marked as a duplicate of this bug. ***