-
Notifications
You must be signed in to change notification settings - Fork 4k
"Could not wire ResourceServerTokenServices" error #342
Comments
I really don't see the point in always registering the default one here. In my case it is adding the default and another created by the configurer, resulting in the duplication error: |
I agree it is not ideal yet, but the various token services might not always be the same instance of |
Hello, The problem is that when I use spring OAuth 2.0.5.Release along with The test to load the application context fails. The application works fine when I Run it. Only the tests fail. After Debugging I figured out the problem was with this part of the code
the condition I have created a test project on which the tests fail. It is a fork of the sparklr-boot project. @dsyer I would really appreciate any help on this. Or a even a work around :) Thanks in advance |
@gauravlanjekar that last change fixes your app, but possibly not the original problem (if not please open another ticket). |
I've had the exact same issue with @EnableTransactionManagement. I end up with [1] DefaultTokenServices (id=97) and [0] DefaultTokenServices$$EnhancerBySpringCGLIB$$765d443b (id=161). When removing the annotation, I end up with two beans but that are indeed equal. I have not found a solution to that problem yet. The two following lines create the two beans:
It's strange because I'm not overriding the tokenservices so only one is created through the createDefaultTokenServices() method and I verified that the consumerTokenServices() and getDefaultAuthorizationServerTokenServices() return the same instance but then only one of the bean is proxied, how is that? I'm using 2.0.6. |
same problem, though we have 3... (2.0.15), because we're defining our own. fixed it by overriding the bean name of one that it was looking for.
seems like a very fragile workaround though. |
We have been using 2.0.4.SNAPSHOT version, but since we upgraded to 2.0.5-RELEASE we are receiving this error:
Debugging, I found that the exception was caused by:
(code added on commit 45505c6)
The text was updated successfully, but these errors were encountered: