-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Reverse engineering - Could not obtain connection metadata
PostPosted: Fri Nov 17, 2006 7:35 pm 
Newbie

Joined: Mon Mar 28, 2005 8:54 pm
Posts: 4
Location: Idaho
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.2

Mapping documents: trying to generate from database schema

Using the Hibernate Tools plug-in for Eclipse' console configuration, I get the following error:
Problem while reading database schema

And the following warning: WARN Worker-33 org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata

Full stack trace of any exception that occurs:

!ENTRY org.hibernate.eclipse 2 30000 2006-11-17 16:19:15.459
!MESSAGE WARN Worker-33 org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata
!STACK 0
java.sql.SQLException: Io exception: SO Exception was generated
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:348)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:563)
at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:23)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:70)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:67)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:36)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:28)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:69)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

!ENTRY org.hibernate.eclipse.console 4 4 2006-11-17 16:19:15.519
!MESSAGE Problem while reading database schema
!STACK 0
org.hibernate.exception.GenericJDBCException: Getting database metadata
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.getMetaData(JDBCMetaDataDialect.java:61)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:70)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:404)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:68)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:76)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:67)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:36)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:28)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:69)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: java.sql.SQLException: Io exception: SO Exception was generated
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:348)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:563)
at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:23)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getConnection(JDBCMetaDataDialect.java:294)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getMetaData(JDBCMetaDataDialect.java:58)
... 11 more
!SUBENTRY 1 org.hibernate.eclipse.console 4 150 2006-11-17 16:19:15.519
!MESSAGE java.sql.SQLException: Io exception: SO Exception was generated
!STACK 0
java.sql.SQLException: Io exception: SO Exception was generated
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:348)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:563)
at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:23)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getConnection(JDBCMetaDataDialect.java:294)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getMetaData(JDBCMetaDataDialect.java:58)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:70)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:404)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:68)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:76)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:67)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:36)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:28)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:69)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2006-11-17 16:19:15.519
!MESSAGE java.sql.SQLException: Io exception: SO Exception was generated
!STACK 0
java.sql.SQLException: Io exception: SO Exception was generated
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:348)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:563)
at org.hibernate.console.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:23)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getConnection(JDBCMetaDataDialect.java:294)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getMetaData(JDBCMetaDataDialect.java:58)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:70)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:404)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:68)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:76)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:67)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:36)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:28)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:69)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)


Name and version of the database you are using: Oracle 10g


Using the new connection wizard, I generated this hibernat.cfg.xml file:

<?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">password</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@sampr01.world</property>
<property name="hibernate.connection.username">jwestra</property>
<property name="hibernate.default_schema">SAM_DATA</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
</session-factory>
</hibernate-configuration>


The database does not receive any request. I do have connection to the database as I tested it to elimate that possibility.

Any help would be appreciated.

Dave


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 7:49 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you have an oracle specfici exception ...look for solution for that and you should find you answer.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.