org.hibernate.AssertionFailure
The problem is that your code is handling an Exception, which is a bad, bad thing to do in 99.9% of the cases, and the following is happening:
One of the interactions with the session fails in the try block, and throws an exception. When this happens, the session is invalidated and cannot be used for absolutely anything as it's in an inconsistent state. But your code interacts with the session in the catch block, which triggers the assertion.
The only safe thing to do after an exception with the session, is to rollback the transaction and close it. Any other type of interaction will probably generate another exception (in this case an assertion exception).
one use case that is not cleanly handled is a poller of some kind. If an application is setting some "in progress status" for a large background job, commits, then separate thread/http request/session polling, while an async background thread throws an exception, that async thread needs to be responsible to catch that exception and mark the status as "failed" on the thing the poller is polling. In this case its awkward b/c the session gets invalidated b/c of a low level hibernate exception. This seems to be a valid case to catch and handle exceptions.
Is the only work around to get a new session? Clean/standard way of doing that within a managed transaction env like Seam?