Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.0.5
Mapping documents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.username">
postgres
</property>
<property name="hibernate.connection.password">
pg-admin
</property>
<property name="hibernate.dialect">
org.hibernate.dialect.PostgreSQLDialect
</property>
<property name="hibernate.connection.url">
jdbc:postgresql:testdb
</property>
<!-- <property name="hibernate.connection.url">jdbc:postgresql:cvrdb</property> -->
<property name="hibernate.connection.driver_class">
org.postgresql.Driver
</property>
<!-- mapping files -->
<mapping
resource="test/domain/DataBank.hbm.xml" />
</session-factory>
</hibernate-configuration>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<!--
Auto-generated mapping file from
the hibernate.org cfg2hbm engine
-->
<class name="test.domain.DataBank" table="databank"
schema="public">
<id name="id" type="long">
<column name="id" />
<generator class="sequence">
<param name="sequence">databank_id_seq</param>
</generator>
</id>
<property name="mti" type="string">
<column name="mti" length="5" />
</property>
<property name="field2" type="string">
<column name="field2" length="19" />
</property>
<property name="status" type="short">
<column name="status" />
</property>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Using eclipse 3.1 fresh install on winXP machine, jdk-1.5.0_03, hibernate tools plug in from :
http://download.jboss.org/jbosside/hibe ... velopment/
The plug-in runs OK for most part save that HQL Editor View is not shown anywhere in Hibernate Console Perspective.
Both Hibernate Dynamic Query Translator aand Hibernate Entity Model also do not work. Hibernate Configuration and Hibernate Query Result seems to be OK, though, working as expected.
hibernate.reveng.xml wizard is not seen anywhere.
Hibernate: Artifact Generation , Configuration File, Console Configuration and Reverse engineering work fine.
While in Hibernate Console perspective, clicking on Session Factory and its child node produced the following exception:
------------------------------------------------------
Error 2005-08-23 12:53:38.635 unexpected end of subtree []
org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree []
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:221)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:154)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:101)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:470)
at org.hibernate.impl.SessionFactoryImpl.getRepresentativeQuery(SessionFactoryImpl.java:755)
at org.hibernate.impl.SessionFactoryImpl.getReturnTypes(SessionFactoryImpl.java:745)
at org.hibernate.impl.AbstractQueryImpl.getReturnTypes(AbstractQueryImpl.java:501)
at org.hibernate.console.HQLQueryPage.getPathNames(HQLQueryPage.java:74)
at org.hibernate.eclipse.console.views.QueryPageViewer.addColumnsToTable(QueryPageViewer.java:215)
at org.hibernate.eclipse.console.views.QueryPageViewer.createTable(QueryPageViewer.java:170)
at org.hibernate.eclipse.console.views.QueryPageViewer.createControl(QueryPageViewer.java:153)
at org.hibernate.eclipse.console.views.QueryPageViewer.<init>(QueryPageViewer.java:111)
at org.hibernate.eclipse.console.views.QueryPageTabView.rebuild(QueryPageTabView.java:87)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.contentsChanged(QueryPageTabView.java:57)
at org.hibernate.eclipse.console.views.QueryPageTabView$1.intervalAdded(QueryPageTabView.java:61)
at javax.swing.AbstractListModel.fireIntervalAdded(AbstractListModel.java:130)
at org.hibernate.console.QueryPageModel.add(QueryPageModel.java:50)
at org.hibernate.console.KnownConfigurations$4.queryPageCreated(KnownConfigurations.java:71)
at org.hibernate.console.ConsoleConfiguration.fireQueryPageCreated(ConsoleConfiguration.java:255)
at org.hibernate.console.ConsoleConfiguration.access$300(ConsoleConfiguration.java:33)
at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:235)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.executeHQLQuery(ConsoleConfiguration.java:227)
at org.hibernate.eclipse.console.views.KnownConfigurationsView$3.run(KnownConfigurationsView.java:175)
at org.hibernate.eclipse.console.views.KnownConfigurationsView$1.doubleClick(KnownConfigurationsView.java:116)
at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:720)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148)
at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:718)
at org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect(StructuredViewer.java:950)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1057)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:219)
at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:216)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:275)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
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.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
Caused by: <AST>:0:0: unexpected end of subtree
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2913)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:676)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:532)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:269)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:217)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:214)
... 55 more
--------------------------------------------
Is there anything else I need to do to get it work propertly? I like to get the HQL Editor View working. The doc says : " This update contains all the plugins necessary to run the latest version of Hibernate Tools eclipse plugins."
Thanks,
/bernard