Hi,
I recently upgraded my application from Hibernate 2 to Hibernate 3.0.5. I follwed the migration instruction for Hibernate 3. My application ran fine with Hibernate 2. When running with Hibernate 3 I constantly get the error:
"No tuplizer found for entity-mode [pojo]"
Does anybody have a clue why I get this error message?It is obvious that the exception is thrown in Hibernate's TuplizerLookup when my code calls getPropertyValue on a ClassMetadata instance, like:
Collection coll = (Collection) clsmd.getPropertyValue(element, class_coll_name, ent_mode);
During application startup I get mapping messages from HbmBinder like:
"Mapping collection: org.proteios.core.element.Description.adminCollection -> Admin"
This is when using a mapping like:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class
name="org.proteios.core.element.Admin"
table="`Admin`"
dynamic-update="false"
dynamic-insert="false"
>
<id
name="auto_id"
column="auto_id"
type="java.lang.Long"
>
<generator class="hilo">
</generator>
</id>
<version
name="hibernateversion"
type="java.lang.Long"
column="hibernateversion"
access="property"
unsaved-value="undefined"
/>
<many-to-one
name="description"
class="org.proteios.core.element.Description"
cascade="none"
outer-join="auto"
update="true"
insert="true"
access="property"
column="`description`"
/>
To set up during application start, I do:
configuration.setProperties(props);
, reading in configuration properties from a file. And then for each class:
for(int i=0; i<element_classes.size(); ++i)
{
configuration.addClass((Class) element_classes.get(i));
}
These are just excerpts from my code, but hopefully the basic idea is clear enough. So, does anybody have a clue what causes the problem. Until Hibernate 3 I was happily unaware of tuplizers and entity modes...
|