Regular |
|
Joined: Wed Jan 07, 2004 5:16 pm Posts: 65 Location: CA, USA
|
I have a class mapped to a DB2 table, in which I am using the identity generator for the primary key.
In my mapping class I have something like this:
<hibernate-mapping>
<class
name="test.Example"
table="test"
>
<id
name="id"
column="id"
type="integer"
unsaved-value="0"
>
<generator class="identity">
</generator>
</id>
<property
name="someProperty"
type="int"
column="some_property"
/>
... etc ...
(the mapping was generated from Hibernate xdoclet tags.
When I try and save an instance of this class I get this exception:
net.sf.hibernate.MappingException: could not instantiate id generator
at net.sf.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:82)
at net.sf.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:80)
at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:630)
at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:741)
at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:41)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:136)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:726)
...etc...
Caused by: java.lang.ClassNotFoundException:
at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code))
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java(Compiled Code))
at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:75)
at net.sf.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:76)
I have a ClassNotFoundExcpetion, but the rest of the message is blank (ie I don't know what class it is looking for).
Has anyone else seen this? Any ideas on how I can resolve this?
Thanks,
Kevin Hooke
|
|