[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1877) ClassNotFoundException on my entity-name in a join tag
Roman Pichlík (JIRA)
noreply at atlassian.com
Thu Aug 2 12:41:11 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roman Pichlík updated HHH-1877:
-------------------------------
Attachment: HHH-1877.patch
Issue patch. Successfully tested on 3.2.4 SP1.
> ClassNotFoundException on my entity-name in a join tag
> ------------------------------------------------------
>
> Key: HHH-1877
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1877
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.1.3
> Environment: Hibernate 3.1.3, Spring 1.2.8, Oracle 9I, Windows XP (localhost)
> Reporter: Christian Mineau
> Attachments: HHH-1877.patch
>
>
> I use the attribute "entity-name" in my class mapping, this is for mapping the same object many times on table(s), and all seem to work normally. I found a problem when I tried to join a table on another class mapping, like:
> <class entity-name="categoryDefault" name="ca.cie.pak.CategoryVO" table="CATEGORY">
> <id name="id" column="CATEGORY_ID" type="java.lang.Integer">
> <generator class="native"/>
> </id>
> <property name="name" column="NAME"/>
>
> <bag name="contents" where="priority = 0">
> <key column="CATEGORY_ID" />
> <one-to-many entity-name="ContentSummary"/>
> </bag>
>
> <join table="LAYOUT_CATEGORY">
> <key foreign-key="CATEGORY_ID" column="CATEGORY_ID" />
> <property name="layoutId" column="LAYOUT_ID"/>
> </join>
> </class>
> I found a ClassNotFoundException: categoryDefault. This exception is thrown when the HbmBinder.bindJoin method is called. I see the code and it tries to instantiate a class from the getEntityName and not by the className.
> Someone can answer me if this is a XML mapping error or a real bug and what I need to do.
--
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
More information about the hibernate-issues
mailing list