[jboss-user] [Javassist] - Annotation checking in OSGi environment causes troubles

Felix Mayerhuber do-not-reply at jboss.com
Wed Mar 28 04:41:24 EDT 2012


Felix Mayerhuber [https://community.jboss.org/people/arcticwolf] created the discussion

"Annotation checking in OSGi environment causes troubles"

To view the discussion, visit: https://community.jboss.org/message/726848#726848

--------------------------------------------------------------
Hi,

First I want to say that javassist is a really great bytemanipulation framework and it works really really good. I use javassist in an OSGi environment to do some class enhancements in runtime with weaving hooks.
To get things working, especially with the ClassPool, I added to the ClassPool an own ClassLoader. Everything works fine except for two methods, both concerning annotations, namely:
"hasAnnotation" and "getAnnotation". If I use them, I always get ClassNotFoundExceptions. My workaround now is that do exactly the same like you do in javassist lib in my code to analyse the class and check for annotations. In that way it works. 
So I assume that this both methods don't use the added ClassLoader. Could that be?

Javassist version: 3.12.1.GA

Kind regards
Felix
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/726848#726848]

Start a new discussion in Javassist at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2062]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120328/db2468ac/attachment.html 


More information about the jboss-user mailing list