db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vernier, Dominique (DVernier)" <dvern...@relaystar.com>
Subject Derby lazy load problem net.sf.hibernate.AssertionFailure: owner not associated with session
Date Sun, 16 Jan 2005 10:03:01 GMT
Hi, 
I used Derby in embeded mode not as network server and when using
lazy="false" with a derby database in a Set with a one-to-many
relationship I have the following error. This error is not raised when
using ms sql. 

If I change the lazy mode to true, I don't have the problem but of
course I don"t get the child record either. 

The problem occurs also with a many to many relationship. 

Is there a compatibility problem between hibernate and Derby?
Any clue?

Hibernate version:2 

The generated SQL (show_sql=true): 
Hibernate: select entity0_.code as code0_, entity0_.entityName as
entityName0_, entity0_.entityValue as entityVa3_0_ from Entity entity0_
where entity0_.code=? 
Hibernate: select entitymapp0_.entity_code as entity_c5___,
entitymapp0_.code as code__, entitymapp0_.code as code0_,
entitymapp0_.targetTable as targetTa2_0_, entitymapp0_.targetCode as
targetCode0_, entitymapp0_.targetValue as targetVa4_0_ from
EntityMapping entitymapp0_ where entitymapp0_.entity_code=? 


net.sf.hibernate.AssertionFailure: owner not associated with session 
at
net.sf.hibernate.impl.SessionImpl.updateUnreachableCollection(SessionImp
l.java:2915) 
at
net.sf.hibernate.impl.SessionImpl.flushCollections(SessionImpl.java:2788
) 
at
net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2261)

at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2239) 
at
net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
:61) 
at
org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(H
ibernateTransactionManager.java:463) 
at
org.springframework.transaction.support.AbstractPlatformTransactionManag
er.commit(AbstractPlatformTransactionManager.java:373) 
at
org.springframework.transaction.interceptor.TransactionAspectSupport.doC
ommitTransactionAfterReturning(TransactionAspectSupport.java:242) 
at
org.springframework.transaction.interceptor.TransactionInterceptor.invok
e(TransactionInterceptor.java:66) 
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:138) 
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAo
pProxy.java:152) 
at $Proxy4.read(Unknown Source) 
at
com.relaystar.dao.TestMasterData.testReadEntity(TestMasterData.java:218)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at junit.framework.TestCase.runTest(TestCase.java:154) 
at junit.framework.TestCase.runBare(TestCase.java:127) 
at junit.framework.TestResult$1.protect(TestResult.java:106) 
at junit.framework.TestResult.runProtected(TestResult.java:124) 
at junit.framework.TestResult.run(TestResult.java:109) 
at junit.framework.TestCase.run(TestCase.java:118) 
at junit.framework.TestSuite.runTest(TestSuite.java:208) 
at junit.framework.TestSuite.run(TestSuite.java:203) 
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:421) 
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
ner.java:305) 
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
nner.java:186)


Dominique Vernier
Senior ICT Specialist

RelayStar, a ChevronTexaco company,
Avenue Arnaud Fraiteur 25
B-1050 Brussels, Belgium 
Tel:	+32 2 639.91.94
Fax:	+32 2 639.95.94
Mobile:+32 498 94.99.34	
Email:	dvernier@relaystar.com


Mime
View raw message