[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1877?page=c...
]
Guillaume Jeudy commented on HHH-1877:
--------------------------------------
We are hitting the same issue but with a different usecase:
The mapping is stripped down for simplicity:
<class name="SpecificationImpl" table="SPECIFICATION"
entity-name="SpecificationEagerLoad">
<id name="id" column="SPECIFICATION_ID"
type="long">
<generator class="assigned" />
</id>
<discriminator column="TYPE_CD" />
<subclass name="CoverageGroupImpl"
entity-name="CoverageGroupEagerLoad" discriminator-value="CGS">
<join table="COVERAGE_GROUP_SPECIFICATION">
<key column="SPECIFICATION_ID" />
<property name="annualStatementLine"
column="ANNUAL_STATEMENT_LINE_CD" />
</join>
</subclass>
Fails with:
Caused by: org.hibernate.MappingException: class CoverageGroupEagerLoad not found while
looking for property: annualStatementLine
at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:279)
at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2171)
at org.hibernate.cfg.HbmBinder.bindJoin(HbmBinder.java:992)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2104)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2038)
at org.hibernate.cfg.HbmBinder.bindSubclass(HbmBinder.java:820)
at org.hibernate.cfg.HbmBinder.handleSubclass(HbmBinder.java:2217)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2108)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2038)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:359)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:273)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144)
at org.hibernate.cfg.Configuration.add(Configuration.java:675)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:510)
at org.hibernate.cfg.Configuration.addJar(Configuration.java:624)
... 51 more
Caused by: java.lang.ClassNotFoundException: CoverageGroupEagerLoad
Ive checked hibernate 3.3.1.GA and the bug is still there in HbmBinder.bindJoin() method.
Any plans that this be fixed in the next GA release? The fix appears trivial.
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: 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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira