[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1877) ClassNotFoundException on my entity-name in a join tag

Paul Pogonyshev (JIRA) noreply at atlassian.com
Fri Jan 30 09:33:39 EST 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32228#action_32228 ] 

Paul Pogonyshev commented on HHH-1877:
--------------------------------------

I can confirm the patch works.

> ClassNotFoundException on my entity-name in a join tag
> ------------------------------------------------------
>
>                 Key: HHH-1877
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1877
>             Project: Hibernate Core
>          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: HBM-1877-patch.patch, HBM-1877-testcase.zip, HHH-1877.patch, testcase-HHH1877.ZIP
>
>
> 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