You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IllegalArgumentException when using AnnotationUtils.findAnnotation [SPR-13634] #18212
java.lang.IllegalArgumentException: interface org.springframework.messaging.simp.annotation.SendToUser is not visible from class loader
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:616)
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:592)
at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:244)
at java.lang.reflect.WeakCache.get(WeakCache.java:141)
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:455)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:738)
at org.springframework.core.annotation.AnnotationUtils.synthesizeAnnotation(AnnotationUtils.java:1280)
at org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:500)
at org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:561)
at org.springframework.messaging.handler.HandlerMethod.getMethodAnnotation(HandlerMethod.java:214)
at org.springframework.messaging.handler.HandlerMethod$HandlerMethodParameter.getMethodAnnotation(HandlerMethod.java:275)
at org.springframework.messaging.simp.annotation.support.SendToMethodReturnValueHandler.supportsReturnType(SendToMethodReturnValueHandler.java:136)
AnnotationUtils was using the default ClassLoader for the creation of synthesized annotation proxies, which depends on the thread-context ClassLoader or on all jars sharing the same framework ClassLoader. The more reliable choice is to use the ClassLoader that the original annotation has been declared in, which we're doing as of 4.2.3 now.
Activity
spring-projects-issues commentedon Nov 2, 2015
Rossen Stoyanchev commented
Link to original report:
rstoyanchev/spring-websocket-portfolio#60
spring-projects-issues commentedon Nov 2, 2015
Juergen Hoeller commented
AnnotationUtilswas using the defaultClassLoaderfor the creation of synthesized annotation proxies, which depends on the thread-contextClassLoaderor on all jars sharing the same frameworkClassLoader. The more reliable choice is to use theClassLoaderthat the original annotation has been declared in, which we're doing as of 4.2.3 now.Juergen