when i run the hbm2java, it prints the error message.
This is my mapping document:
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="org.hibernate.sample.Contact"
table="contact"
>
<meta attribute="class-description" inherit="false">
@hibernate.class
table="contact"
</meta>
<id
name="id"
type="java.lang.Long"
column="id"
>
<meta attribute="field-description">
@hibernate.id
generator-class="assigned"
type="java.lang.Long"
column="id"
</meta>
<generator class="assigned" />
</id>
<property
name="type"
type="java.lang.String"
column="type"
/>
<!-- <meta attribute="field-description">
@hibernate.property
column="type"
</meta>
</property> -->
<property
name="content"
type="java.lang.String"
column="content"
length="40"
/>
<!-- <meta attribute="field-description">
@hibernate.property
column="content"
length="40"
</meta>
</property>
Associations -->
<!-- bi-directional many-to-one association to User -->
<many-to-one
name="user"
class="org.hibernate.sample.User"
not-null="true"
>
<meta attribute="field-description">
@hibernate.many-to-one
not-null="true"
@hibernate.column name="user_id"
</meta>
<column name="user_id" />
</many-to-one>
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs:
java.lang.NullPointerException
at net.sf.hibernate.tool.hbm2java.BasicRenderer.isPropertySet(BasicRende
rer.java:611)
at net.sf.hibernate.tool.hbm2java.BasicRenderer.generateConcreteEmptyCla
sses(BasicRenderer.java:332)
at net.sf.hibernate.tool.hbm2java.BasicRenderer.render(BasicRenderer.jav
a:59)
at net.sf.hibernate.tool.hbm2java.Generator.write(Generator.java:138)
at net.sf.hibernate.tool.hbm2java.Generator.writeRecur(Generator.java:11
5)
at net.sf.hibernate.tool.hbm2java.Generator.generate(Generator.java:104)
at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:
125)