Showing posts with label Grails WebLogic. Show all posts
Showing posts with label Grails WebLogic. Show all posts

Friday, August 22, 2008

Grails on WebLogic - Validation Errors

If you are deploying Grails on WebLogic 9/10 you must ensure that all of your domain classes MUST implement Serializable. If not, you won't see validation feedback on your form.

Also, as part of the standard Java Serializable interface, ensure that all members of the domain class must also be Serializable.

You will see a WebLogic log message:

<[weblogic.servlet.internal.WebAppServletContext@f7ca6d - appName: '_appsdir_MyApp_dir',

name: 'MyApp', context-path: '/MyApp'] could not deserialize the request scoped attribute with name: "org.codehaus.groovy.grails.ERRORS_MyDomainObj_19315431"
java.io.NotSerializableException: org.springframework.beans.factory.support.DefaultListableBeanFactory
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
Truncated. see log file for complete stacktrace