Announcement
Collapse
No announcement yet.
X
-
One more suggestion:
try to add
<persistence-context-type>Extended</persistence-context-type>
to <persistence-context-ref> in web.xml.
Regards,
Alius
Leave a comment:
-
While googling I've found suggestion: switch to eclipselink.
Can you do that for testing purposes?
By doing that you make sure that either ORM provider it not a cause or confirm it.
Regards,
Alius.
Leave a comment:
-
Hi,
As you can see from the logs - SC does following:
a) JPADataSource acquires EM (EntityManager) and TX (transaction)
b) JPADataSource executes query
c) JPADataSource commits TX
d) DataSource converts fetched entities to JS (and receives LazyInitializationException)
e) JPADataSource releases EM
To be exact: step e is NOOP - SC does absolutely nothing. SC expects java container to take care of closing EM.
Now we know - it should be a problem in J2EE server configuration.
I'm not an expert in JBoss. Let's try anyway.
First I would remove following lines from you persistence.xml:
<!--The built-in Hibernate connection pool is in no way intended for production use. It lacks several features found on any decent connection pool. -->
<property name="hibernate.connection.pool_size" value="0"/>
<!-- Enable Hibernate's automatic session context management -->
<property name="hibernate.current_session_context_class" value="thread"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.internal.NoCacheProvider"/>
<property name="hibernate.connection.release_mode" value="on_close"/>
Regards,
Alius
Leave a comment:
-
Hibernate LazyInitializationException...please help
I could really use some help, I've been trying to sort this out for a week on my own.
My setup:
Container is JBoss AS 7.0.2 Final
comes with Hibernate 4.0.0 CR2
server.properties
Any help would be greatly appreciatedLast edited by jpappalardo; 24 Sep 2014, 09:43.Tags: None
Leave a comment: