[jboss-user] [JBoss Tools (users)] - Re: using HQL editor with JBoss Tools

asookazian do-not-reply at jboss.com
Fri Apr 4 14:14:07 EDT 2008


Eclipse Version: 3.3.1.1
JBoss Tools version 2.0.0.GA

I followed your directions as well as these:

https://www.redaht.com/docs/manuals/jboss/jboss-eap-4.2/doc/seam/Seam_Reference_Guide/CRUD_application_generator-Creating_a_Hibernate_Console_configuration.html


The directions need to be a lot more specific (there are 5 tabs in the Hibernate Console Configuration wizard) and the screenshot in the link above is missing.

In the main tab I entered the name of my project (in this case "ISA") that was created as a java project with SVN folders (I copied it from the original location on my C drive for testing purposes).  Since this is a JPA project, I left the property file entry empty.  Persistence unit name was copied from here:

<persistence-unit name="ICOMSSecurityAudit">

in the persistence.xml file.

For type I selected JPA obviously.

In the options tab, for naming strategy I entered "org.hibernate.cfg.NamingStrategy".  For entity resolver I entered "org.xml.sax.EntityResolver".  Both of these interfaces are in my classpath when I switch to the JavaEE perspective.

The last three tabs I don't enter anything (classpath, mappings, common). and click OK.

Immediately afterwards I see some exceptions in the error log:


  | org.hibernate.HibernateException: /hibernate.cfg.xml not found
  | 
  | An exception stack trace is not available.
  | 
  | 
  | org.hibernate.console.HibernateConsoleRuntimeException: Could not load JPA Configuration
  | 
  | An exception stack trace is not available.
  | 
  | org.hibernate.console.HibernateConsoleRuntimeException: Could not compute classpath
  | 
  | An exception stack trace is not available.
  | 
  | Unhandled event loop exception
  | 
  | org.hibernate.console.HibernateConsoleRuntimeException: Could not compute classpath
  | 	at org.hibernate.eclipse.console.EclipseLaunchConsoleConfigurationPreferences.getCustomClassPathURLS(EclipseLaunchConsoleConfigurationPreferences.java:93)
  | 	at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:158)
  | 	at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:106)
  | 	at org.hibernate.eclipse.console.actions.ExecuteQueryAction.execute(ExecuteQueryAction.java:66)
  | 	at org.hibernate.eclipse.console.actions.ExecuteQueryAction.run(ExecuteQueryAction.java:52)
  | 	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
  | 	at org.hibernate.eclipse.console.actions.ExecuteQueryAction.runWithEvent(ExecuteQueryAction.java:56)
  | 	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$6.handleEvent(ActionContributionItem.java:443)
  | 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
  | 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
  | 	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
  | 	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
  | 	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)
  | Caused by: org.eclipse.core.runtime.CoreException: Launch configuration ICOMSSecurityAudit references non-existing project ICOMSSecurityAudit.
  | 	at org.eclipse.jdt.launching.JavaRuntime.abort(JavaRuntime.java:1321)
  | 	at org.eclipse.jdt.launching.JavaRuntime.getJavaProject(JavaRuntime.java:1201)
  | 	at org.eclipse.jdt.launching.StandardClasspathProvider.computeUnresolvedClasspath(StandardClasspathProvider.java:39)
  | 	at org.eclipse.jdt.launching.JavaRuntime.computeUnresolvedRuntimeClasspath(JavaRuntime.java:1167)
  | 	at org.hibernate.eclipse.console.utils.ClassLoaderHelper.getClasspath(ClassLoaderHelper.java:146)
  | 	at org.hibernate.eclipse.console.EclipseLaunchConsoleConfigurationPreferences.getCustomClassPathURLS(EclipseLaunchConsoleConfigurationPreferences.java:84)
  | 	... 33 more
  | 

eclipse.buildId=M20071023-1652
  | java.version=1.5.0_13
  | java.vendor=Sun Microsystems Inc.
  | BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
  | Command-line arguments:  -os win32 -ws win32 -arch x86 -data C:\Documents and Settings\asookazi\workspace\testHQLeditor
  | 

NOTE: I don't have any of these errors in my original Java project.

Please advise.  thx.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141723#4141723

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141723



More information about the jboss-user mailing list