Code snip here:
Code:
<hibernate-mapping>
<class
name="inventory.InventoryItem"
table="inventory_item">
<id name="ID"
column="inventory_item_id"
type="long"
unsaved-value="-1">
<generator class="increment"/>
</id>
Error msg here:
2003-12-15 17:29:46,785 ERROR main test.inventory.InventoryItemTest - could not instantiate id generator: increment
java.lang.ClassNotFoundException: increment
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
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.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:255)
at net.sf.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:64)
at net.sf.hibernate.mapping.Value.createIdentifierGenerator(Value.java:78)
at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:489)
at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:623)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:203)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:594)
at database.HibernateSesssionFactoryManager.getFactory(HibernateSesssionFactoryManager.java:40)
at test.inventory.InventoryItemTest.setUp(InventoryItemTest.java:35)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at junit.textui.TestRunner.start(TestRunner.java:172)
at com.intellij.rt.execution.junit.TextTestRunner.main(TextTestRunner.java:12)
rethrown as
net.sf.hibernate.MappingException: could not instantiate id generator: increment
at net.sf.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:70)
at net.sf.hibernate.mapping.Value.createIdentifierGenerator(Value.java:78)
at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:489)
at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:623)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:203)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:594)
at database.HibernateSesssionFactoryManager.getFactory(HibernateSesssionFactoryManager.java:40)
at test.inventory.InventoryItemTest.setUp(InventoryItemTest.java:35)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at junit.textui.TestRunner.start(TestRunner.java:172)
at com.intellij.rt.execution.junit.TextTestRunner.main(TextTestRunner.java:12)
Caused by: java.lang.ClassNotFoundException: increment
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
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.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:255)
at net.sf.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:64)
... 17 more