-->
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.  [ 15 posts ] 
Author Message
 Post subject: Upgrading from Tools 3.1.0 beta1 generates SQLException
PostPosted: Thu Dec 15, 2005 8:06 am 
Newbie

Joined: Thu Dec 15, 2005 7:46 am
Posts: 12
Hibernate version: 3.1

Hibernate tools version: HibernateTools-3.1.0.beta2

Full stack trace of any exception that occurs:

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

<Complete list of schemas>

Available catalogs:

at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$1.handleSQLException(JDBCMetaDataDialect.java:86)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:50)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:382)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:62)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:79)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:70)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:39)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:31)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:70)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Caused by: java.sql.SQLException: Nome di colonna non valido
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:274)
at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:4541)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:666)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1374)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$1.convertRow(JDBCMetaDataDialect.java:79)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:47)
... 10 more

!SUBENTRY 1 org.hibernate.eclipse.console 4 150 2005-12-15 12:23:34.906
!MESSAGE java.sql.SQLException: Nome di colonna non valido
!STACK 0
java.sql.SQLException: Nome di colonna non valido
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:274)
at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:4541)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:666)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1374)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$1.convertRow(JDBCMetaDataDialect.java:79)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:47)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:382)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:62)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:79)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:70)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:39)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:31)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:70)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2005-12-15 12:23:34.906
!MESSAGE java.sql.SQLException: Nome di colonna non valido
!STACK 0
java.sql.SQLException: Nome di colonna non valido
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:274)
at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:4541)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:666)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1374)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$1.convertRow(JDBCMetaDataDialect.java:79)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:47)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:382)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:62)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:79)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:70)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:39)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:31)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:70)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

Name and version of the database you are using: Oracle 8.1.7

Name and version of eclipse: Eclipse 3.1 + Lomboz

Hello,
While trying to upgrade hibernate tools from beta1 to beta2 the previously working console/reverse engineering configuration files ceased to work. Now I'm not able to access the DB through Hibernate Console or Hibernate Code Generation wizard.
Is this a bug, or I've missed something during the upgrade process ?
I think that something fails while "tools" try to get the list of catalogs, looking at stack trace there is "Nome di colonna non valido" that in Italian means "invalid column name".

Thanks in advance,
Janniz


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 15, 2005 3:41 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
this is code that asks for standard values via the jdbc metadata...should just work...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 4:17 am 
Newbie

Joined: Thu Dec 15, 2005 7:46 am
Posts: 12
It should work... but I'm sure it is not working :)

I've tried the latest CVS (15-12-2005) and it has the same beaviour. Now I've rolled back to beta1 (that works fine) and I've seen that there is a WARN in hibernate-log that show:

2005-12-15 14:30:48,063 156078 [ Worker-0] WARN org.hibernate.cfg.JDBCBinder - Exception while trying to get indexinfo on SYS.CATALOG=ORA-00604: errore riscontrato in SQL ricorsivo livello 1
ORA-01000: numero massimo di cursori aperti (open_cursors) superato

Although this not-blocking exception, beta1 seems working correctly :)

Thanks for your help.
Janniz

P.S: The text "ORA-00604: errore riscontrato in SQL ricorsivo livello 1" in english is "ORA-00604 error occurred at recursive SQL level 1" and "ORA-01000: numero massimo di cursori aperti (open_cursors) superato" is "ORA-01000:, maximum open cursors exceeded"


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 10:53 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
open cursor is oracle parameter (open_cursors in init.ora) and it is oracle problem

you have 2 solutions :

1 - increase open cursor (it can be > 5000) if you know
2 - use default schema in *cfg.xml and use reverse eng in hibernate tools and decrease
number of tables for rev. eng


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 12:09 pm 
Newbie

Joined: Thu Dec 15, 2005 7:46 am
Posts: 12
Thanks for your reply,
but normally I use a default schema parameter to limit the field of action of hibernate and the question about the cursors was only a note related to a beaviour that I'm not fully understanding (except the warn generated from this error beta1 is working well...)

Have you any suggestion for the other problem I've, those related to migration into beta2 ?

Thank you
Janniz


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 12:46 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Janniz,
It is same in beta1 and beta2 - you have bigger schema now, maybe

open_cursor is change easy - find your init.ora file (in $ORACLE_HOME/sysman/ifiles) and
set parameter like this

open_cursors = 6000 # (this is my value) - hibernate tools don't work for me with default, too

another posibility is use reveng file (you have wizard for making reveng file)

you haven't more solutions


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 3:01 pm 
Newbie

Joined: Thu Dec 15, 2005 7:46 am
Posts: 12
Sorry,
I don't want to appear insistent, but...

I've not a bigger schema. All is the same. Same DB, same connection pool, same reveng.xml, same hibernate.cfg.xml, same hibernate console configuration and same eclipse.

With beta1 I can see the schema and his tables correctly, with beta2 the exception shown is thrown.

