I have a project that uses spring cloud + a few dependencies and spring-social. When I try to use the JdbcUsersConnectionRepository I get an internal server error:
There was an unexpected error (type=Internal Server Error, status=500).
Error creating bean with name 'scopedTarget.connectionRepository' defined in class path resource [org/springframework/social/config/annotation/SocialConfiguration.class]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class org.springframework.social.connect.jdbc.JdbcConnectionRepository]: Common causes of this problem include using a final class or a non-visible class; nested exception is org.springframework.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
Actual Behavior
JdbcConnectionRepository is package private, which leads to the error above, I don't know exactly what triggers this error in my case and not for others.
You can solve this in two ways:
copy the JdbcConnectionRepository and JdbcUsersConnectionRepository and make JdbcConnectionRepository public.
has the drawback that I have to change the global aop settings which lead to other funny problems, so I had to disable the netflix metrics.
Expected Behavior
No CGLib Exception ;-)
Maybe just make the JdbcConnectionRepository public so CGLib can do it's thing or refactor the JdbcUsersConnectionRepository so that the JdbcConnectionRepository is not used or in another way more CGLib friendly.
Configuration
Version
spring boot 1.5.3, Spring cloud dalston.sr1
1.1.4.RELEASE2.0.3.RELEASE
### Sample
I tried to create a sample but ran into other problems, maybe I can provide one later.
Summary
I have a project that uses spring cloud + a few dependencies and spring-social. When I try to use the JdbcUsersConnectionRepository I get an internal server error:
Actual Behavior
JdbcConnectionRepository is package private, which leads to the error above, I don't know exactly what triggers this error in my case and not for others. You can solve this in two ways:
copy the JdbcConnectionRepository and JdbcUsersConnectionRepository and make JdbcConnectionRepository public.
add these two property settings:
has the drawback that I have to change the global aop settings which lead to other funny problems, so I had to disable the netflix metrics.
Expected Behavior
No CGLib Exception ;-) Maybe just make the JdbcConnectionRepository public so CGLib can do it's thing or refactor the JdbcUsersConnectionRepository so that the JdbcConnectionRepository is not used or in another way more CGLib friendly.
Configuration
Version
spring boot 1.5.3, Spring cloud dalston.sr1