-
1. Jboss-6 Final: Get "Connection is not associated with a managed connection" for Insert in Stateless Session Bean
adamw Feb 1, 2011 2:36 AM (in response to brand-neu)This looks like a general Hibernate, not an Envers question, so please direct the question to the Hibernate forum.
Adam
-
2. Jboss-6 Final: Get "Connection is not associated with a managed connection" for Insert in Stateless Session Bean
pbloem Feb 6, 2011 2:08 PM (in response to brand-neu)Hi Brand Neu,
Don't know if you ever solved your problem, but found this thread, and a solution (atleast for my problem).
Had the same problem, after a lot of searching i'd found that my problem was with hibernate annotations on the class.
In my project i tried to insert (persist) a row into a MySQL database that had MediumText type field.
The class was annotated with @Lob for the MediumText field property, that caused the exception you mentioned.
Strange thing is that it worked for the project while I was using OpenJPA 2 on Apache Geronimo.
So basically Adam is right
Pascal
-
3. Jboss-6 Final: Get "Connection is not associated with a managed connection" for Insert in Stateless Session Bean
brand-neu Feb 14, 2011 7:13 AM (in response to pbloem)Hi pbloem,
Your solution solved my problem!
My class was also annotated with @Lob for an ntext-column (sqlserver) . Without this annotation - INSERT now succesfull!
Interesting- I'm only removed @Lob : same sql-driver-jar, same datasource-properties.
Thank You!
Torsten
-
4. Re: Jboss-6 Final: Get "Connection is not associated with a managed connection" for Insert in Stateless Session Bean
cdandoy Jun 1, 2011 12:30 PM (in response to brand-neu)Removing the @Lob does not help when you want to store more than 4K on Oracle.
I have solved the problem with an hibernate property:
<property name="hibernate.connection.release_mode" value="on_close"/>
This is indeed a Hibernate topic but this thread is the first hit when you google the error.