[JBoss Tools (users)] - Re: Hibernate Configurations problem
by asookazian
"max.andersen(a)jboss.com" wrote : if you put BEST\resources in your classpath the persistence.xml should be located in BEST\resources\META-INF\persistence.xml
|
| Note: in 3.1 we will add in support for random located persistence units to avoid all this fuzzyness ;)
great! this worked. now the problem is I keep getting this error when I try running simple HQL queries:
Error
| Tue Mar 10 16:48:26 PDT 2009
| java.lang.IllegalArgumentException: node to traverse cannot be null!
|
| java.lang.IllegalArgumentException: node to traverse cannot be null!
| at org.hibernate.hql.ast.util.NodeTraverser.traverseDepthFirst(NodeTraverser.java:31)
| at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:254)
| at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157)
| at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
| at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
| at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
| at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
| at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
| at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
| at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
| at org.hibernate.console.HQLQueryPage.setSession(HQLQueryPage.java:106)
| at org.hibernate.console.ConsoleConfiguration$4.execute(ConsoleConfiguration.java:426)
| at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
| at org.hibernate.console.ConsoleConfiguration.executeHQLQuery(ConsoleConfiguration.java:421)
| at org.hibernate.eclipse.hqleditor.HQLEditor.executeQuery(HQLEditor.java:416)
| at org.hibernate.eclipse.console.actions.ExecuteQueryAction.execute(ExecuteQueryAction.java:73)
| at org.hibernate.eclipse.console.actions.ExecuteQueryAction.run(ExecuteQueryAction.java:53)
| at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
| at org.hibernate.eclipse.console.actions.ExecuteQueryAction.runWithEvent(ExecuteQueryAction.java:57)
| at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
| at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
| at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
| at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
| at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
| at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
| at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
| at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
| at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
| at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
| at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
| at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
| at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
| at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
| at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
| at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
| at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
| at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
| at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
| at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
| 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:549)
| at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
| at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
|
|
queries in HQL editor:
select e from Equipment as e
|
| select a from ApplicationSetting a
any idea why this is happening? The entities exist:
@Entity
| @Table(name = "Equipment", uniqueConstraints = @UniqueConstraint(columnNames = "SerialNumber"))
| public class Equipment implements java.io.Serializable {
| ...
| }
Is something required in orm.xml (I thought orm.xml was optional if you use annotations in your JPA entity classes).
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216812#4216812
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216812
17 years, 1 month
[JBoss Tools (users)] - Re: Seam components view problem with JBDS 1.1.0.GA
by max.andersen@jboss.com
Ok, this thread is moving faster than I can type ;)
Let me answer some of the questions I could spot:
1) Did JBoss Tools at some point only work with the WTP style project ?
Yes - JBT 2/JBDS 1 was solely WTP
2) Does JBoss Tools work with the seam-gen styled project (or any other style than WTP ?)
Yes - JBT 3.x/JBDS 2.x supports setting up your own project structure. To get our wizards etc. to work you need to enable Seam support in project properties of each project and make sure the various out put directories are set to something existent.
3) Does seam-gen generate something that works in JBoss Tools ?
It does, but there was/is a bug that natures are not enabled fully. Solution is to go to project properties and then disable/enable Seam to force installation of the project nature/builder so we get notified of Seam project related changes.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216803#4216803
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216803
17 years, 1 month