Discussion:
Getting unexpected error from webflow plugin - org.springframework.webflow.execution.repository.snapshot.SnapshotCreationException
Gregory Pierce
2010-08-24 04:11:22 UTC
Permalink
The root of the issue is that the webflow is expecting for some hibernate
utility class to be Serializable:

Caused by:
org.springframework.webflow.execution.repository.snapshot.SnapshotCreationException:
Could not serialize flow execution; make sure all objects stored in flow or
flash scope are serializable

... 1 more

Caused by: java.io.NotSerializableException: org.hibernate.util.MarkerObject


All of the classes that it complained about not being Serializable before
are now serializable, but I'm not sure what its trying to tell me now as
this is an internal utility class:

2010-08-24 00:09:13,498 [http-8080-4] ERROR errors.GrailsExceptionResolver
- Exception thrown in state 'enterAccountInformation' of flow
'signup/newAccount'
org.springframework.webflow.execution.FlowExecutionException: Exception
thrown in state 'enterAccountInformation' of flow 'signup/newAccount'
at java.lang.Thread.run(Thread.java:637)
Caused by:
org.springframework.webflow.execution.repository.snapshot.SnapshotCreationException:
Could not serialize flow execution; make sure all objects stored in flow or
flash scope are serializable
... 1 more
Caused by: java.io.NotSerializableException: org.hibernate.util.MarkerObject
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.HashMap.writeObject(HashMap.java:1001)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at
java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.LinkedList.writeObject(LinkedList.java:943)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at
java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
... 1 more
2010-08-24 00:09:13,706 [http-8080-4] ERROR [Tomcat].[localhost] -
Exception Processing ErrorPage[errorCode=500, location=/grails-errorhandler]
java.lang.IllegalStateException: Cannot reset buffer after response has been
committed
at org.apache.catalina.connector.Response.resetBuffer(Response.java:691)
at
org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:409)
at
org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)
at
org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:287)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:637)
--
View this message in context: http://grails.1312388.n4.nabble.com/Getting-unexpected-error-from-webflow-plugin-org-springframework-webflow-execution-repository-snapshn-tp2336101p2336101.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Gregory Pierce
2010-08-24 04:18:47 UTC
Permalink
If it helps, the flow component where the error is happening is here:

enterAccountInformation {

on("submit") { AccountCommand accountCommand ->

if ( accountCommand.hasErrors() )
{
flow.account = accountCommand
return error()
}

Role memberRole = Role.findByAuthority("ROLE_MEMBER")
String encodedPassword =
springSecurityService.encodePassword( accountCommand.password )
User memberAccount = new User( accountCommand.properties )

//todo: gather the username
memberAccount.username = accountCommand.emailAddress


if ( memberAccount.validate() )
{
memberAccount.save()

println "Created member ${memberAccount.emailAddress}"


UserRole.create( memberAccount, memberRole, true )


println "Added user to role"
}
else
{
println memberAccount.errors
}



}.to("finish")

on("back").to("selectSubscription")

}
--
View this message in context: http://grails.1312388.n4.nabble.com/Getting-unexpected-error-from-webflow-plugin-org-springframework-webflow-execution-repository-snapshn-tp2336101p2336103.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Søren Berg Glasius
2010-08-24 06:31:38 UTC
Permalink
Hi,

If you read the documentation for Web flows you'll notice, that it says,
that all Domain classes must implement Serializable to be used in Web
flows..

Med venlig hilsen / Best regards,
SÞren Berg Glasius

