Results 1 to 3 of 3

Thread: Hibernate one-to-many Mapping Problem - org/odmg/DSet

  1. #1

    Default Hibernate one-to-many Mapping Problem - org/odmg/DSet

    hello again...

    i try mapping my orders collection in my customer class via hibernate one-to-many association. but get following error. everything from spring dependencies is included in my classpath, hibernate2.jar as well.

    Code:
    java.lang.ExceptionInInitializerError
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/odmg/DSet
    the customer class holds simply a java.util.Set with the customers. both tables workung fine without mapping them together.

    the interesting part of the mapping file is the following:
    Code:
    <set
        	name="orders">
           	<key column="CUSTOMER_ID"/>
            <one-to-many class="Order"/>
        </set>
    any idea, why hibernate searches for a standard java Set and gives a NoClassDefFoundError?

  2. #2
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    You need odmg.jar on your classpath, plus make sure you only have one cpoy of hibernate and odmg on your classpath.

    Rob
    Rob Harrop
    Lead Engineer, dm Server
    SpringSource
    http://www.springsource.com

    Co-Author - Pro Spring

  3. #3

    Default

    *yeah* it works...

    i copied the odmg.jar from the spring 1.01 with dependencies distribution, because it lacks in the 1.2 distribution...

    thanx for the fast help...

Similar Threads

  1. Replies: 1
    Last Post: Jul 5th, 2005, 03:48 AM
  2. Replies: 13
    Last Post: Dec 7th, 2004, 10:00 AM
  3. Replies: 3
    Last Post: Nov 19th, 2004, 07:16 PM
  4. Replies: 2
    Last Post: Sep 5th, 2004, 10:49 AM
  5. Replies: 5
    Last Post: Aug 27th, 2004, 07:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •