Classloader Integration?
neil_g_avery Oct 17, 2005 3:44 PMAfter upgrading to more recent versions of jboss we have started to develop problems relating to classes being woven where the class definition is held in an application classloader.
Is it possible to get classloading in jboss to call onto the thread context classloader? i.e.
Class<?> type = Thread.currentThread().getContextClassLoader().loadClass(typeName);
as this would allow for classloader heirarchy integration. Alternatively can anyone suggest a way of integrating the javassist classpool/classloading/jboss-aop with application classloaders ?
Thanks for any help,
-Neil.
Below is a stacktrace:
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: javassist.NotFoundException: org.neo.swarm.dumchat.components.User
at org.jboss.aop.pointcut.Util.matchesClassExpr(Util.java:95)
at org.jboss.aop.pointcut.MethodMatcher.matchesClass(MethodMatcher.java:167)
at org.jboss.aop.pointcut.MethodMatcher.matches(MethodMatcher.java:72)
at org.jboss.aop.pointcut.MethodMatcher.visit(MethodMatcher.java:66)
at org.jboss.aop.pointcut.ast.ASTMethod.jjtAccept(ASTMethod.java:23)
at org.jboss.aop.pointcut.ExecutionMethodMatcher.visit(ExecutionMethodMatcher.java:43)
at org.jboss.aop.pointcut.ast.ASTExecution.jjtAccept(ASTExecution.java:17)
at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:103)
at org.jboss.aop.pointcut.ast.ASTSub.jjtAccept(ASTSub.java:17)
at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:83)
at org.jboss.aop.pointcut.ast.ASTBoolean.jjtAccept(ASTBoolean.java:17)
at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:73)
at org.jboss.aop.pointcut.MatcherHelper.matches(MatcherHelper.java:68)
at org.jboss.aop.pointcut.PointcutExpression.matchesExecution(PointcutExpression.java:104)
at org.jboss.aop.Advisor.resolveMethodPointcut(Advisor.java:588)
at org.jboss.aop.ClassAdvisor.createInterceptorChains(ClassAdvisor.java:581)
at org.jboss.aop.ClassAdvisor.access$300(ClassAdvisor.java:70)
at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:287)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:259)
at org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:484)
at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:472)
at org.neo.swarm.dumchat.components.DumUser.(DumUser.java)
... 61 more
Caused by: java.lang.RuntimeException: javassist.NotFoundException: org.neo.swarm.dumchat.components.User
at org.jboss.aop.annotation.PortableAnnotationElement.getInvisibleAnnotation(PortableAnnotationElement.java:325)
at org.jboss.aop.annotation.PortableAnnotationElement.getAnyAnnotation(PortableAnnotationElement.java:369)
at org.jboss.aop.pointcut.Util.subtypeOf(Util.java:139)
at org.jboss.aop.pointcut.Util.subtypeOf(Util.java:158)
at org.jboss.aop.pointcut.Util.matchesClassExpr(Util.java:82)
... 83 more
Caused by: javassist.NotFoundException: org.neo.swarm.dumchat.components.User
at javassist.ClassPool.get(ClassPool.java:374)
at org.jboss.aop.annotation.PortableAnnotationElement.getClassFile(PortableAnnotationElement.java:238)
at org.jboss.aop.annotation.PortableAnnotationElement.getInvisibleAnnotation(PortableAnnotationElement.java:316)
... 87 more