Sorry, that was my fault. I forgot I had started working on that. It must have gotten committed with the exception conversion stuff.
Ugghh...
Well - you can always send a free beer ;)
/max
[mailto:hibernate-devel------Original Message----- From: [EMAIL PROTECTED]<[EMAIL PROTECTED]>[EMAIL PROTECTED] On Behalf Of Max Rydahl Andersen Sent: Tuesday, November 30, 2004 9:26 AM To: Hibernate development Subject: Fwd: Re: [Hibernate] errors in alltest ?
On Tue, 30 Nov 2004 09:48:17 -0500, inSys DeveloperDefaultSaveOrUpdateListenerwrote:
> It seems as though if entry were null you would have a > ClassCastException from the line above.
eh ? why should there be - casting null is totally ok! ;)
But besides that Gavin found that the code iniscontained code that should not have been committed - so now it is reverted and I have 100% green bar in HEAD as we speak ;)
/max
> You probably would have to check if the object in the pesister cache<[EMAIL PROTECTED]>> null even before casting to CacheEntry. What should the value of > cachedState be if indeed entry is null.
null.
/max
> > Max Rydahl Andersen wrote: > >> On Tue, 30 Nov 2004 09:15:51 -0500, Gavin Kingrun>> wrote: >> >>> Don't commit anything, I cannot reproduce your problem. All testscommits.>>> perfectly for me! >> >> >> well they don't for me :) >> >> Even if I have a clear cvs checkout and go back a couple ofmakes>> >> I would appreciate if you looked over the small NP check if it(4-5>> sense! >> >> /max >> >>> >>> Max Rydahl Andersen wrote: >>> >>>> On Tue, 30 Nov 2004 09:48:29 +0100, Max Rydahl Andersen >>>> <[EMAIL PROTECTED]> wrote: >>>> >>>>> On Mon, 29 Nov 2004 20:58:30 -0600, Gavin King >>>>> <[EMAIL PROTECTED]> wrote: >>>>> >>>>>> Not 23, but I just got 4 failures runnning against HSQLDB... >>>>>> >>>>>> Anyone know why that is? >>>>> >>>>> >>>>> >>>>> Your regressionfix for escapes made some of my errors go away===================================================================>>>>> pcs). >>>>> >>>>> but i still have this repeating NPE in >>>>> DefaultSaveOrUpdateEventListener (on both HQL and Oracle) >>>> >>>> >>>> >>>> I've looked into this and by adding a null check in >>>> DefaultSaveOrUpdateListener i'm down to 4 errors. >>>> >>>> Index: event/DefaultSaveOrUpdateEventListener.java >>>>>>>> RCS file: >>>>
/cvsroot/hibernate/Hibernate3/src/org/hibernate/event/DefaultSaveOrUpdat eEpersister.getCache()ventListener.java,v >>>> retrieving revision 1.6 >>>> diff -u -r1.6 DefaultSaveOrUpdateEventListener.java >>>> --- event/DefaultSaveOrUpdateEventListener.java 11 Nov 2004 >>>> 20:57:23 -0000 1.6 >>>> +++ event/DefaultSaveOrUpdateEventListener.java 30 Nov 2004 >>>> 13:47:11 -0000 >>>> @@ -257,7 +257,9 @@ >>>> if ( persister.hasCache() ) { >>>> CacheEntry entry = (CacheEntry)in>>>> .get( event.getRequestedId(), >>>> event.getSource().getTimestamp() ); >>>> - cachedState = entry.getState(); >>>> + if(entry!=null) { >>>> + cachedState = entry.getState(); >>>> + } >>>> } >>>> >>>> event.getSource().addEntity( >>>> >>>> >>>> This seems like a valid fix, as even though a persister has cache >>>> their might not be cachedentry in the cache, right ? (or am i >>>> missing something suttle, like there always should be an itemcode>>>> the cache at this point in code and the bug is really somewhere >>>> else ?) >>>> >>>> I'll commit this if Gavin or Steve could verify who made these>>>> lines that this is a valid fix. >>>> >>>> /max >>>> >>>> >>>>> java.lang.NullPointerException >>>>> at >>>>>
org.hibernate.event.DefaultSaveOrUpdateEventListener.performUpdate(Defau ltSaveOrUpdateEventListener.java:260) >>>>> at >>>>>
org.hibernate.event.DefaultSaveOrUpdateEventListener.entityIsDetached(De faultSaveOrUpdateEventListener.java:205) >>>>> at >>>>>
org.hibernate.event.DefaultUpdateEventListener.performSaveOrUpdate(Defau ltUpdateEventListener.java:31) >>>>> at >>>>>
org.hibernate.event.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(Defa ulorg.hibernate.impl.SessionImpl.update(SessionImpl.java:628)tSaveOrUpdateEventListener.java:65) >>>>> at>>>>> atorg.hibernate.impl.SessionImpl.update(SessionImpl.java:644)>>>>> at >>>>>
org.hibernate.test.legacy.FooBarTest.testReuseDeletedCollection(FooBarTe stMethod).java:858) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native>>>>> at >>>>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) >>>>> at >>>>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Imjunit.framework.TestResult.runProtected(TestResult.java:124)pl.java:25) >>>>> at java.lang.reflect.Method.invoke(Method.java:324) >>>>> at junit.framework.TestCase.runTest(TestCase.java:154) >>>>> at org.hibernate.test.TestCase.runTest(TestCase.java:121) >>>>> at junit.framework.TestCase.runBare(TestCase.java:127) >>>>> at junit.framework.TestResult$1.protect(TestResult.java:106) >>>>> at>>>>> 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 junit.framework.TestSuite.runTest(TestSuite.java:208) >>>>> at junit.framework.TestSuite.run(TestSuite.java:203) >>>>> 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 nntoer.java:186) >>>>> if noone has a clue on what it is i'll have to rollback commitsusers.>>>>> find when it does not occur ;( >>>>> >>>>> /max >>>>> >>>>>> >>>>>> >>>>>> -----Original Message----- >>>>>> From: [EMAIL PROTECTED] on behalf of >>>>>> Max Rydahl Andersen >>>>>> Sent: Mon 11/29/2004 7:09 AM >>>>>> To: Hibernate development >>>>>> Subject: [Hibernate] errors in alltest ? >>>>>> Hi, >>>>>> >>>>>> Am I the only one currently having 23 errors in the H3 AllTest >>>>>> suite from >>>>>> current cvs on Oracle ? >>>>>> >>>>>> They all seem to have their root in line 260 of >>>>>> DefaultSaveOrUpdateEventListener where >>>>>> I get a NPE. >>>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>> >>> >> >> >> > >
-- Max Rydahl Andersen callto://max.rydahl.andersen
Hibernate [EMAIL PROTECTED] http://hibernate.org
JBoss Inc [EMAIL PROTECTED] http://jboss.com
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from realDiscover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
-- Max Rydahl Andersen callto://max.rydahl.andersen
Hibernate [EMAIL PROTECTED] http://hibernate.org
JBoss Inc [EMAIL PROTECTED] http://jboss.com
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel