kaleidos / grails-security-stateless

Grails plugin to implement stateless authentication using Spring Security
Apache License 2.0
17 stars 8 forks source link

Error creating bean with name 'statelessInvalidateTokenFilter' #33

Closed jittarao closed 2 years ago

jittarao commented 9 years ago

Have done exactly as stated in the documentation and yet see the below errors. Any help is much appreciated.

Error |
2015-08-14 23:52:58,674 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - Error initializing the application: Error creating bean with name 'statelessInvalidateTokenFilter': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.lang.String' for property 'endpointUrl'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'endpointUrl': no matching editors or conversion strategy found
Message: Error creating bean with name 'statelessInvalidateTokenFilter': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.lang.String' for property 'endpointUrl'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'endpointUrl': no matching editors or conversion strategy found
    Line | Method
->>  266 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
Caused by ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.lang.String' for property 'endpointUrl'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'endpointUrl': no matching editors or conversion strategy found
->>  266 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
Caused by IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'endpointUrl': no matching editors or conversion strategy found
->>  266 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
Error |
Forked Grails VM exited with errorJava HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

Thanks

pabloalba commented 9 years ago

Hi.

By the error: "Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.lang.String' for property 'endpointUrl'" it seems like the configuration for the property endpointUrl is incorrect. How have you defined that property?

Un saludo:

Pablo Alba Chao

On Fri, Aug 14, 2015 at 8:25 PM, Raghavender Rao Jitta < notifications@github.com> wrote:

Have done exactly as stated in the documentation and yet see the below errors. Any help is much appreciated.

Error | 2015-08-14 23:52:58,674 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing the application: Error creating bean with name 'statelessInvalidateTokenFilter': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.lang.String' for property 'endpointUrl'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'endpointUrl': no matching editors or conversion strategy found Message: Error creating bean with name 'statelessInvalidateTokenFilter': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.lang.String' for property 'endpointUrl'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'endpointUrl': no matching editors or conversion strategy found Line | Method ->> 266 | run in java.util.concurrent.FutureTask


| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor | 617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker ^ 745 | run in java.lang.Thread Caused by ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.lang.String' for property 'endpointUrl'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'endpointUrl': no matching editors or conversion strategy found ->> 266 | run in java.util.concurrent.FutureTask


| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor | 617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker ^ 745 | run in java.lang.Thread Caused by IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'endpointUrl': no matching editors or conversion strategy found ->> 266 | run in java.util.concurrent.FutureTask


| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor | 617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker ^ 745 | run in java.lang.Thread Error | Forked Grails VM exited with errorJava HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

Thanks

— Reply to this email directly or view it on GitHub https://github.com/kaleidos/grails-security-stateless/issues/33.

jittarao commented 8 years ago

Fixed this error by adding a .toString() to line 113 in SecurityStatelessGrailsPlugin. The line should be endpointUrl = conf.springsecurity.invalidate.endpointUrl.toString()

jittarao commented 8 years ago

The server started without any errors. Now, when I try to login, I get a token in JSON. Does the plugin not automatically create a cookie and send it for each request? Totally lost here. Any help is much appreciated.

pabloalba commented 8 years ago

Hi.

Can you commit a sample project to github with the problem? Without see the actual code, it is hard to guess the problem...

Un saludo:

Pablo Alba Chao

On Tue, Dec 8, 2015 at 10:47 AM, Raghavender Rao Jitta < notifications@github.com> wrote:

The server started without any errors. I can see the old login page and now it doesn't work. When I visit /stateless/login, I get a 405 error.

Any suggestions?

— Reply to this email directly or view it on GitHub https://github.com/kaleidos/grails-security-stateless/issues/33#issuecomment-162833441 .