I just recently updated to Eclipse 3.5. I have tried the stable/development/nightly builds of the Hibernate Tools to no avail.
The error I am getting is when I open my Hib configuration View, select my configuration, then open the Session Factory node, I get an error that my class for the composite-id is not found. I know for a fact that this worked in Eclipse 3.4 (no coding changes).
Anyone have any idea?
BTW...when I run my app...there are no problem when the Session Factory is called. only in the hibernate tools perspective/views.
Thanks in advance.
- Doug
Stack Trace in Eclipse Error console:
Code:
org.hibernate.MappingException: component class not found: com.project.model.AppProperty$Id
at org.hibernate.mapping.Component.getComponentClass(Component.java:104)
at org.hibernate.tuple.component.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:133)
at org.hibernate.tuple.component.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:43)
at org.hibernate.tuple.component.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:38)
at org.hibernate.tuple.component.ComponentEntityModeToTuplizerMapping.<init>(ComponentEntityModeToTuplizerMapping.java:52)
at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:50)
at org.hibernate.mapping.Component.buildType(Component.java:152)
at org.hibernate.mapping.Component.getType(Component.java:145)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.RootClass.validate(RootClass.java:193)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1102)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1287)
at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:505)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:94)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:500)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.ClassNotFoundException: com.positiontech.alllocal.model.AppProperty$Id
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
at org.hibernate.mapping.Component.getComponentClass(Component.java:101)
... 20 more
My Class definition (pared down):
Code:
public class AppProperty extends PTObject {
private static final long serialVersionUID = 1L;
public static class Id implements Serializable {
private static final long serialVersionUID = 1L;
private Integer resellerID;
private String name;
...
}
private Id id = new Id();
...
}
My mapping definition:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<class name="com.project.model.AppProperty"
table="app_properties">
<composite-id name="id"
class="com.project.model.AppProperty$Id">
<key-property name="resellerID" column="rid" type="integer"
length="4" />
<key-property name="name" column="parm_name" type="string"
length="50" />
</composite-id>
<property name="value" type="string" column="parm_value"
length="1600" not-null="true" />
<property name="description" type="string" column="parm_desc"
length="100" />
<property name="order" type="integer" column="seq" length="3" />
</class>
</hibernate-mapping>