简体   繁体   中英

javax.persistence.PersistenceException: Transaction failed to flush

I got the JPA exception

"javax.persistence.PersistenceException: Transaction failed to flush"

Then I deleted my local datastore(datastore-indexes-auto.xml and local_db.bin) from my system. Recreated all the data again and after that, the exception was gone. I want to know what did just happened ?

The following is the stacktrace

[RPC Fault faultString="org.springframework.orm.jpa.JpaSystemException : Transaction failed to flush; nested exception is javax.persistence.PersistenceException: Transaction failed to flush" faultCode="Server.Processing" faultDetail="null"]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:290]
at mx.rpc::Responder/fault()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:58]
at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]
at NetConnectionMessageResponder/statusHandler()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:581]
at mx.messaging::MessageResponder/status()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:222]

I believe it is due to this problem with the time it takes for AppEngine to start up, thereby causing timeout errors.

http://googleappengine.blogspot.com/2009/12/request-performance-in-java.html

If you've been following the App Engine Java runtime group, you may have noticed some discussions about performance of the Java runtime. Many of you have complained about hard-to-predict DeadlineExceededExceptions, or unexpectedly slow requests that use a high amount of CPU. These issues often have the same root cause: App Engine is preparing a new instance of your code to respond an incoming request.

It was reported by Grails http://jira.grails.org/browse/GPAPPENGINE-67

There is an open issue Google has not fixed yet, even after several years.

https://code.google.com/p/googleappengine/issues/detail?id=7706

As a Java project becomes more complicated and requires loading more classes & jars at startup, instance startup time degrades to the point where instances blow the 60s user-facing request deadline.

You MIGHT be able to work around this by keeping an idle instance resident in memory so it doesn't have to spin up.

https://developers.google.com/appengine/docs/adminconsole/performancesettings#scheduler

https://appengine.google.com/settings

I don't know google-app-engine, but I assume you have some limited space in DB there? Maybe you just run out of space?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM