hi there, I am new to hibernate and just trying to work on it step by step according to the tutorial.
However, after setting the cfg.xml, I have encountered the following error when trying to view the Database in the Hibernate Console.
Error
Wed Jan 09 12:12:06 CST 2008
org.hibernate.exception.GenericJDBCException: Could not get list of tables from database. Probably a JDBC driver problem.
Configured schema:ECOS
Configured catalog:null
Available schemas:
AARONT (and some other database)
Available catalogs:
org.hibernate.exception.GenericJDBCException: Could not get list of tables from database. Probably a JDBC driver problem.
Configured schema:ECOS
Configured catalog:null
Available schemas:
AARONT .. (and different database)
Available catalogs:
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$1.handleSQLException(JDBCMetaDataDialect.java:44)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:62)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:454)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:74)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:97)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:88)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:57)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:196)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.sql.SQLException: Invalid column name
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$1.convertRow(JDBCMetaDataDialect.java:37)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:59)
... 9 more
Here is the cfg.xml
<?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">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.password">connectDB</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@10.1.1.64:1521:BCSV5-1</property>
<property name="hibernate.connection.username">CONNECT</property>
<property name="hibernate.default_schema">ECOS</property>
<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
</session-factory>
</hibernate-configuration>
I am using
- Eclipse 3.3 (WTP 2.0)
- Hibernate Tools 3.2 GA (the most updated one)
- Oracle Driver (classes111, classes 12, ojdbc14) --> all are failed
- Oracle DB 8.1
As the database is an existing one, which I cannot change any of the setup or even table structure.
Please advice if anything else I can be done in order to work out.
Thanks.
|