Hi,
I'm trying to fetch the "children" of a database in the Hibernate Console Perspective in Eclipse. The problem is that there seem to be no way to specify a set of tables of interest. E.g. I'm accessing a database with *a lot* of tables and even if I specify a default schema it takes *ages* to fetch the children. I'm using the Hibernate tool as an Eclipse plugin (HibernateTools-3.1.0.beta2)
Each fetch of a child (table) gives these warnings:
Code:
!ENTRY org.hibernate.eclipse 2 30000 2006-01-23 15:58:51.49
!MESSAGE WARN Worker-6 org.hibernate.cfg.JDBCBinder - The JDBC driver didn't report any primary key columns in PP_EJ55_VURD_TYPE. Asking rev.eng. strategy
!ENTRY org.hibernate.eclipse 2 30000 2006-01-23 15:58:51.81
!MESSAGE WARN Worker-6 org.hibernate.cfg.JDBCBinder - Rev.eng. strategy did not report any primary key columns for PP_EJ55_VURD_TYPE
In the end the final error comes:
Code:
!ENTRY org.hibernate.eclipse.console 4 150 2006-01-23 16:05:32.727
!MESSAGE Exception while executing HQL Query
!SUBENTRY 1 org.hibernate.eclipse.console 4 150 2006-01-23 16:05:32.727
!MESSAGE org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree []
!STACK 0
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:225)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:158)
... a lot more
Caused by: <AST>:0:0: unexpected end of subtree
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2933)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:686)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:542)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:279)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:227)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:218)
... 46 more
At this point I've waited a long time, and I the Hibernate Consoles childlist is not populated.
What can I be doing wrong?My hibernate.cfg.xml:
Code:
<?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.driver_class">com.ibm.db2.jcc.DB2Driver</property>
<property name="hibernate.connection.password">somepassword</property>
<property name="hibernate.connection.url">jdbc:db2://someurl</property>
<property name="hibernate.connection.username">SOMEUSERINUPPERCASE</property>
<property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>
</session-factory>
</hibernate-configuration>
I'm running against a DB2, even though I don't think it matters in this case.
Is there any way I can limit the set of tables to be fetched?
It does not work by specifying a hibernate.default_schema property in the hibernate.cfg.xml file because the schema obviously has too many tables.
Thank you
/Christian Sonne Jensen