Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
I get the following excpetion while trying to setup the hibernate console. I am using the right versionof the driver and eclipse. Cna you please help. I am not too sure what this points to. this particular class file it complains about is there in the class path. Its wierd. If I modify the mapping to remove the composite key then the tool (create session factory action) moves forward and errors out with the same error on the next composite-id class attribute in another mapping.
Is there any restriction with the usage of the composite-id attribute and the hibernate tool.
Hibernate version: h3b3
Mapping documents:
<hibernate-mapping package="foobarinc.estimate">
<class name="ItemEstProjected" table="TITEM_EST_PROJECTED">
<composite-id class="foobarinc.estimate.ItemEstProjectedPK" name="id">
<key-many-to-one
class="foobarinc.item.Item"
column="ITEM_KEY"
name="itemKey"
/>
<key-many-to-one
class="foobarinc.estimate.Quarter"
column="QTR_NBR"
name="qtrNbr"
/>
</composite-id>
------------
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
org.hibernate.MappingException: component class not found: foobarinc.estimate.ItemEstProjectedPK
at org.hibernate.mapping.Component.getComponentClass(Component.java:96)
at org.hibernate.mapping.Component.getType(Component.java:161)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:207)
at org.hibernate.mapping.RootClass.validate(RootClass.java:186)
at org.hibernate.cfg.Configuration.validate(Configuration.java:791)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1025)
at org.hibernate.console.ConsoleConfiguration$1.execute(ConsoleConfiguration.java:221)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76)
at org.hibernate.console.ConsoleConfiguration.initSessionFactory(ConsoleConfiguration.java:219)
at org.hibernate.eclipse.console.actions.BuildSessionFactoryAction.doRun(BuildSessionFactoryAction.java:51)
at org.hibernate.eclipse.console.actions.ConsoleConfigurationBasedAction.run(ConsoleConfigurationBasedAction.java:47)
at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:167)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:555)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:505)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:419)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2803)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2448)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1569)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1540)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:285)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:220)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:710)
at org.eclipse.core.launcher.Main.main(Main.java:694)
Caused by: java.lang.ClassNotFoundException: foobarinc.estimate.ItemEstProjectedPK
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:404)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(AbstractClassLoader.java:93)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103)
at org.hibernate.mapping.Component.getComponentClass(Component.java:93)
... 33 more
Name and version of the database you are using:
Oracle 9i
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: