Announcement Announcement Module
Collapse
No announcement yet.
Hibernate one-to-many Mapping Problem - org/odmg/DSet Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    You need odmg.jar on your classpath, plus make sure you only have one cpoy of hibernate and odmg on your classpath.

    Rob

    Comment


    • #3
      *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...

      Comment

      Working...
      X