From: Daan V. H. (JIRA) <no...@at...> - 2006-07-07 21:56:59
|
SortedSet broken in 3.2.0.cr3 ----------------------------- Key: HHH-1887 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1887 Project: Hibernate3 Type: Bug Components: core Versions: 3.2.0.cr3 Environment: Hibernate 3.2.0.cr3, any database Reporter: Daan Van Heghe the comparator for a SortedSet is no longer called in 3.2.0.cr3, works fine in 3.2.0.cr2. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Daan V. H. (JIRA) <no...@at...> - 2006-07-07 22:00:57
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1887?page=comments#action_23576 ] Daan Van Heghe commented on HHH-1887: ------------------------------------- Error occurs when the set is loaded in a new session, but not when the set is being populated. > SortedSet broken in 3.2.0.cr3 > ----------------------------- > > Key: HHH-1887 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1887 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr3 > Environment: Hibernate 3.2.0.cr3, any database > Reporter: Daan Van Heghe > > > the comparator for a SortedSet is no longer called in 3.2.0.cr3, works fine in 3.2.0.cr2. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2006-07-09 10:14:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1887?pa= ge=3Dcomments#action_23580 ]=20 Stefan B=C3=BChlmann commented on HHH-1887: -------------------------------------- This seems to be the same as my problem. Here my description: Since cr3 java.lang.ClassCastException: java.util.HashSet cannot be cast to= java.util.SortedSet in PersistentSortedSet.tailSet I've got a sorted to-many mapping, wich causes the above ClassCastException= since cr3 (it works fine in cr2). The mapping is: <set name=3D"Elements" inverse=3D"true" sort=3D"x2.elements.baseImpl.Elemen= t$ComparatorByElemNo" > =09<key column=3D"INSTALLATION"/> <one-to-many class=3D"x2.elements.baseImpl.Element"/> </set> Here the instance variable: private SortedSet<Element> elements =3D new TreeSet<Element>(Element.getCom= paratorByElemNo()); I execute the following line of code: SortedSet<Element> tailSet =3D elements.tailSet(tmp); // Here I get the Cla= ssCastException Immediately before the call to tailSet I have the following in the debugger= : this=09Installation (id=3D32)=09 =09elements=09PersistentSortedSet (id=3D90)=09// the object on which I cal= l tailSet =09=09cachedSize=09-1=09 =09=09comparator=09Element$ComparatorByElemNo (id=3D94)=09 =09=09directlyAccessible=09false=09 =09=09dirty=09false=09 =09=09initialized=09false=09 =09=09initializing=09false=09 =09=09key=09Long (id=3D97)=09 =09=09operationQueue=09null=09 =09=09owner=09Installation (id=3D32)=09 =09=09role=09"x2.elements.baseImpl.Installation.Elements"=09 =09=09session=09SessionImpl (id=3D101)=09 =09=09set=09null=09=09=09// obviously not fetched yet =09=09storedSnapshot=09null=09 =09=09tempList=09null=09 =09id=091=09 =09name=09"in1"=09 =09nextElemNo=095=09 =09nextTrxNo=092=09 now executing the line: SortedSet<Element> tailSet =3D elements.tailSet(tmp); Immediately after the call (when the exception is raised): in1=09Installation (id=3D32)=09 =09elements=09PersistentSortedSet (id=3D90)=09 =09=09cachedSize=09-1=09 =09=09comparator=09Element$ComparatorByElemNo (id=3D94)=09 =09=09directlyAccessible=09false=09 =09=09dirty=09false=09 =09=09initialized=09true=09 =09=09initializing=09false=09 =09=09key=09Long (id=3D97)=09 =09=09operationQueue=09null=09 =09=09owner=09Installation (id=3D32)=09 =09=09role=09"x2.elements.baseImpl.Installation.Elements"=09 =09=09session=09SessionImpl (id=3D101)=09 =09=09set=09HashSet<E> (id=3D138)=09=09=09// could this be the problem? =09=09storedSnapshot=09HashMap<K,V> (id=3D140)=09 =09=09tempList=09null=09 =09id=091=09 =09name=09"in1"=09 =09nextElemNo=095=09 =09nextTrxNo=092=09 Here the full stack trace: java.lang.ClassCastException: java.util.HashSet cannot be cast to java.util= .SortedSet =09at org.hibernate.collection.PersistentSortedSet.tailSet(PersistentSorted= Set.java:85) =09at x2.elements.baseImpl.Installation.findElement(Installation.java:130) = // the line of the above call =09at x2.elements.baseImpl.ElementFactory.findElement(ElementFactory.java:2= 63) =09at x2.elements.baseImpl.ElementFactory.findElement(ElementFactory.java:1= ) =09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) =09at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.= java:39) =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces= sorImpl.java:25) =09at java.lang.reflect.Method.invoke(Method.java:589) =09at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti= on(AopUtils.java:266) =09at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo= inpoint(ReflectiveMethodInvocation.java:181) =09at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(= ReflectiveMethodInvocation.java:148) =09at org.springframework.transaction.interceptor.TransactionInterceptor.in= voke(TransactionInterceptor.java:100) =09at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(= ReflectiveMethodInvocation.java:170) =09at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami= cAopProxy.java:176) =09at $Proxy1.findElement(Unknown Source) =09at brasil.tests.elements.ElementFactoryTC.testElementFactory(ElementFact= oryTC.java:307) =09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) =09at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.= java:39) =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces= sorImpl.java:25) =09at java.lang.reflect.Method.invoke(Method.java:589) =09at junit.framework.TestCase.runTest(TestCase.java:154) =09at junit.framework.TestCase.runBare(TestCase.java:127) =09at junit.framework.TestResult$1.protect(TestResult.java:106) =09at junit.framework.TestResult.runProtected(TestResult.java:124) =09at junit.framework.TestResult.run(TestResult.java:109) =09at junit.framework.TestCase.run(TestCase.java:118) =09at junit.framework.TestSuite.runTest(TestSuite.java:208) =09at junit.framework.TestSuite.run(TestSuite.java:203) =09at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(= JUnit3TestReference.java:128) =09at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution= .java:38) =09at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remot= eTestRunner.java:460) =09at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remot= eTestRunner.java:673) =09at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTest= Runner.java:386) =09at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTes= tRunner.java:196) > SortedSet broken in 3.2.0.cr3 > ----------------------------- > > Key: HHH-1887 > URL: http://opensource.atlassian.com/projects/hibernate/browse/H= HH-1887 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr3 > Environment: Hibernate 3.2.0.cr3, any database > Reporter: Daan Van Heghe > > > the comparator for a SortedSet is no longer called in 3.2.0.cr3, works fi= ne in 3.2.0.cr2. --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators= .jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-07-10 18:36:04
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1887?page=all ] Steve Ebersole resolved HHH-1887: --------------------------------- Resolution: Duplicate Assign To: Steve Ebersole > SortedSet broken in 3.2.0.cr3 > ----------------------------- > > Key: HHH-1887 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1887 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr3 > Environment: Hibernate 3.2.0.cr3, any database > Reporter: Daan Van Heghe > Assignee: Steve Ebersole > > > the comparator for a SortedSet is no longer called in 3.2.0.cr3, works fine in 3.2.0.cr2. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |