-->
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: NoClassDefFoundError in net.sf.hibernate.cfg.Binder?
PostPosted: Fri Mar 05, 2004 4:15 pm 
Newbie

Joined: Mon Jan 26, 2004 4:21 pm
Posts: 10
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.


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.