Hi all,
I'm getting a NoClassDefFoundError I can't explain.
I have a Foo class:
Code:
public class Foo{
private String id;
private String name;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
and a Foo. hbm.xml file as follow:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="test.Foo" table="foo">
<id name="id" type="string" unsaved-value="null" >
<column name="id" length="32" not-null="true"/>
<generator class="uuid.hex"/>
</id>
<property name="name">
<column name="name" sql-type="varchar(20)"/>
</property>
</class>
</hibernate-mapping>
When I call:
Code:
cfg.addClass(test.Foo.class);
I get a NoClassDefFoundError .
here is the Hibernate trace:
Code:
INFO 2004-03-05 11:55:56,413 net.sf.hibernate.cfg.Binder -- Mapping class: test.Foo -> foo
DEBUG 2004-03-05 11:55:56,413 net.sf.hibernate.cfg.Binder -- Mapped property: id -> id, type: string
Now, when I remove the property tag from Foo.hbm.xml, it works fine.
Any idea?
Thanks,
Susie.