-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate Assertion Failure
PostPosted: Tue Mar 10, 2009 8:58 am 
Newbie

Joined: Tue Mar 10, 2009 8:49 am
Posts: 3
Hallo zusammen,

habe ein Problem mit Hibernate. Es sollte ein Child gespeichtert werden und ich bekomme eine Fehlermeldung. Diese Fehlermeldung wurde zwar schon paar mal gepostet, aber bei den meisten gab es kein Antwort.

Vielleicht hat ja jetzt schon jemand Erfahrung damit... Bin für jeden Tipp dankbar

Hibernate version:
hibernate3.jar


Logfile documents:

44500 [RMI TCP Connection(6)-192.168.101.87] ERROR 2009-03-10 09:29:48,656 org.hibernate.AssertionFailure - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
org.hibernate.AssertionFailure: null id in knxathome.persistence.pojos.NavigationElement entry (don't flush the Session after an exception occurs)
at org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:48)
at org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:150)
at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:106)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:978)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:135)
at org.hibernate.impl.AbstractSessionImpl.getNamedQuery(AbstractSessionImpl.java:60)
at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1245)
at knxservice.persistence.logic.NestedSet.getTree(NestedSet.java:346)
at knxathome.persistence.rmi.RmiPersisterImpl.getTree(RmiPersisterImpl.java:312)
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 sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
44531 [RMI TCP Connection(6)-192.168.101.87] INFO 2009-03-10 09:29:48,687 knxservice.persistence.logic.VisualizationLogic - Getting parent element id for primary key: 1

Quelltext:

.....
// finally append the new child
child.setLft(parent.getLft() + (offset - 1));
child.setRgt(parent.getLft() + offset);
primaryKey = (Integer) session.save(child);//<<< Fehlerzeile...

// commit transaction
tx.commit();
....





Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.