spring security - grails springsecurity's LoginController throws NotSerializableException -


i have nicely working grails 2.5.0 project (called lss) spring-security-core:2.0-rc4 plugged in. created dev war file of project, ran in on server on tomcat8.0 , accessed using url http://localhost:8080/lss/login/auth. works fine - able login in credentials provided in bootstrap.

then, switched localhost name server name , tried access using url http://devserver.prods.ca:8080/lss/login/auth. again, project alive , see login page no problem, when enter credentials consumed, username , password fields reset clean, , no redirection whatsoever, stay on login page!

looking @ stacktrace.log file, see following exception:

java.io.writeabortedexception: writing aborted; java.io.notserializableexception: grails.plugin.springsecurity.logincontroller @ java.io.objectinputstream.readobject0(objectinputstream.java:1355) @ java.io.objectinputstream.defaultreadfields(objectinputstream.java:1993) ... caused by: java.io.notserializableexception: grails.plugin.springsecurity.logincontroller @ java.io.objectoutputstream.writeobject0(objectoutputstream.java:1184) @ java.io.objectoutputstream.defaultwritefields(objectoutputstream.java:1548) ... 

any suggestions on how remedy please authenticatable deployment?

got working, due credit link. indeed problem boldly injecting springsecurityservice def keyword inside user domain class - plugin controllers not serializable. making these edits in user domain class:

  1. replace transient springsecurityservice transient grailsapplication
  2. make sure updated statement static transients = ['grailsapplication']
  3. create method:

    def getsss() { grailsapplication.maincontext.springsecurityservice }

  4. update method uses springsecurityservice to:

    protected void encodepassword() { password = sss?.passwordencoder ? sss.encodepassword(password) : password }

all worked fine , able access , use application server name smoothly.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -