Suddenly getting "Could not synchronize database state with session"

87 views
Skip to first unread message

John Chrisman

unread,
Dec 18, 2014, 2:39:55 PM12/18/14
to cf-or...@googlegroups.com
Hello,

We've been having this problem for a while and have been unable to find a solution. Hopefully someone here can help.

Our web site was running for over a year when we suddenly started getting Hibernate errors on any section of code that tries to save data to the database. The specific error is "Could not synchronize database state with session". It seems to happen randomly but once it happens it'll keep happening in any section of code that tries to save to the database until we restart Coldfusion.

I found a tip on Stack Overflow where someone was getting this error trying to save while using Hibernate from Java (http://stackoverflow.com/questions/18559714/could-not-synchronize-database-state-with-session). They were told to refresh the object right after loading it and then make changes and save it. I tried to find some way to do that in Coldfusion ORM but I'm not see how it can be done.

Some days it doesn't happen at all and some days it seems like we're restarting Coldfusion every 15 minutes.

Any ideas?

John Chrisman

unread,
Jan 20, 2015, 2:25:53 PM1/20/15
to cf-or...@googlegroups.com
We've been having this problem for months and no solution yet. We seem to stump everyone else too. So, we're removing all Coldfusion ORM from our application. Once a module has the ORM removed everything works great.

Brian Kotek

unread,
Jan 20, 2015, 2:33:58 PM1/20/15
to cf-or...@googlegroups.com
Did you try out the stackoverflow answer? E.g. ORMGetSession().refresh( myObject )?


--
You received this message because you are subscribed to the Google Groups "cf-orm-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cf-orm-dev+...@googlegroups.com.
To post to this group, send email to cf-or...@googlegroups.com.
Visit this group at http://groups.google.com/group/cf-orm-dev.
For more options, visit https://groups.google.com/d/optout.

John Chrisman

unread,
Jan 20, 2015, 3:07:31 PM1/20/15
to cf-or...@googlegroups.com
No, I wasn't sure how to translate the Java into the equivalent code in Coldfusion. I suppose I could have tried passing a Coldfusion entity in for "myObject" to see if that would work. If we have any code left that uses hibernate I think I'll give it a try just to see.
Reply all
Reply to author
Forward
0 new messages