[jboss-user] [JBoss AOP] - Re: Dynamic AOP and User-Defined Class Loader

shu_boston do-not-reply at jboss.com
Wed May 14 12:11:41 EDT 2008


Hi,

I tried what you said, and got a series of stack traces as below. Line 44 of test.Main.main (Main.java) invokes test.Test.print(), and the last stack trace came from RuntimeException thrown by JBoss AOP.

I'll try load-time weaving. Thanks for your advice!


  | java.lang.Exception
  | 	at test.MyClassLoader.getResource(MyClassLoader.java:30)
  | 	at org.jboss.aop.classpool.AOPClassPool.isLocalResource(AOPClassPool.java:164)
  | 	at org.jboss.aop.classpool.AOPClassPool.getCached(AOPClassPool.java:98)
  | 	at javassist.ClassPool.get0(ClassPool.java:453)
  | 	at javassist.ClassPool.get(ClassPool.java:433)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:401)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:287)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.access$100(JoinPointGenerator.java:77)
  | 	at org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1672)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:251)
  | 	at org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1018)
  | 	at test.Test$TestAdvisor.print_N_5551872189459734426(Test$TestAdvisor.java)
  | 	at test.Test.print(Unknown Source)
  | 	at main.Main.main(Main.java:44)
  | 
  | java.lang.Exception
  | 	at test.MyClassLoader.getResource(MyClassLoader.java:30)
  | 	at javassist.LoaderClassPath.find(LoaderClassPath.java:86)
  | 	at javassist.ClassPoolTail.find(ClassPoolTail.java:369)
  | 	at javassist.ClassPool.find(ClassPool.java:514)
  | 	at javassist.ClassPool.createCtClass(ClassPool.java:498)
  | 	at javassist.ClassPool.get0(ClassPool.java:464)
  | 	at javassist.ClassPool.get(ClassPool.java:433)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:401)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:287)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.access$100(JoinPointGenerator.java:77)
  | 	at org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1672)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:251)
  | 	at org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1018)
  | 	at test.Test$TestAdvisor.print_N_5551872189459734426(Test$TestAdvisor.java)
  | 	at test.Test.print(Unknown Source)
  | 	at main.Main.main(Main.java:44)
  | 
  | java.lang.Exception
  | 	at test.MyClassLoader.getResource(MyClassLoader.java:30)
  | 	at javassist.LoaderClassPath.find(LoaderClassPath.java:86)
  | 	at javassist.ClassPoolTail.find(ClassPoolTail.java:369)
  | 	at javassist.ClassPool.find(ClassPool.java:514)
  | 	at javassist.ClassPool.createCtClass(ClassPool.java:498)
  | 	at javassist.ClassPool.get0(ClassPool.java:464)
  | 	at javassist.ClassPool.get0(ClassPool.java:473)
  | 	at javassist.ClassPool.get(ClassPool.java:433)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:401)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:287)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.access$100(JoinPointGenerator.java:77)
  | 	at org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1672)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:251)
  | 	at org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1018)
  | 	at test.Test$TestAdvisor.print_N_5551872189459734426(Test$TestAdvisor.java)
  | 	at test.Test.print(Unknown Source)
  | 	at main.Main.main(Main.java:44)
  | 
  | java.lang.RuntimeException: Error generating joinpoint class for joinpoint Method[method=public void test.Test.print(test.Message)]
  | 	at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:321)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.access$100(JoinPointGenerator.java:77)
  | 	at org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1672)
  | 	at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:251)
  | 	at org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1018)
  | 	at test.Test$TestAdvisor.print_N_5551872189459734426(Test$TestAdvisor.java)
  | 	at test.Test.print(Unknown Source)
  | 	at main.Main.main(Main.java:44)
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150812#4150812

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150812



More information about the jboss-user mailing list