hallo,
i am using hibernate v2.1.
i've just integrated many-to-many mapping and got the following error.
i have odmg-3.0.jar and xml-apis.jar in my classpath, as i found as hints from other posts. but this does not solve my problem.
i replaced some values with foo and bar.
any ideas?
thanks,
norman
logger output:
Code:
...
19:27:31,725 INFO Environment:462 - Hibernate 2.1.2
19:27:31,729 INFO Environment:491 - hibernate.properties not found
19:27:31,735 INFO Environment:519 - using CGLIB reflection optimizer
19:27:31,747 INFO Configuration:854 - configuring from resource: /hibernate.cfg.xml
19:27:31,747 INFO Configuration:826 - Configuration resource: /hibernate.cfg.xml
19:27:32,193 INFO Configuration:311 - Mapping resource: de/inlet/gpc/mus/User.hbm.xml
19:27:32,316 INFO Binder:229 - Mapping class: de.inlet.gpc.mus.User -> users
19:27:32,396 INFO Binder:547 - Mapping collection: de.inlet.gpc.mus.User.fragments -> users_fragments
19:27:32,403 INFO Configuration:311 - Mapping resource: de/inlet/gpc/mus/Fragment.hbm.xml
19:27:32,445 INFO Binder:229 - Mapping class: de.inlet.gpc.mus.Fragment -> fragments
19:27:32,448 INFO Binder:547 - Mapping collection: de.inlet.gpc.mus.Fragment.users -> users_fragments
19:27:32,448 INFO Configuration:1017 - Configured SessionFactory: null
19:27:32,450 INFO Configuration:595 - processing one-to-many association mappings
19:27:32,464 INFO Configuration:604 - processing one-to-one association property references
19:27:32,465 INFO Configuration:629 - processing foreign key constraints
19:27:32,484 INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.MySQLDialect
19:27:32,485 INFO SettingsFactory:62 - Use outer join fetching: true
19:27:32,494 INFO DBCPConnectionProvider:56 - DBCP using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://foo/bar?autoReconnectForPools=true
19:27:32,494 INFO DBCPConnectionProvider:57 - Connection properties: {user=foo, password=bar}
19:27:32,531 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
19:27:32,762 INFO SettingsFactory:102 - Use scrollable result sets: true
19:27:32,763 INFO SettingsFactory:105 - Use JDBC3 getGeneratedKeys(): true
19:27:32,764 INFO SettingsFactory:108 - Optimize cache for minimal puts: false
19:27:32,764 INFO SettingsFactory:114 - echoing all SQL to stdout
19:27:32,771 INFO SettingsFactory:117 - Query language substitutions: {}
19:27:32,771 INFO SettingsFactory:128 - cache provider: net.sf.ehcache.hibernate.Provider
19:27:32,774 INFO Configuration:1080 - instantiating and configuring caches
19:27:32,879 INFO SessionFactoryImpl:119 - building session factory
java.lang.NoClassDefFoundError
at de.inlet.gpc.mus.DatabaseWrapper.getAllFragments(DatabaseWrapper.java:85)
at de.inlet.gpc.mus.Playfield.load(Playfield.java:23)
at de.inlet.gpc.mus.Playfield.<init>(Playfield.java:19)
at de.inlet.gpc.mus.MuServer.run(MuServer.java:55)
...
example mapping xml file:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class
name="de.inlet.gpc.mus.User"
table="users"
dynamic-update="false"
dynamic-insert="false"
>
<id
name="id"
column="id"
type="int"
>
<generator class="native">
</generator>
</id>
<property
name="username"
type="java.lang.String"
update="true"
insert="true"
column="username"
/>
<property
name="password"
type="java.lang.String"
update="true"
insert="true"
column="password"
/>
<property
name="email"
type="java.lang.String"
update="true"
insert="true"
column="email"
/>
<property
name="fullname"
type="java.lang.String"
update="true"
insert="true"
column="fullname"
/>
<property
name="verified"
type="boolean"
update="true"
insert="true"
column="verified"
/>
<set
name="fragments"
table="users_fragments"
lazy="false"
inverse="false"
cascade="none"
sort="unsorted"
>
<key
column="id"
/>
<many-to-many
class="de.inlet.gpc.mus.Fragment"
column="id"
outer-join="auto"
/>
</set>
<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-User.xml
containing the additional properties and place it in your merge dir.
-->
</class>
</hibernate-mapping>