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
I cannot get kryo to work, I get this exception when hitting any page:
Message: Cannot cast object 'com.esotericsoftware.shaded.org.objenesis.strategy.StdInstantiatorStrategy@3f0f64c2' with class 'com.esotericsoftware.shaded.org.objenesis.strategy.StdInstantiatorStrategy' to class 'org.objenesis.strategy.InstantiatorStrategy'
Line | Method
->> 154 | getConfiguredKryoSerializer in com.granicus.grails.plugins.cookiesession.KryoSessionSerializer
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 70 | serialize in ''
| 369 | serializeSession . . . . . in com.granicus.grails.plugins.cookiesession.CookieSessionRepository
| 354 | saveSession in ''
| 95 | saveSession . . . . . . . . in com.granicus.grails.plugins.cookiesession.SessionRepositoryResponseWrapper
| 136 | sendRedirect in ''
| 62 | commence . . . . . . . . . in grails.plugin.springsecurity.web.authentication.AjaxAwareAuthenticationEntryPoint
| 53 | doFilter in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 49 | doFilter . . . . . . . . . in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
| 82 | doFilter in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 84 | doFilterInternal . . . . . in com.granicus.grails.plugins.cookiesession.CookieSessionFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
I'm using Grails 2.4.4, cookie-session 2.0.17, the latest Kryo 3.0.1, spring-security-core 2.0-RC4 and the relevant cookie setting. I can run more tests to pinpoint the issue, or I can provide a minimal Grails app that shows the problem, if needed. I also tried the kryo-shaded release, same error.
Am I doing something wrong?
PS: Thank you for your work on cookie-session. I cannot believe this is not the default in the J2EE world! People are putting session data in the DB, in memcached, in MongoDB… it's crazy! You may want to put a prominent link to some article about the fundamental REST philosophy of the web, such as this great one, that clearly shows that application state belongs to the client, as opposed to resource state.
The text was updated successfully, but these errors were encountered:
So the issue is that the latest version of kryo and the supplemental kryo-serializer package aren't compatible - namespaces changed and a few other things from what I can tell. I tried to upgrade kryo recently and ran into all sorts of trouble. I'll try again once everything is worked out between the two.
In any case, you don't need to import the kryo package directly - the cookie-session plugin brings in the appropriate version to your project. Remove your kryo dependency and it should work fine... you may need to clean your package to get rid of remnants of the latest version of kryo by deleting the target directory in your project.
Try this and let me know how it goes.
FYI - kryo is a pretty good serializer, but it isn't perfect and I've run into many objects (flash object name one) that aren't serializable by simple field inspection and have necessitated writing custom object serializers. In general though, out of the box grails and spring security should work fine.
I cannot get kryo to work, I get this exception when hitting any page:
I'm using Grails 2.4.4, cookie-session 2.0.17, the latest Kryo 3.0.1, spring-security-core 2.0-RC4 and the relevant cookie setting. I can run more tests to pinpoint the issue, or I can provide a minimal Grails app that shows the problem, if needed. I also tried the kryo-shaded release, same error.
Am I doing something wrong?
PS: Thank you for your work on cookie-session. I cannot believe this is not the default in the J2EE world! People are putting session data in the DB, in memcached, in MongoDB… it's crazy! You may want to put a prominent link to some article about the fundamental REST philosophy of the web, such as this great one, that clearly shows that application state belongs to the client, as opposed to resource state.
The text was updated successfully, but these errors were encountered: