Joined: Thu Feb 03, 2005 6:59 pm Posts: 2
|
Hi,
I'm implementing a generic persistency mechanism for a
workflow engine. There I need the new features of hibernate 3.0.
It works great but when I try to add the following mapping document
to the configuration I get the stack trace below. The exception
occurs when I try to nest a <bag> inside a <component> inside a <dynamic-component>. It looks quite complex but according to the DTD this structure should be supported. Any help is highly appreciated!
Hibernate version: 3.0beta
Mapping documents:
<?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 default-lazy="false">
<class name="ch.truesolutions.hibernate.Artifact" table="ZOO1" entity-name="ZOO1">
<id name="id" type="long" unsaved-value="0" >
<generator class="native"/>
</id>
<dynamic-component name="groupLists">
<component name="address" class="ch.truesolutions.hibernate.GroupList">
<bag name="groups"
cascade="save-update"
lazy="false">
<key column="ZOO1_ID"/>
<one-to-many entity-name="ADDRESS1"/>
</bag>
</component>
</dynamic-component>
</class>
<class name="ch.truesolutions.hibernate.Group" entity-name="ADDRESS1" table="ADDRESS1" >
<id name="id" type="long" unsaved-value="0" >
<generator class="native"/>
</id>
...
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs:
ERROR [main] (Configuration.java:304) - Could not configure datastore from XML
java.lang.NullPointerException
at org.hibernate.util.StringHelper.qualify(StringHelper.java:201)
at org.hibernate.cfg.HbmBinder.bindCollection(HbmBinder.java:914)
at org.hibernate.cfg.HbmBinder$4.create(HbmBinder.java:2193)
at org.hibernate.cfg.HbmBinder.bindComponent(HbmBinder.java:1287)
at org.hibernate.cfg.HbmBinder.bindComponent(HbmBinder.java:1315)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1490)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:589)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:1848)
at org.hibernate.cfg.Configuration.add(Configuration.java:344)
at org.hibernate.cfg.Configuration.addXML(Configuration.java:301)
at ch.truesolutions.hibernate.HibernateHelper.<init>(HibernateHelper.java:65)
at ch.truesolutions.hibernate.HibernateHelper.getInstance(HibernateHelper.java:56)
at ch.truesolutions.hibernate.TestHibernate.main(TestHibernate.java:39)
ERROR [main] (HibernateHelper.java:77) - Building SessionFactory failed.
org.hibernate.MappingException: java.lang.NullPointerException
at org.hibernate.cfg.Configuration.addXML(Configuration.java:305)
at ch.truesolutions.hibernate.HibernateHelper.<init>(HibernateHelper.java:65)
at ch.truesolutions.hibernate.HibernateHelper.getInstance(HibernateHelper.java:56)
at ch.truesolutions.hibernate.TestHibernate.main(TestHibernate.java:39)
Caused by: java.lang.NullPointerException
at org.hibernate.util.StringHelper.qualify(StringHelper.java:201)
at org.hibernate.cfg.HbmBinder.bindCollection(HbmBinder.java:914)
at org.hibernate.cfg.HbmBinder$4.create(HbmBinder.java:2193)
at org.hibernate.cfg.HbmBinder.bindComponent(HbmBinder.java:1287)
at org.hibernate.cfg.HbmBinder.bindComponent(HbmBinder.java:1315)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1490)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:589)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:1848)
at org.hibernate.cfg.Configuration.add(Configuration.java:344)
at org.hibernate.cfg.Configuration.addXML(Configuration.java:301)
|
|