In AnnotationFactory only the current thread's context class loader is used to create annotation proxies. This fails if the context class loader is not set. I think we should implement some sort of fallback as we do in other places when retrieving class loaders.