Closed arthurc closed 7 years ago
@arthurc Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Hi, I can confirm the issue. Added spring social stuff into my application and was getting the following error on /connect/facebook:
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
Tried to exclude dependencies of the project one by one and the issue was resolved by removing devtools from classpath. Bring it back and the issue reproduces again.
I was lucky enough to find this pull request. How long are you going to wait for the contributor to sign the license? (ugh, 4th of November and still not merged).
@arthurc Thank you for signing the Contributor License Agreement!
Sorry, missed the agreement. Fixed now
I am still seeing this in version 1.4.5.RELEASE does anyone know which version this was fixed or point me to how I can find that out. Thanks
It works for me in 2.0.0.M1.
On Tue, Mar 14, 2017, 23:56 bshinyambala notifications@github.com wrote:
I am still seeing this in version 1.4.5.RELEASE does anyone know which version this was fixed or point me to how I can find that out. Thanks
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-social/pull/215#issuecomment-286557419, or mute the thread https://github.com/notifications/unsubscribe-auth/AB35eSzRnM-luhs8tAcqyNjpSlIDTxgjks5rlv8JgaJpZM4Ko-rj .
JdbcConnectionRepository uses @ Transactional and thus creates a proxy using the restart class loader in Spring Boot DevTools. Because JdbcConnectionRepository is package private an exception is raised upon creation:
If you want to use Spring Social with the JdbcConnectionRepository implementation, I see no other way than to make the ConnectionRepository implementations public. One can also argue that they should be public as they are exposed as public beans in the
org.springframework.social.config.annotation.SocialConfiguration
configuration class (the connectionRepository bean).The InMemoryConnectionRepository does not create any proxies and thus does not suffer from the same issue, but I though that it should also be public for consistency.