I'm pretty sure the problem is not in the db because from a non working condition, simply restoring wtp libraries from 1.0 to 0.7.0 and replacing
- org.hibernate.eclipse.console_3.1.0.beta2
- org.hibernate.eclipse.help_3.1.0.beta2
- org.hibernate.eclipse.mapper_3.1.0.beta2
- org.hibernate.eclipse_3.1.0.beta2
with the *.beta1 counterparts the hibernatetools starts working flawlessy.

The open_cursor problem is not a problem I obtained from beta2 version but is only a warning that beta1 process logged parsing all the DB (without schema restrictions) and that I reported for thoroughness.

I cannot change oracle parameters since I'm not the DBA, so I cannot try your suggestion of increasing maximum number of open cursors and I've not fully understand your suggestion about reveng.xml. I'm already using it to force some generator to sequence and to filter the reverseEngineering process to a single schema, but I don't understand how I can use to modify the maximum number of open cursors.

In any case I'm pretty sure the problem is elsewhere, because, simply changing hibernatetools libraries (not configuration files, nor db) I switch from a working to a not-working condition.

Thanks for your support...

Janniz


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 16, 2005 3:45 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Janniz,
I told you - 'maximum open cursors' is known problem and it exists for oracle with oracle jdbc for hibernate tools from begin - it is for bigger schemas

you don't include reveng.xml maybe
new tools have launcing configuration except wizard and you have to set reveng this

see screenshoot : http://www.snpe.co.yu/hibernate-reveng1.png


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 17, 2005 12:39 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i'll say it once more and then i'll shut up....I have already added a workaround in cvs for what I call a bug in oracles drivers.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 19, 2005 5:07 am 
Newbie

Joined: Thu Dec 15, 2005 7:46 am
Posts: 12
First of all I want to say thank you to max and snpesnpe for their support, and, obviously, all hibernate team for their work. I'm using successfully hibernate and their tools (Middlegn plugin included) for about two years and so I'm really in debt with the hibernate developers community.

In this condition I detest to seem somehow insistent, so I'll stop asking support for this problem that I think it's a problem of hibernate tools.
Usually when I find some kind of issue in the setup and/or configuration of a tool I LIKE to spend some hours reading docs, trying to solve the problem myself, eventually looking at sources. Then and only then when I have no other resources I'll go asking support from someone. So I feel myself a little dejected when snpesnpe stated that I'm not using correctly the reveng configuration file. I'm sure that I'm using it correctly because I've a table filter in it and some sequence generator that are working correctly.

For sake of correctenss I had to specify one more time that the cursor problem is not a problem directly related to my quesiton in this thread. The real problem I had upgrading to beta2 is those related to THIS exception:

Quote:
!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2005-12-15 12:23:34.906
!MESSAGE java.sql.SQLException: Nome di colonna non valido
!STACK 0
java.sql.SQLException: Nome di colonna non valido
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:274)
at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:4541)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:666)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1374)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$1.convertRow(JDBCMetaDataDialect.java:79)
at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:47)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:382)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:62)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.execute(LazyDatabaseSchemaWorkbenchAdapter.java:79)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:70)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:39)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:31)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:70)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)



@max: Are you speaking about cursors problem or about the other SQL exception ? Because I've already tried without success latest CVS release (15-12-2005) and the beaviuor was the same I'd with beta2 (The exception was generated and the tool is not working...). The only bug with jdbc driver I know was the problem related with *LOB data sources, are there other bugs ?

I would to thank you all another time for your support, and I hope you are not thinking I'm only an annoyer because this is not my purpose :P

Janniz


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 19, 2005 5:37 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
The column we ask for at that line (in current cvs) is tableRs.getString("REMARKS") - so for some reason oracle complains about that - feel free to debug it; and maybe it something specific to your spanish locale...it doesn't fail on any of the oracle versions i have tried.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 19, 2005 8:52 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Janniz,
Can you make test with only one table in reveng. eng and send us ddl for this table
i test for you
Max,
Quote:
maybe it something specific to your spanish locale

it is italian


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 3:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
whoops - let me rephrase it: "the non-english locale" ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 4:44 am 
Newbie

Joined: Thu Dec 15, 2005 7:46 am
Posts: 12
@snpesnpe
Yes, I was planning to isolate only two or three tables and send DDL, hbm.xml and java generated files... but yesterday working activity overcomed so I've not yet had time to prepare the zip file :(
I promised myself that 'll do it today :)

See ya and thank you very much
Janniz


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 4:52 am 
Newbie

Joined: Thu Dec 15, 2005 7:46 am
Posts: 12
@snpesnpe
Whoops... I make some mistake and I though that you where speaking of the thread where I'd to make a post on Jira ("Trying to understand reverse engineering process...").

Anyway the substance is the same... I want to thank you for the help you're offering to give me, and I will make a DDL and send all to you in my lunch-time today.

Thank you in advance,
Janniz


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 15 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.