We tend to use the Loom Log frequently, so we have developed an eclipse template to use it. Include this in your eclipse config at Preferences -> Java -> Editor -> Templates:
Name: log
Description: Loom log
Context: Java
Automatically insert: true
Pattern:
${:import(org.loom.log.Log)}private static Log log = Log.getLog();
Next time you need to use it, just type "log" and Ctrl + Space, and the template will create the log attribute for you.
This happens every once in a while with multiple transactional access to the database. The ORM retrieves the data and a commit is triggered on any subsequent database access, for example with the next EQL query.
There are two solutions available:
This happens with older versions of spring. Double check that you only have spring 2.5.5 or greater in your libs folder.
Postgresql blobs can only be used within a transaction:
http://www.postgresql.org/docs/7.3/static/lo-interfaces.html
http://forum.hibernate.org/viewtopic.php?t=963507
When, say, a FileAction tries to retrieve a PersistentFile and send it to the browser (as and image or PDF), the File copy is executed by PersistentFileResolution outside any transaction. In that case, PostgreSQL will complain and will not allow the copy to proceed:
org.postgresql.util.PSQLException: ERROR: invalid large-object descriptor: 0
This error has several ugly workarounds: