Hi - I ran into this, when trying to use the annotation scanner from within GlassFish 4.1.1.
java.lang.ClassCastException: org.apache.felix.framework.URLHandlersBundleURLConnection cannot be cast to java.net.JarURLConnection
at eu.infomas.annotation.AnnotationDetector.detect(AnnotationDetector.java:287)
I'm going to see if I can come up with a patch - unless you have already noticed this / have a patch pending release.