When I click on Licence and select "Open Mapping Diagram.." I get the following error.
LicenceType is an Enum defined as follows:
public static enum LicenceType {
GLOBAL,
SITE,
SINGLE;
}
I also have a Region Enum that is a Top-Level type and the same error occurs for persistent classes that have a Region field.
Addint the Enum type to the mappings in my hibernate.cfg.xml has no effect.
The classpath for the project is correct as there are no compilation problems and my launch configurations work (I run a Jetty server).
Hibernate version:
3.2.4.sp1
Mapping documents:
None
Code between sessionFactory.openSession() and session.close():
Not relevant - internal to HibernateTools
Full stack trace of any exception that occurs:
(!) Error opening the editor [<< Details]
java.lang.ClassNotFoundException: net.myprogram.om.Licence$LicenceType
at java.lang.ClassLoader.findClass(ClassLoader.java:413)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:429)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
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:242)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:112)
at org.hibernate.type.EnumType.setParameterValues(EnumType.java:286)
at org.hibernate.type.TypeFactory.injectParameters(TypeFactory.java:339)
at org.hibernate.type.CustomType.<init>(CustomType.java:67)
at org.hibernate.type.TypeFactory.heuristicType(TypeFactory.java:245)
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:260)
at org.hibernate.mapping.Property.getType(Property.java:50)
at org.jboss.tools.hibernate.ui.view.views.OrmModelImageVisitor.visitPersistentField(OrmModelImageVisitor.java:111)
at org.jboss.tools.hibernate.ui.view.views.OrmLabelProvider.getImage(OrmLabelProvider.java:58)
at org.jboss.tools.hibernate.ui.veditor.editors.parts.ShapeEditPart.createFigure(ShapeEditPart.java:72)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.getFigure(AbstractGraphicalEditPart.java:445)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addChildVisual(AbstractGraphicalEditPart.java:197)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:197)
at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:727)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:677)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:564)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:235)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:212)
at org.jboss.tools.hibernate.ui.veditor.editors.parts.OrmShapeEditPart.addNotify(OrmShapeEditPart.java:44)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:198)
at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:727)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:677)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:564)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:235)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:212)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:198)
at org.eclipse.gef.editparts.SimpleRootEditPart.setContents(SimpleRootEditPart.java:101)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents(AbstractEditPartViewer.java:601)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents(AbstractEditPartViewer.java:610)
at org.jboss.tools.hibernate.ui.veditor.editors.VisualEditor.initializeGraphicalViewer(VisualEditor.java:56)
at org.eclipse.gef.ui.parts.GraphicalEditor.createGraphicalViewer(GraphicalEditor.java:153)
at org.eclipse.gef.ui.parts.GraphicalEditor.createPartControl(GraphicalEditor.java:163)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:426)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:263)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2739)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2651)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:2643)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2595)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2590)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2574)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2557)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:433)
at org.jboss.tools.hibernate.ui.view.views.OpenDiagramActionDelegate.run(OpenDiagramActionDelegate.java:51)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1519)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1295)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3350)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2954)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
Name and version of the database you are using:
MySQL (4.1.10)
The generated SQL (show_sql=true):
Not relevant
Debug level Hibernate log excerpt:
None
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html