-->
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.  [ 6 posts ] 
Author Message
 Post subject: Fix for HHH-871 not complete
PostPosted: Wed Aug 17, 2005 10:46 am 
Regular
Regular

Joined: Tue Mar 22, 2005 2:27 am
Posts: 62
Hi,

It looks like the fix for HHH-871 needs to be applied to parseListener as well.
Let me know if you need more info or a testcase.
FYI, I didn't run the hibernate testsuite so I'm not sure if this regression would be caught by it.

Hibernate version: 3.1beta2 + org.hibernate.cfg.Configuration rev 1.89

Full stack trace of any exception that occurs:
Code:
java.lang.ClassCastException
   at org.hibernate.cfg.Configuration.setListeners(Configuration.java:1656)
   at org.hibernate.cfg.Configuration.setListeners(Configuration.java:1481)
   at org.hibernate.cfg.Configuration.parseListener(Configuration.java:1465)
   at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1388)
   at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1354)
   at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1330)
   at org.hibernate.cfg.Configuration.configure(Configuration.java:1250)
   at com.my.test.Test.setUp(Test.java:86)
   at junit.framework.TestCase.runBare(TestCase.java:125)
   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 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)



Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 11:52 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I reopened the case, it's not trivial to do and I'm focused on other things right now.
Can you do it?

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 11:56 am 
Regular
Regular

Joined: Tue Mar 22, 2005 2:27 am
Posts: 62
Well, I'm pretty clear on the work that needs to be done for this.
Still, I would only have the evenings to work on it this week.
Don't expect lightening fast results.
I'll try to complete it by the weekend, including regression tests.

Regards.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 12:05 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
That would be awesome. No pressure, the beta2 has just been released :-)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 06, 2005 7:28 am 
Newbie

Joined: Tue Sep 27, 2005 8:12 am
Posts: 12
I wonder, if all setListeners are working properly in hibernate3.1rc3, I am also trying to use listener, by calling setListeners on config. Things work fine without delete listeners. Though I get error when I add post delete listener. Any thoughts?

config.setListeners("post-delete", new PostDeleteEventListener[]{new PostDeleteListener()});


org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [org.eclipse.example.library.impl.WriterImpl#1]
at org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:921)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:168)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:98)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:502)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:496)
at org.hibernate.engine.CascadingAction$1.cascade(CascadingAction.java:134)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:213)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:157)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
at org.hibernate.engine.Cascade.cascade(Cascade.java:248)
at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:130)
at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:121)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 06, 2005 6:31 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
this is not related to this post and is most likely a bug in your PostDelete lsitener impelmentation

_________________
Emmanuel


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.