BaseORMService Error Messages: Session is closed

5 views
Skip to first unread message

Brett

unread,
Jun 30, 2010, 12:04:44 PM6/30/10
to ColdBox Platform
Anyone see this one before? I'm getting the error:

Application Execution Exception
Error Type: org.hibernate.SessionException : [N/A]
Error Messages: Session is closed

LINE: 624
Template: E:\web\sites\cf9.local\webapps\ROOT\coldbox\system\orm
\hibernate\BaseORMService.cfc

every time I try to persist a new entity using the base orm service.

Interestingly enough, if I pull the save routine out of the base orm
service and run it in my handler I don't get the error.

.brett

Curt Gratz

unread,
Jun 30, 2010, 12:08:32 PM6/30/10
to col...@googlegroups.com
Brett,

Check your hibernate logs. I have seen this error if I didn't have my
generator set properly and I didn't populate my ID. Also, you can try
setting the flush=true.

Curt Gratz
Computer Know How

.brett

--
You received this message because you are subscribed to the Google
Groups "ColdBox Platform" group.
To post to this group, send email to col...@googlegroups.com To
unsubscribe from this group, send email to
coldbox-u...@googlegroups.com
For more options, visit this group at
http://groups-beta.google.com/group/coldbox
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org

Brett

unread,
Jun 30, 2010, 12:32:25 PM6/30/10
to ColdBox Platform
Hey Curt - You're right, my ID wasn't being set (it's assigned).
Thanks for the quick reply.

.brett

Curt Gratz

unread,
Jun 30, 2010, 12:33:22 PM6/30/10
to col...@googlegroups.com
No problem.

I just had this issue yesterday and scratched my head until I looked at my hibernate logs.

Curt Gratz

.brett

Brett

unread,
Jun 30, 2010, 2:18:41 PM6/30/10
to ColdBox Platform
So news to me... you can't use the preInsert event to set an assigned
ID because the error is thrown before the event is called.
> > For News, visithttp://blog.coldbox.orgFor Documentation,
Reply all
Reply to author
Forward
0 new messages