benlucchesi / grails-cookie-session

cookie sessions for grails applications
28 stars 32 forks source link

Plugin does not work with grails 2.4.1+ (latest) #43

Closed anthony-foulfoin closed 9 years ago

anthony-foulfoin commented 10 years ago

When using the latest grails sdk, cookie-session does not longer compile :

KryoSessionSerializer.groovy: 40: unable to resolve class org.codehaus.groovy.grails.commons.ConfigurationHolder

It seems that a class used by the plugin has been removed by grails.

benlucchesi commented 10 years ago

Thanks for the notice... I'll get this updated ASAP.

Ben Lucchesi | Chief Software Architect Granicus, Inc.work: 415.357.3618 x1300 [X]http://www.granicus.com/ Follow Us! Bloghttp://blog.granicus.com/ | Twitterhttp://twitter.com/granicus | Facebookhttp://www.facebook.com/pages/Granicus/134633056573520


From: tony75 [notifications@github.com] Sent: Monday, June 23, 2014 6:58 AM To: benlucchesi/grails-cookie-session-v2 Subject: [grails-cookie-session-v2] Plugin does not work with grails 2.4.1+ (latest) (#43)

When using the latest grails sdk, cookie-session does not longer compile :

KryoSessionSerializer.groovy: 40: unable to resolve class org.codehaus.groovy.grails.commons.ConfigurationHolder

It seems that a class used by the plugin has been removed by grails.

— Reply to this email directly or view it on GitHubhttps://github.com/benlucchesi/grails-cookie-session-v2/issues/43.

bioform commented 10 years ago

+1

danhore commented 10 years ago

+1

shiftregister-vg commented 10 years ago

+1

I did some poking around to try and get it working but only got it to about 95% functional (had issues deserializing)

benlucchesi commented 10 years ago

hey guys - I'm using the plugin with grails 2.4.2 without any problems in the plugin itself.

As for serialization issues, if you put data into the session and then update the encryption settings, any session stored with the previous encryption settings won't be deserializable. Same thing happens if you put an object in your session and then later get rid of that class from your application. Does this explain either of the issues you're having? At some point, I'm going to update the plug-in to discard cookie-sessions that its can't deserialize.

finally, for some reason the grails website's plugin page says the latest version is 2.0.15, but its actually 2.0.16. This build removes references to the ConfigurationHolder object which has been deprecated (the first email in the chain). Please update to this version and see if it improves the situation.

If not, please provide a detailed explanation of what's breaking and how to reproduce. Sample code is great, preferably in a repo somewhere.

Also, I didn't reply to the emails with just "+1" in them because they were forwarded to my email account and filed as junkmail.

-ben

arjunmantri commented 10 years ago

Hey, I am using cookie-session-2.0.16 plugin for Grails 2.4.3. When I try to use the get cookie response.setCookie('username', 'cookieUser123') "setCookie" appears to be underline which means not installed in GGTS. Also in the plugin(Grails plugin manager) section its not showing cookie installed as it says "From grails 2.4.3 write in BuildConfig.groovy" which I did but still unsuccessful. Please help me out with this.

benlucchesi commented 10 years ago

I haven't used GGTS in ages, but I think we can figure out your problem anyways....

1) setCookie isn't a method. you probably want response.addCookie ... FYI - addCookie doesn't have anything to do with the cookiesession plugin. 2) follow the advice the compiler is giving you and use the BuildConfig.groovy to manage your plugins 3) ditch GGTS and start developing from the command line. Its good medicine and you'll learn more about grails ;)

good luck.

P.S. this was a freebie. next time read the grails and spring docs first.