Is there something with the JDK Version? I tried this on jdk1.4.1_02 and got the error i reported earlier
If i set the JAVA_HOME to be jdk1.3.1_07, id ont get any errors but the interceptors dont get applied. Is there a specific VM thats suited for this?
Has anyone hd success running this? I definitely cannot run it with JDK1.4.1_02.
As for JDK1.3, the java.system.class.loader cannot be used(not a standard property), so it doesnt use this classloader but uses the standard Classloader and runs my code without running thru the interceptor
I keep getting the same problem on WindowsXP, JDK 1.4.2. If I don't set the classloader to the JBoss-specific classloader, I see "Hello World!" printed, but if I try to use the stand alone JBoss AOP class loader, I keep getting NoClassDefFound.
Really strange. It seems as though it would easy to run the examples, but it's been a pain in my a$$.
This are the steps carried out in eclipse today and it work fine.
1 Define a new project in my case aop
2 Define the source to the directory of the source based on your installation of the examples in my case example3
3 Add the following to the java build path
4 My j2jdk was 1.4.2
5 Add the following to launch you Pojo class VM arguments option
6 Then run the progarm
Hope this helps
I tried the same thing except (1) Used IDEA (Which shouldnt matter) and
2) used jdk1.4.1_01, 1.4.1_02 and 1.4.1_03
If possible, can you try if it works on 1.4.1? Has someone made this work on 1.4.1?
Also did you put the classes in a package or did u just use the source from the download? I hvae tried bothways and the result is the same - NoClssDefFound
Ill try it on 1.4.2
That doesn't work for me. I also use eclipse (2.1) and jdk 1.4.2.
Following those instruction, there is no attempt to load the class POJO.
But if I change the arguments to the vm (step 5) like this:
Then I get a class not fond on org.jboss.aop.standalone.SystemClassLoader
The only way I was able to resolve that. Was to unpack javassist.jar, jboss-common.jar and jboss-aop.jar
Into my bin directory for the project in eclipse.
(I put my compiled classes in a bin directory under my project i.e. project-directory/bin)
Now it works, not nice but atleast now I can play around JBoss AOP.
good luck, Michael
I'm sorry I forgot to mention 2 important steps
the classloader I use is :
Not the one mentioned in the documentation (i have downlaoded the standalone version for JBoss AOP)
Also I have to set the working directory in eclipse to
my bin directory
I think that's it.
This is the setup on windows that work without an IDE
This is the content of the Run.bat
d:\j2sdk1.4.2\bin\javac -classpath %CPATH% -g *.java
d:\j2sdk1.4.2\bin\java -classpath %CPATH% -Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader POJO
The content of the example3 in my case is all the example3 source , extra jar files(jboss-common.jar;jboss-aop.jar;javassist.jar) and a subdirectory Meta-inf which contains jboss-aop.xml
Adeyemi E Adegbile
Check that you are running the correct example. There are currently three examples
Each have different configuration and code.
I have just retested all the examples and they are working as I described earlier.
Based on the output you described, it seems as if you are running example one.
Adeyemi E Adegbile
I've found that JBoss AOP requires trove.jar to be present on classpath. Otherwise it throws noclassfound error. After adding it to classpath all examples start working.
Yeah, thats it. I just got it working, Thanks guest55