-->
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.  [ 12 posts ] 
Author Message
 Post subject: HB Tools and Error on Table receiving
PostPosted: Tue Nov 28, 2006 9:14 am 
Newbie

Joined: Tue Nov 28, 2006 5:22 am
Posts: 3
Hello,

Hibernate version:3.2.0

Hibernate Tools version:3.2.beta8

Oracle 10 XE

If i do : create HB config file,..console configuration, ... than i trying to view Database Tables in Hibernate Console Perspective i become this error ( ... if i set schema i see no error but no tables to :). I let the Catalog null always ) :

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:33)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:59)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:433)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:67)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:97)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
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:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)


org.hibernate.exception.GenericJDBCException: Could not get list of tables from database. Probably a JDBC driver problem.
Configured schema:null
Configured catalog:null
Available schemas:
some schemas...

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:40)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:62)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:433)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:67)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:97)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
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:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: java.sql.SQLException: Neplatný název sloupce
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:33)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:59)
... 9 more


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 9:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm can't see how this can give an invalid column name except if oracle xe doesn't follow the spec.

note, i run against XE in my tests and here i haven't bumped into this scenario.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 9:35 am 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
Turn on debug logging, at least we will be able to see what table/column it is choking on. BTW, you probably want to set the schema or it will search all schemas (can be a lot!). Also, schema is case sensitive I believe.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 10:26 am 
Newbie

Joined: Tue Nov 28, 2006 5:22 am
Posts: 3
Sorry for stupid question :). But how to turn on debug logs?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 10:55 am 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
Create a log4j.properties file (in the classpath), e.g.

Code:
log4j.rootLogger=INFO, C1

#C1 console appender
log4j.appender.C1=org.apache.log4j.ConsoleAppender
log4j.appender.C1.layout=org.apache.log4j.PatternLayout
log4j.appender.C1.layout.ConversionPattern=[%d] %c{1} %-5p - %m%n

#Class overrides
log4j.logger.org.hibernate=DEBUG


Just don't leave that on when you generate anything but the mapping or you'll get approximately 10 trillion lines in your console when the session factory spins up. ;)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 11:06 am 
Regular
Regular

Joined: Sat May 20, 2006 3:49 am
Posts: 78
I use this connection properties for an Oracle 10 XE database:

Code:
        <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
        <property name="hibernate.connection.password">dseas</property>
        <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:xe</property>
        <property name="hibernate.connection.username">dseas</property>
        <property name="hibernate.default_schema">DSEAS</property>
        <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>


Check if you have some BIN$... recycle tables in your db. These tables can cause errors, delete them before doing reverse engineering.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 11:07 am 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
BIN$ are automatically excluded in the reverse engineering.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 11:08 am 
Regular
Regular

Joined: Sat May 20, 2006 3:49 am
Posts: 78
since what version of Hibernate-Tools?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 11:11 am 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
Line 107 in the DefaultReverseEngineeringStrategy.java from the most recent CVS, AFAIK it was in there for at least the last version (b8).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 11:23 am 
Newbie

Joined: Tue Nov 28, 2006 5:22 am
Posts: 3
I am usings same settings! With my name, pasword ... :)). What jdbc driver are you using?

...log4j : I have not problem with hibernate, he work very well. This log4j settings is not to Hibernate Tools ... or -> i see no difference in log :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 11:33 am 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
I'd say your log4j.properties file is not properly in the classpath. When I use that log4j.properties file, I get an enormous amount of information when reverse engineering (15000+ lines for reveng 400 tables). Unfortunately, I use Ant to do my reverse engineering, so for the console I don't really know where to put it. Perhaps someone else has some insight as to where to place that file.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 3:43 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Ananasi wrote:
Line 107 in the DefaultReverseEngineeringStrategy.java from the most recent CVS, AFAIK it was in there for at least the last version (b8).


yeah, been there as a hack to avoid the storm of questions about BIN$ :)

_________________
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.  [ 12 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.