OK, the problem is that the context class loader obtained by: Thread.currentThread().getContextClassLoader()
could not find org.testng...BeforeMethod. So you must add testng-5.8-jdk15.jar to the class path of the context class loader. Otherwise, you can add that jar file to the class path of the class loader obtained by: classPool.getClass().getClassLoader() Javassist also tries this class loader to load the annotation class. If either option does not work in your case, let me know. Let's think about an extension to the Javassist API. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4235399#4235399 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4235399 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user