You should be asking this question on the Grails User list -
http://grails.org/Mailing+lists.
It sounds like you're using dbCreate='create-drop' in DataSource.groovy. If you
want to retain data between server restarts, either use dbCreate='update' or
leave out the dbCreate parameter entirely and manually update your schema.
--
Burt
On Sunday 18 January 2009 9:58:12 pm Kerwin Tang wrote:
Hi Ray,
On Fri, Jan 16, 2009 at 7:10 PM, Ray Krueger raykrue...@gmail.com wrote:
On Fri, Jan 16, 2009 at 2:52 AM, Kerwin Tang kerwint...@gmail.com wrote:
Hi guys,
I've tried to integrate acegi with my grails application and i've
encountered a problem where i'm stuck.
Did you use the AcegiSecurity Plugin for Grails?
Yes.. sorry if i didn't mention it.
I was able to set it up such that i am able to create user records, save
them to the database, and login successfully using those records.
However,
once i try to restart my grails app, the username/password combination
cannot login successfully now, even though the records are indeed in the
database.
I'm thinking it's probably caused by some inconsistency in the
encryption/decryption of passwords, but i'm not really that familiar. Any
help will be appreciated. Thanks!
Do you have a PasswordEncoder setup co correctly? Meaning that you're
passiong the same instance of it to all the necessary parts?
yes.. after checking and re-checking, it seems the problem was caused by the
authority_user table being truncated i.e. all records are deleted on
startup.. that's why the error was encountered user [user] has no
GrantedAuthority..
Do you have an idea why the authority_user table is being truncated on boot?
The only content of init method in my bootstrap config file is:
def init = { servletContext --
new Requestmap(url:/project/**,configAttribute:ROLE_USER).save()
new Requestmap(url:/issue/**,configAttribute:ROLE_USER).save()
new Requestmap(url:/home/**,configAttribute:ROLE_USER).save()
}
def destroy = {
}
Thanks for your help.
Best regards,
Kerwin
Best Regards,
Kerwin
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Home: http://acegisecurity.org
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Home: http://acegisecurity.org
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Home: http://acegisecurity.org
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer