Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] ArrayIndexOutOfBoundsException when compiling plain Java code (no aspects yet)

Hi,

while test driving AspectJ on a commercial code base, I found another
problem. While compiling the code with AspectJ from within Eclipse works
well, I'm getting the following exception stack trace when compiling the
same code via Ant tasks:



--- AspectJ Properties ---
AspectJ Compiler 1.6.7.a built on Tuesday Jan 5, 2010 at 16:51:53 GMT
---- Dump Properties ---
Dump file: ajcore.20100415.122536.949.txt
Dump reason: java.lang.ArrayIndexOutOfBoundsException
Dump on exception: true
Dump at exit condition: abort
---- Exception Information ---
java.lang.ArrayIndexOutOfBoundsException: 1
	at
org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.MethodInfoWithParamet
erAnnotations.getParameterAnnotations(MethodInfoWithParameterAnnotations.jav
a:24)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.creat
eMethod(BinaryTypeBinding.java:433)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.creat
eMethods(BinaryTypeBinding.java:620)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.cache
PartsFrom(BinaryTypeBinding.java:327)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.creat
eBinaryTypeFrom(LookupEnvironment.java:620)
	at
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTy
peFrom(AjLookupEnvironment.java:1239)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.creat
eBinaryTypeFrom(LookupEnvironment.java:599)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:
276)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askFo
rType(LookupEnvironment.java:113)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBind
ing.resolve(UnresolvedReferenceBinding.java:49)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resol
veType(BinaryTypeBinding.java:133)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resol
veTypesFor(BinaryTypeBinding.java:956)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.getEx
actMethod(BinaryTypeBinding.java:760)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.getEx
actMethod(BinaryTypeBinding.java:779)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope.findExactMethod(S
cope.java:787)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.j
ava:2140)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveMethodB
inding(MessageSend.java:613)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(Me
ssageSend.java:465)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(Me
ssageSend.java:422)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.ReturnStatement.resolve(Re
turnStatement.java:216)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.Block.resolveUsing(Block.j
ava:115)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.TryStatement.resolve(TrySt
atement.java:799)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.
resolveStatements(AbstractMethodDeclaration.java:433)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveS
tatements(MethodDeclaration.java:196)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.
resolve(AbstractMethodDeclaration.java:404)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(Ty
peDeclaration.java:1109)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(Ty
peDeclaration.java:1188)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration
.resolve(CompilationUnitDeclaration.java:366)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java
:636)
	at
org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java
:392)
	at
org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjB
uildManager.java:1022)
	at
org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildMa
nager.java:268)
	at
org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildMana
ger.java:181)
	at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
	at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
	at org.aspectj.tools.ajc.Main.run(Main.java:355)
	at org.aspectj.tools.ajc.Main.runMain(Main.java:234)
	at org.aspectj.tools.ajc.Main.main(Main.java:84)
---- System Properties ---
java.runtime.name=Java(TM) SE Runtime Environment
sun.boot.library.path=C:\Program Files\Java\jdk1.6.0_17\jre\bin
java.vm.version=14.3-b01
java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
path.separator=;
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
file.encoding.pkg=sun.io
sun.java.launcher=SUN_STANDARD
user.country=US
sun.os.patch.level=Service Pack 2
java.vm.specification.name=Java Virtual Machine Specification
user.dir=f:\workspaces\AJ\java2server
java.runtime.version=1.6.0_17-b04
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs=C:\Program Files\Java\jdk1.6.0_17\jre\lib\endorsed
os.arch=amd64
java.io.tmpdir=C:\DOCUME~1\msr\LOCALS~1\Temp\1\
line.separator=
.....

I tried with AspectJ 1.6.8 first, which exhibited the same behavior, then
got 1.6.7a as that appears to be the version that Eclipse is using, but it
fails as above.

Any ideas or hints, or is there anything I can do to narrow down on the root
cause of the problem?

Regards,
Martin



Back to the top