Hi all,

I've recently started working with OSGi and Apache Felix and have just spent
the afternoon running in circles trying to work out why some code works from
unit tests but not when run from Felix.

>From what I can gather, when classes are loaded up under felix their any run
time annotations present on the classes seemingly disappear.  The particular
code in question (or one of them) comes from within Hibernate:

if ( clazz.isAnnotationPresent( Entity.class ) ) {.....

When running directly from IDEA/TestNG isAnnotationPresent() returns true
for the class, but when I do a remote debug into the code running under
Felix, it returns false (getAnnotations() also returns an empty result).

Is this a known limitation/bug in the Felix classloaders or something I'm
likely to be doing on my side of the code somewhere?

Thanks in advance,
Mark

-- 
"It is easier to optimize correct code than to correct optimized code." --
Bill Harlan

Reply via email to