Hedevej 1, Gl. Rye, DK-8680 Ry, Denmark
P: (+45)87880170, M: (+45)40449188, S: sbglasius
--- Press ESC once to quit - twice to save the changes.
Post by Gregory Pierce
enterAccountInformation {
on("submit") { AccountCommand accountCommand ->
if ( accountCommand.hasErrors() )
{
flow.account = accountCommand
return error()
}
Role memberRole = Role.findByAuthority("ROLE_MEMBER")
String encodedPassword =
springSecurityService.encodePassword( accountCommand.password )
User memberAccount = new User( accountCommand.properties )
//todo: gather the username
memberAccount.username = accountCommand.emailAddress
if ( memberAccount.validate() )
{
memberAccount.save()
println "Created member ${memberAccount.emailAddress}"
UserRole.create( memberAccount, memberRole, true )
println "Added user to role"
}
else
{
println memberAccount.errors
}
}.to("finish")
on("back").to("selectSubscription")
}
--
http://grails.1312388.n4.nabble.com/Getting-unexpected-error-from-webflow-plugin-org-springframework-webflow-execution-repository-snapshn-tp2336101p2336103.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
Søren Berg Glasius
2010-08-24 06:34:06 UTC
Permalink
Ah - did not read your entire posting. :( Could it be, that your
AccountCommand is not serializable, as it is the variable you put on the
flow scope?

Med venlig hilsen / Best regards,
SÞren Berg Glasius

Hedevej 1, Gl. Rye, DK-8680 Ry, Denmark
P: (+45)87880170, M: (+45)40449188, S: sbglasius
--- Press ESC once to quit - twice to save the changes.
Post by Søren Berg Glasius
Hi,
If you read the documentation for Web flows you'll notice, that it says,
that all Domain classes must implement Serializable to be used in Web
flows..
Med venlig hilsen / Best regards,
SÞren Berg Glasius
Hedevej 1, Gl. Rye, DK-8680 Ry, Denmark
P: (+45)87880170, M: (+45)40449188, S: sbglasius
--- Press ESC once to quit - twice to save the changes.
Post by Gregory Pierce
enterAccountInformation {
on("submit") { AccountCommand accountCommand ->
if ( accountCommand.hasErrors() )
{
flow.account = accountCommand
return error()
}
Role memberRole = Role.findByAuthority("ROLE_MEMBER")
String encodedPassword =
springSecurityService.encodePassword( accountCommand.password )
User memberAccount = new User( accountCommand.properties )
//todo: gather the username
memberAccount.username = accountCommand.emailAddress
if ( memberAccount.validate() )
{
memberAccount.save()
println "Created member ${memberAccount.emailAddress}"
UserRole.create( memberAccount, memberRole, true )
println "Added user to role"
}
else
{
println memberAccount.errors
}
}.to("finish")
on("back").to("selectSubscription")
}
--
http://grails.1312388.n4.nabble.com/Getting-unexpected-error-from-webflow-plugin-org-springframework-webflow-execution-repository-snapshn-tp2336101p2336103.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
burtbeckwith
2010-08-24 06:44:26 UTC
Permalink
The problematic class is org.hibernate.util.MarkerObject.

This has been reported as http://opensource.atlassian.com/projects/hibernate/browse/HHH-3239 and although it's not marked as fixed it is fixed in 3.5: http://anonsvn.jboss.org/repos/hibernate/core/tags/hibernate-3.5.0-Final/core/src/main/java/org/hibernate/util/MarkerObject.java

Burt
Post by Søren Berg Glasius
Ah - did not read your entire posting. :( Could it be, that your
AccountCommand is not serializable, as it is the variable you put on the
flow scope?
Med venlig hilsen / Best regards,
SÞren Berg Glasius
Hedevej 1, Gl. Rye, DK-8680 Ry, Denmark
P: (+45)87880170, M: (+45)40449188, S: sbglasius
--- Press ESC once to quit - twice to save the changes.
Post by Søren Berg Glasius
Hi,
If you read the documentation for Web flows you'll notice, that it says,
that all Domain classes must implement Serializable to be used in Web
flows..
Med venlig hilsen / Best regards,
SÞren Berg Glasius
Hedevej 1, Gl. Rye, DK-8680 Ry, Denmark
P: (+45)87880170, M: (+45)40449188, S: sbglasius
--- Press ESC once to quit - twice to save the changes.
Post by Gregory Pierce
enterAccountInformation {
on("submit") { AccountCommand accountCommand ->
if ( accountCommand.hasErrors() )
{
flow.account = accountCommand
return error()
}
Role memberRole = Role.findByAuthority("ROLE_MEMBER")
String encodedPassword =
springSecurityService.encodePassword( accountCommand.password )
User memberAccount = new User( accountCommand.properties )
//todo: gather the username
memberAccount.username = accountCommand.emailAddress
if ( memberAccount.validate() )
{
memberAccount.save()
println "Created member ${memberAccount.emailAddress}"
UserRole.create( memberAccount, memberRole, true )
println "Added user to role"
}
else
{
println memberAccount.errors
}
}.to("finish")
on("back").to("selectSubscription")
}
--
http://grails.1312388.n4.nabble.com/Getting-unexpected-error-from-webflow-plugin-org-springframework-webflow-execution-repository-snapshn-tp2336101p2336103.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
______________________________________
To unsubscribe from Grails - user, click http://grails.1312388.n4.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_code&node=1312389&code=YnVydEBidXJ0YmVja3dpdGguY29tfDEzMTIzODl8ODY4NjI5MDE2
--
View this message in context: http://grails.1312388.n4.nabble.com/Getting-unexpected-error-from-webflow-plugin-org-springframework-webflow-execution-repository-snapshn-tp2336101p2336185.html
Sent from the Grails - user mailing list archive at Nabble.com.
Gregory Pierce
2010-08-24 21:27:39 UTC
Permalink
Thanks for the assist guys.

I am going to assume that we should be fine simply upgrading the version of
hibernate that is currently used to the latest GA version that is available
from the hibernate site.

I will post back if simply upgrading hibernate resolves the issue.
--
View this message in context: http://grails.1312388.n4.nabble.com/Getting-unexpected-error-from-webflow-plugin-org-springframework-webflow-execution-repository-snapshn-tp2336101p2337377.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Gregory Pierce
2010-08-25 05:58:53 UTC
Permalink
Created a defect so that the fix of this can be tracked:

http://jira.codehaus.org/browse/GRAILS-6648

This one is a pretty critical error as most normal webflow interactions will
yield this error.
--
View this message in context: http://grails.1312388.n4.nabble.com/Getting-unexpected-error-from-webflow-plugin-org-springframework-webflow-execution-repository-snapshn-tp2336101p2337681.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Loading...