Hi,
I'm trying automatically generate my DB schema from my mappings using a XDoclet->.hbm.xml->schema pattern, but SchemaExport crashes with a NullPointerException when lists are included in the mapping.
The fragment that seems to cause it looks like this:
Code:
<list
name="groups"
table="group_map"
lazy="true"
inverse="false"
cascade="none"
>
<key
column="member_id"
/>
<many-to-many
class="com.brokerunity.model.Group"
column="group_id"
outer-join="auto"
/>
</list>
This causes the following error:
Code:
java.lang.NullPointerException
at net.sf.hibernate.cfg.Binder.getTypeFromXML(Binder.java:802)
at net.sf.hibernate.cfg.Binder.bindValue(Binder.java:357)
at net.sf.hibernate.cfg.Binder.bindIntegerValue(Binder.java:522)
at net.sf.hibernate.cfg.Binder.bindListSecondPass(Binder.java:979)
at net.sf.hibernate.cfg.Binder$ListSecondPass.secondPass(Binder.java:1255) at net.sf.hibernate.cfg.Binder$SecondPass.doSecondPass(Binder.java:1193) at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:511) at net.sf.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:366) at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:56) at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.getSchemaExport(SchemaExportTask.java:197) at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:130) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
Can anybody shed any light on this?
Thanks.