-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: NullPointerException when using SchemaExport
PostPosted: Tue Oct 21, 2003 11:15 pm 
Newbie

Joined: Tue Oct 21, 2003 10:47 pm
Posts: 10
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.