From: Roland G. (JIRA) <no...@at...> - 2005-10-12 16:59:19
|
WrongClassException when scrolling through EntityMode.DOM4J and loading identical objects from different fields --------------------------------------------------------------------------------------------------------------- Key: HHH-1039 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039 Project: Hibernate3 Type: Bug Versions: 3.0.5 Environment: Windows XP, JDK 1.4.2_8, Hibernate 3.0.5, Oracle 9.2. Replicated on Windows XP, JDK 1.5.0_2, Hibernate 3.0.5, MySQL Reporter: Roland Groen Attachments: HbmXmlTest.java, Test.hbm.xml When working with XML representations of entities, an unexpected org.hibernate.WrongClassException is thrown when working with identical embedded objects (embed-xml="true") which have different field names. org.hibernate.WrongClassException seems to be thrown when: 1) Running in EntityMode.DOM4J 2) Scrolling through a result set using session.scroll() 3) Embedding objects that are: a) Referred by least by one of the objects on which the query is selecting primarily (parent object) and, b) that field is in FetchMode.JOIN. c) Referred by one object which is embedded (embed-xml="true") and uses a different field name to refer to the object than the parent object. I would like to apologise for the large test case. The bug is quite hard to reproduce, I tried to minimise the test, but this seems the smallest and most simple case I can find. The stack trace is: Caused by: org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: Customer (loaded object was of wrong class) at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:890) at org.hibernate.loader.Loader.getRow(Loader.java:846) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:305) at org.hibernate.loader.Loader.loadSingleRow(Loader.java:238) at org.hibernate.impl.ScrollableResultsImpl.prepareCurrentRow(ScrollableResultsImpl.java:477) at org.hibernate.impl.ScrollableResultsImpl.next(ScrollableResultsImpl.java:106) at HbxXmlTest.main(HbxXmlTest.java:90) The included files are: Test.hbm.xml : the hbm file to create the classes HbmXmlTest.java : the the java source to reproduce the issue. Greetings, Roland. -- 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: Roland G. (JIRA) <no...@at...> - 2005-10-12 17:30:27
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039?page=comments#action_20235 ] Roland Groen commented on HHH-1039: ----------------------------------- I forgot to mention: - the workaround is to name the nodes as the class name, thus node="Customer" for all Customer fields - I reproduced the issue on hibernate 3.1 rc1 > WrongClassException when scrolling through EntityMode.DOM4J and loading identical objects from different fields > --------------------------------------------------------------------------------------------------------------- > > Key: HHH-1039 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039 > Project: Hibernate3 > Type: Bug > Versions: 3.0.5 > Environment: Windows XP, JDK 1.4.2_8, Hibernate 3.0.5, Oracle 9.2. Replicated on Windows XP, JDK 1.5.0_2, Hibernate 3.0.5, MySQL > Reporter: Roland Groen > Attachments: HbmXmlTest.java, Test.hbm.xml > > > When working with XML representations of entities, an unexpected org.hibernate.WrongClassException is thrown when working with identical embedded objects (embed-xml="true") which have different field names. > org.hibernate.WrongClassException seems to be thrown when: > 1) Running in EntityMode.DOM4J > 2) Scrolling through a result set using session.scroll() > 3) Embedding objects that are: > a) Referred by least by one of the objects on which the query is selecting primarily (parent object) and, > b) that field is in FetchMode.JOIN. > c) Referred by one object which is embedded (embed-xml="true") and uses a different field name to refer to the object than the parent object. > I would like to apologise for the large test case. The bug is quite hard to reproduce, I tried to minimise the test, but this seems the smallest and most simple case I can find. > The stack trace is: > Caused by: org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: Customer (loaded object was of wrong class) > at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:890) > at org.hibernate.loader.Loader.getRow(Loader.java:846) > at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:305) > at org.hibernate.loader.Loader.loadSingleRow(Loader.java:238) > at org.hibernate.impl.ScrollableResultsImpl.prepareCurrentRow(ScrollableResultsImpl.java:477) > at org.hibernate.impl.ScrollableResultsImpl.next(ScrollableResultsImpl.java:106) > at HbxXmlTest.main(HbxXmlTest.java:90) > The included files are: > Test.hbm.xml : the hbm file to create the classes > HbmXmlTest.java : the the java source to reproduce the issue. > Greetings, > Roland. -- 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...> - 2005-12-06 04:18:08
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039?page=all ] Steve Ebersole updated HHH-1039: -------------------------------- Fix Version: 3.2 > WrongClassException when scrolling through EntityMode.DOM4J and loading identical objects from different fields > --------------------------------------------------------------------------------------------------------------- > > Key: HHH-1039 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039 > Project: Hibernate3 > Type: Bug > Versions: 3.0.5 > Environment: Windows XP, JDK 1.4.2_8, Hibernate 3.0.5, Oracle 9.2. Replicated on Windows XP, JDK 1.5.0_2, Hibernate 3.0.5, MySQL > Reporter: Roland Groen > Fix For: 3.2 > Attachments: HbmXmlTest.java, Test.hbm.xml > > > When working with XML representations of entities, an unexpected org.hibernate.WrongClassException is thrown when working with identical embedded objects (embed-xml="true") which have different field names. > org.hibernate.WrongClassException seems to be thrown when: > 1) Running in EntityMode.DOM4J > 2) Scrolling through a result set using session.scroll() > 3) Embedding objects that are: > a) Referred by least by one of the objects on which the query is selecting primarily (parent object) and, > b) that field is in FetchMode.JOIN. > c) Referred by one object which is embedded (embed-xml="true") and uses a different field name to refer to the object than the parent object. > I would like to apologise for the large test case. The bug is quite hard to reproduce, I tried to minimise the test, but this seems the smallest and most simple case I can find. > The stack trace is: > Caused by: org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: Customer (loaded object was of wrong class) > at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:890) > at org.hibernate.loader.Loader.getRow(Loader.java:846) > at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:305) > at org.hibernate.loader.Loader.loadSingleRow(Loader.java:238) > at org.hibernate.impl.ScrollableResultsImpl.prepareCurrentRow(ScrollableResultsImpl.java:477) > at org.hibernate.impl.ScrollableResultsImpl.next(ScrollableResultsImpl.java:106) > at HbxXmlTest.main(HbxXmlTest.java:90) > The included files are: > Test.hbm.xml : the hbm file to create the classes > HbmXmlTest.java : the the java source to reproduce the issue. > Greetings, > Roland. -- 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-02-16 19:32:20
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039?page=all ] Steve Ebersole updated HHH-1039: -------------------------------- Fix Version: (was: 3.2) 3.2 tmp > WrongClassException when scrolling through EntityMode.DOM4J and loading identical objects from different fields > --------------------------------------------------------------------------------------------------------------- > > Key: HHH-1039 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039 > Project: Hibernate3 > Type: Bug > Versions: 3.0.5 > Environment: Windows XP, JDK 1.4.2_8, Hibernate 3.0.5, Oracle 9.2. Replicated on Windows XP, JDK 1.5.0_2, Hibernate 3.0.5, MySQL > Reporter: Roland Groen > Fix For: 3.2 tmp > Attachments: HbmXmlTest.java, Test.hbm.xml > > > When working with XML representations of entities, an unexpected org.hibernate.WrongClassException is thrown when working with identical embedded objects (embed-xml="true") which have different field names. > org.hibernate.WrongClassException seems to be thrown when: > 1) Running in EntityMode.DOM4J > 2) Scrolling through a result set using session.scroll() > 3) Embedding objects that are: > a) Referred by least by one of the objects on which the query is selecting primarily (parent object) and, > b) that field is in FetchMode.JOIN. > c) Referred by one object which is embedded (embed-xml="true") and uses a different field name to refer to the object than the parent object. > I would like to apologise for the large test case. The bug is quite hard to reproduce, I tried to minimise the test, but this seems the smallest and most simple case I can find. > The stack trace is: > Caused by: org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: Customer (loaded object was of wrong class) > at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:890) > at org.hibernate.loader.Loader.getRow(Loader.java:846) > at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:305) > at org.hibernate.loader.Loader.loadSingleRow(Loader.java:238) > at org.hibernate.impl.ScrollableResultsImpl.prepareCurrentRow(ScrollableResultsImpl.java:477) > at org.hibernate.impl.ScrollableResultsImpl.next(ScrollableResultsImpl.java:106) > at HbxXmlTest.main(HbxXmlTest.java:90) > The included files are: > Test.hbm.xml : the hbm file to create the classes > HbmXmlTest.java : the the java source to reproduce the issue. > Greetings, > Roland. -- 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-03-16 15:38:12
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039?page=all ] Steve Ebersole updated HHH-1039: -------------------------------- Fix Version: (was: 3.2.0.alpha2) 3.2.0 > WrongClassException when scrolling through EntityMode.DOM4J and loading identical objects from different fields > --------------------------------------------------------------------------------------------------------------- > > Key: HHH-1039 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039 > Project: Hibernate3 > Type: Bug > Versions: 3.0.5 > Environment: Windows XP, JDK 1.4.2_8, Hibernate 3.0.5, Oracle 9.2. Replicated on Windows XP, JDK 1.5.0_2, Hibernate 3.0.5, MySQL > Reporter: Roland Groen > Fix For: 3.2.0 > Attachments: HbmXmlTest.java, Test.hbm.xml > > > When working with XML representations of entities, an unexpected org.hibernate.WrongClassException is thrown when working with identical embedded objects (embed-xml="true") which have different field names. > org.hibernate.WrongClassException seems to be thrown when: > 1) Running in EntityMode.DOM4J > 2) Scrolling through a result set using session.scroll() > 3) Embedding objects that are: > a) Referred by least by one of the objects on which the query is selecting primarily (parent object) and, > b) that field is in FetchMode.JOIN. > c) Referred by one object which is embedded (embed-xml="true") and uses a different field name to refer to the object than the parent object. > I would like to apologise for the large test case. The bug is quite hard to reproduce, I tried to minimise the test, but this seems the smallest and most simple case I can find. > The stack trace is: > Caused by: org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: Customer (loaded object was of wrong class) > at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:890) > at org.hibernate.loader.Loader.getRow(Loader.java:846) > at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:305) > at org.hibernate.loader.Loader.loadSingleRow(Loader.java:238) > at org.hibernate.impl.ScrollableResultsImpl.prepareCurrentRow(ScrollableResultsImpl.java:477) > at org.hibernate.impl.ScrollableResultsImpl.next(ScrollableResultsImpl.java:106) > at HbxXmlTest.main(HbxXmlTest.java:90) > The included files are: > Test.hbm.xml : the hbm file to create the classes > HbmXmlTest.java : the the java source to reproduce the issue. > Greetings, > Roland. -- 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-03-27 17:36:24
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039?page=all ] Steve Ebersole updated HHH-1039: -------------------------------- Fix Version: (was: 3.2.0 cr1) 3.2.0 > WrongClassException when scrolling through EntityMode.DOM4J and loading identical objects from different fields > --------------------------------------------------------------------------------------------------------------- > > Key: HHH-1039 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039 > Project: Hibernate3 > Type: Bug > Versions: 3.0.5 > Environment: Windows XP, JDK 1.4.2_8, Hibernate 3.0.5, Oracle 9.2. Replicated on Windows XP, JDK 1.5.0_2, Hibernate 3.0.5, MySQL > Reporter: Roland Groen > Fix For: 3.2.0 > Attachments: HbmXmlTest.java, Test.hbm.xml > > > When working with XML representations of entities, an unexpected org.hibernate.WrongClassException is thrown when working with identical embedded objects (embed-xml="true") which have different field names. > org.hibernate.WrongClassException seems to be thrown when: > 1) Running in EntityMode.DOM4J > 2) Scrolling through a result set using session.scroll() > 3) Embedding objects that are: > a) Referred by least by one of the objects on which the query is selecting primarily (parent object) and, > b) that field is in FetchMode.JOIN. > c) Referred by one object which is embedded (embed-xml="true") and uses a different field name to refer to the object than the parent object. > I would like to apologise for the large test case. The bug is quite hard to reproduce, I tried to minimise the test, but this seems the smallest and most simple case I can find. > The stack trace is: > Caused by: org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: Customer (loaded object was of wrong class) > at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:890) > at org.hibernate.loader.Loader.getRow(Loader.java:846) > at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:305) > at org.hibernate.loader.Loader.loadSingleRow(Loader.java:238) > at org.hibernate.impl.ScrollableResultsImpl.prepareCurrentRow(ScrollableResultsImpl.java:477) > at org.hibernate.impl.ScrollableResultsImpl.next(ScrollableResultsImpl.java:106) > at HbxXmlTest.main(HbxXmlTest.java:90) > The included files are: > Test.hbm.xml : the hbm file to create the classes > HbmXmlTest.java : the the java source to reproduce the issue. > Greetings, > Roland. -- 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-05-06 04:36:48
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039?page=all ] Steve Ebersole updated HHH-1039: -------------------------------- Fix Version: 3.2.0 (was: 3.2.0.cr2) > WrongClassException when scrolling through EntityMode.DOM4J and loading identical objects from different fields > --------------------------------------------------------------------------------------------------------------- > > Key: HHH-1039 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039 > Project: Hibernate3 > Type: Bug > Versions: 3.0.5 > Environment: Windows XP, JDK 1.4.2_8, Hibernate 3.0.5, Oracle 9.2. Replicated on Windows XP, JDK 1.5.0_2, Hibernate 3.0.5, MySQL > Reporter: Roland Groen > Fix For: 3.2.0 > Attachments: HbmXmlTest.java, Test.hbm.xml > > > When working with XML representations of entities, an unexpected org.hibernate.WrongClassException is thrown when working with identical embedded objects (embed-xml="true") which have different field names. > org.hibernate.WrongClassException seems to be thrown when: > 1) Running in EntityMode.DOM4J > 2) Scrolling through a result set using session.scroll() > 3) Embedding objects that are: > a) Referred by least by one of the objects on which the query is selecting primarily (parent object) and, > b) that field is in FetchMode.JOIN. > c) Referred by one object which is embedded (embed-xml="true") and uses a different field name to refer to the object than the parent object. > I would like to apologise for the large test case. The bug is quite hard to reproduce, I tried to minimise the test, but this seems the smallest and most simple case I can find. > The stack trace is: > Caused by: org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: Customer (loaded object was of wrong class) > at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:890) > at org.hibernate.loader.Loader.getRow(Loader.java:846) > at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:305) > at org.hibernate.loader.Loader.loadSingleRow(Loader.java:238) > at org.hibernate.impl.ScrollableResultsImpl.prepareCurrentRow(ScrollableResultsImpl.java:477) > at org.hibernate.impl.ScrollableResultsImpl.next(ScrollableResultsImpl.java:106) > at HbxXmlTest.main(HbxXmlTest.java:90) > The included files are: > Test.hbm.xml : the hbm file to create the classes > HbmXmlTest.java : the the java source to reproduce the issue. > Greetings, > Roland. -- 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-06-28 16:46:17
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039?page=all ] Steve Ebersole updated HHH-1039: -------------------------------- Fix Version: 3.2.2 (was: 3.2.0.cr3) > WrongClassException when scrolling through EntityMode.DOM4J and loading identical objects from different fields > --------------------------------------------------------------------------------------------------------------- > > Key: HHH-1039 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1039 > Project: Hibernate3 > Type: Bug > Versions: 3.0.5 > Environment: Windows XP, JDK 1.4.2_8, Hibernate 3.0.5, Oracle 9.2. Replicated on Windows XP, JDK 1.5.0_2, Hibernate 3.0.5, MySQL > Reporter: Roland Groen > Fix For: 3.2.2 > Attachments: HbmXmlTest.java, Test.hbm.xml > > > When working with XML representations of entities, an unexpected org.hibernate.WrongClassException is thrown when working with identical embedded objects (embed-xml="true") which have different field names. > org.hibernate.WrongClassException seems to be thrown when: > 1) Running in EntityMode.DOM4J > 2) Scrolling through a result set using session.scroll() > 3) Embedding objects that are: > a) Referred by least by one of the objects on which the query is selecting primarily (parent object) and, > b) that field is in FetchMode.JOIN. > c) Referred by one object which is embedded (embed-xml="true") and uses a different field name to refer to the object than the parent object. > I would like to apologise for the large test case. The bug is quite hard to reproduce, I tried to minimise the test, but this seems the smallest and most simple case I can find. > The stack trace is: > Caused by: org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: Customer (loaded object was of wrong class) > at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:890) > at org.hibernate.loader.Loader.getRow(Loader.java:846) > at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:305) > at org.hibernate.loader.Loader.loadSingleRow(Loader.java:238) > at org.hibernate.impl.ScrollableResultsImpl.prepareCurrentRow(ScrollableResultsImpl.java:477) > at org.hibernate.impl.ScrollableResultsImpl.next(ScrollableResultsImpl.java:106) > at HbxXmlTest.main(HbxXmlTest.java:90) > The included files are: > Test.hbm.xml : the hbm file to create the classes > HbmXmlTest.java : the the java source to reproduce the issue. > Greetings, > Roland. -- 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 |