Discussion:
[aspectj-users] Aspectj error:Internal compiler error: java.lang.RuntimeException: key not found in wovenClassFile at org.aspectj.weaver.WeaverStateInfo.findEndOfKey(WeaverStateInfo.java:408)
aryenneb
2013-04-16 21:13:23 UTC
Permalink
Hi,
I am trying to run my aspectj project. There is no error in the code.
However, when I try to run it, I get this message: Internal compiler error:
java.lang.RuntimeException: key not found in wovenClassFile at
org.aspectj.weaver.WeaverStateInfo.findEndOfKey(WeaverStateInfo.java:408)

Can anyone please explain this error to me and give a possible solution.

Thank you.
Aryenne



--
View this message in context: http://aspectj.2085585.n4.nabble.com/Aspectj-error-Internal-compiler-error-java-lang-RuntimeException-key-not-found-in-wovenClassFile-at--tp4650879.html
Sent from the AspectJ - users mailing list archive at Nabble.com.
Andy Clement
2013-04-17 00:23:13 UTC
Permalink
Are there any other tools in your build process that are modifying
bytecode? e.g. a coverage tool that instruments bytecode. That can damage
some expectations that AspectJ has about the bytecode format.

You could try running with -Xset:overWeaving=true but that is really only a
(possible) workaround. Are you on a recent version of AspectJ?

cheers,
Andy
Post by aryenneb
Hi,
I am trying to run my aspectj project. There is no error in the code.
java.lang.RuntimeException: key not found in wovenClassFile at
org.aspectj.weaver.WeaverStateInfo.findEndOfKey(WeaverStateInfo.java:408)
Can anyone please explain this error to me and give a possible solution.
Thank you.
Aryenne
--
http://aspectj.2085585.n4.nabble.com/Aspectj-error-Internal-compiler-error-java-lang-RuntimeException-key-not-found-in-wovenClassFile-at--tp4650879.html
Sent from the AspectJ - users mailing list archive at Nabble.com.
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
aryenneb
2013-04-17 19:20:00 UTC
Permalink
Thank you Andy. Your 'work around' got rid of the error message, but there
is still something going wrong with the weaving. Now I keep getting the
message that the main class is not loaded. Although I can see my main class
file in the folder. I will keep working on it.
Aryenne



--
View this message in context: http://aspectj.2085585.n4.nabble.com/Aspectj-error-Internal-compiler-error-java-lang-RuntimeException-key-not-found-in-wovenClassFile-at--tp4650879p4650886.html
Sent from the AspectJ - users mailing list archive at Nabble.com.
aryenneb
2013-04-27 16:10:54 UTC
Permalink
Hi,
Sorry guys for opening up this thread again. But my problem is still not
solved and I am trying to learn AspectJ. I am a real newbie so please
excuse the dumb questions. Ok, so my project works with a small number of
input files, with no problems. I do not need to use the compiler option
-Xset:overWeaving=true suggested; since when I do, the key conflict error
disappears, but nothing else works.

I just realized that the problem seems to be with the number of aspects that
have to be woven. When I have up to about 50 aspects, there is no problem,
the code runs correctly and all of the weaving occurs smoothly. However,
when I try to scale my project and have about 200 aspects that's when the
key conflict error pops up. Now these are small aspects. Before I was
generating fewer, but larger aspects and there were memory problems. By
reducing the aspect size, I do not have any more memory issues; but weaving
seems to be a problem.

My code compiles, but when I try to run it, I get the error: Aspectj
error:Internal compiler error: java.lang.RuntimeException: key not found in
wovenClassFile at
org.aspectj.weaver.WeaverStateInfo.findEndOfKey(WeaverStateInfo.java:408).
Adding the non-standard compiler option -Xset:overWeaving, gets rid of the
error but causes the code to work incorrectly. I am now wondering if there
is a limit to the number of aspects allowed in an AspectJ project? I have
been 'Googling' it for a while with no success.

Any suggestions will be greatly appreciated.
Thank you.
Aryenne



--
View this message in context: http://aspectj.2085585.n4.nabble.com/Aspectj-error-Internal-compiler-error-java-lang-RuntimeException-key-not-found-in-wovenClassFile-at--tp4650879p4650917.html
Sent from the AspectJ - users mailing list archive at Nabble.com.
Andy Clement
2013-04-27 16:30:50 UTC
Permalink
Hi,

There is no imposed limit on aspect weaving number, *but* you might hit the
limits that are not handled cleanly. For example method code size (which is
64k IIRC) if you weave in too many invocations of advice. I have never seen
this problem manifest as a key size problem though - if you blow the method
limit you should get an error about code size.

Although, I suppose it is possible that as a list of aspects is included in
one of the class file attributes it *could* be the case that if your
aspects have long names or are in a deep package hierarchy that the name
will blow one of the attribute size limits (also 64k), which *might*
manifest like this. Does it behave differently if you shorten the package
name or shorten the aspect names?

cheers,
Andy
Post by aryenneb
Hi,
Sorry guys for opening up this thread again. But my problem is still not
solved and I am trying to learn AspectJ. I am a real newbie so please
excuse the dumb questions. Ok, so my project works with a small number of
input files, with no problems. I do not need to use the compiler option
-Xset:overWeaving=true suggested; since when I do, the key conflict error
disappears, but nothing else works.
I just realized that the problem seems to be with the number of aspects that
have to be woven. When I have up to about 50 aspects, there is no problem,
the code runs correctly and all of the weaving occurs smoothly. However,
when I try to scale my project and have about 200 aspects that's when the
key conflict error pops up. Now these are small aspects. Before I was
generating fewer, but larger aspects and there were memory problems. By
reducing the aspect size, I do not have any more memory issues; but weaving
seems to be a problem.
My code compiles, but when I try to run it, I get the error: Aspectj
error:Internal compiler error: java.lang.RuntimeException: key not found in
wovenClassFile at
org.aspectj.weaver.WeaverStateInfo.findEndOfKey(WeaverStateInfo.java:408).
Adding the non-standard compiler option -Xset:overWeaving, gets rid of the
error but causes the code to work incorrectly. I am now wondering if there
is a limit to the number of aspects allowed in an AspectJ project? I have
been 'Googling' it for a while with no success.
Any suggestions will be greatly appreciated.
Thank you.
Aryenne
--
http://aspectj.2085585.n4.nabble.com/Aspectj-error-Internal-compiler-error-java-lang-RuntimeException-key-not-found-in-wovenClassFile-at--tp4650879p4650917.html
Sent from the AspectJ - users mailing list archive at Nabble.com.
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
aryenneb
2013-04-27 17:30:06 UTC
Permalink
Hi Andy,
Thanks again for responding. I tried using shorter file names (to less than
10 letters), but that did not help. I was wondering if there might be
something wrong with my Eclipse AspectJ options, so I tried using these:
-Xset:overWeaving=true,-Xset:minimalModel=true,typeDemotion=true along with
'incremental compiler optimizations' but nothing has helped so far.

The situation is still, that with more input files, using the
-Xset:overWeaving=true gives the wrong output. It is as if all of the
processing is just bypassed. Removing this option just continues to give
the 'missing key' error. However, a smaller number of input files works
correctly with the options ,-Xset:minimalModel=true,typeDemotion=true and
'incremental compiler optimizations'.

By the way I am using Eclipse Juno, AspectJ 1.7 and JDK 1.7.

Thanks for your help.
Aryenne



--
View this message in context: http://aspectj.2085585.n4.nabble.com/Aspectj-error-Internal-compiler-error-java-lang-RuntimeException-key-not-found-in-wovenClassFile-at--tp4650879p4650919.html
Sent from the AspectJ - users mailing list archive at Nabble.com.
Andy Clement
2013-04-29 16:55:44 UTC
Permalink
Hi,

You don't need to set minimal model and type demotion any more, those all
default to true now.

overweaving mode will ignore the key (as it doesn't need to go back to the
original form of the class file), so I'm not surprised to see the key
problem vanish when you turn it on, but I am surprised that is does nothing
after that.

Can you share the project with me?

cheers,
Andy
Post by aryenneb
Hi Andy,
Thanks again for responding. I tried using shorter file names (to less than
10 letters), but that did not help. I was wondering if there might be
-Xset:overWeaving=true,-Xset:minimalModel=true,typeDemotion=true along with
'incremental compiler optimizations' but nothing has helped so far.
The situation is still, that with more input files, using the
-Xset:overWeaving=true gives the wrong output. It is as if all of the
processing is just bypassed. Removing this option just continues to give
the 'missing key' error. However, a smaller number of input files works
correctly with the options ,-Xset:minimalModel=true,typeDemotion=true and
'incremental compiler optimizations'.
By the way I am using Eclipse Juno, AspectJ 1.7 and JDK 1.7.
Thanks for your help.
Aryenne
--
http://aspectj.2085585.n4.nabble.com/Aspectj-error-Internal-compiler-error-java-lang-RuntimeException-key-not-found-in-wovenClassFile-at--tp4650879p4650919.html
Sent from the AspectJ - users mailing list archive at Nabble.com.
_______________________________________________
aspectj-users mailing list
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Loading...