[aspectwerkz-dev] Problems with run-time weaving

"Thomas Motal (sent by Nabble.com)" <[email protected]> Tue, 31 Jan 2006 01:37:29 -0800 (PST)
Newsgroups gmane.comp.java.aspectwerkz.devel
Message-ID <[email protected]>
Hello!

I have a problem with the run-time weaving mechanism in aspectwerkz. I use some classes which are generated at runtime and want to use introduction to extend this implementations. But before that I wanted to test if the run-time weaving stuff works properly. Therefore I implemented an aspect which should help me to test if it works. 

I integrated the aspect in my project compiled and after that I get every time the following exception: 

java.lang.NoSuchMethodError: org.codehaus.aspectwerkz.hook.impl.ClassPreProcessorHelper.defineClass0Pre(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/nio/ByteBuffer;IILjava/security/ProtectionDomain;)

I have no clue where I made the mistake. Why does this exception occure? Is there a possibility to check which method exactly could not be executed? I had a look at the documentation and ... it is just a guess of course ... but I have not found an implementation which would match the above count of parameters. The required parameters for the defineClass0Pre method which I had found on http://aspectwerkz.codehaus.org/apidocs/org/codehaus/aspectwerkz/hook/impl/ClassPreProcessorHelper.html 
are defineClass0Pre(ClassLoader caller, String name, Object byteBuffer, int off, int len, ProtectionDomain pd). 

Perhaps I made a mistake in my aspect decleration file? I am using Java 5 and online-weaving with the default script which is used in the tutorials ($ASPECTWERKZ_HOME/bin/aspectwerkz +-javaagent:lib/aspectwerkz-jdk5-$VERSION.jar). All classes are initialized properly in the jvm (I checked it with the verbose option of the jvm).

Thanks in advance for your help! I hope someone has some suggestions how to solve this problem. 

Greets
Thomas

--
View this message in context: http://www.nabble.com/Problems-with-run-time-weaving-t1031702.html#a2676761
Sent from the AspectWerkz - Dev forum at Nabble.com.