Beginner |
|
Joined: Wed Oct 22, 2003 11:26 am Posts: 31
|
Hi,
I am trying to map a collection (name="_qualities") using bad but it gives the following error.
java.lang.NoClassDefFoundError: org/odmg/DCollection
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at net.sf.hibernate.type.TypeFactory.bag(TypeFactory.java:175)
at net.sf.hibernate.mapping.Bag.getType(Bag.java:17)
at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:875)
at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:294)
at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1095)
at net.sf.hibernate.cfg.Configuration.add(Configuration.java:230)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252)
at net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:286)
at com.bunge.bgm.contract.business.domain.ContractMain.configure(ContractMain.java:40)
at com.bunge.bgm.contract.business.domain.ContractMain.main(ContractMain.java:383)
Exception in thread "main"
The mapping file is :
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping schema="BGM_CONTRACTS">
<class name="com.bunge.bgm.contract.business.domain.commodity.CommodityContext" table="T_COMMODITY_CONTEXT">
<id name="_id" column="ID" type="string">
<generator class="assigned"/>
</id>
<many-to-one name="_commodityGroup" column="COMMODITY_GROUP_ID"/>
<many-to-one name="_commodity" column="COMMODITY_ID"/>
<property name="_cropYear" column="CROP_YEAR"/>
<many-to-one name="_baseLocation" column="BASELOCATION_ID"/>
<many-to-one name="_packingType" column="PACKINGTYPE_ID"/>
<bag name="_qualities">
<key column="ID"/>
<one-to-many class="com.bunge.bgm.contract.business.domain.commodity.CommodityQuality"/>
</bag>
<many-to-one name="_quantity"/>
</class>
</hibernate-mapping>
<!-- parsed in 0ms -->
Am i doing something wrong in the mapping file for <bag name="_qualities"> ?
Please suggest.
Thanks in advance.
|
|