-->
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.  [ 6 posts ] 
Author Message
 Post subject: Hibernate Tools 3.0alpha4a & Oracle 10g
PostPosted: Wed Jun 15, 2005 9:52 am 
Newbie

Joined: Wed Jun 15, 2005 9:36 am
Posts: 9
Location: Mexico
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

3.0.5

Mapping documents:

None

Code between sessionFactory.openSession() and session.close():

None

Full stack trace of any exception that occurs:

!SESSION 2005-06-15 07:45:32.960 -----------------------------------------------
eclipse.buildId=I20050219-1500
java.version=1.4.2_08
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch x86

!ENTRY org.hibernate.eclipse.console 4 4 2005-06-15 07:45:32.960
!MESSAGE Error under artifact generation
!STACK 0
org.hibernate.exception.GenericJDBCException: Reading from database
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:96)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:37)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:237)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:77)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:234)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:164)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:132)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:98)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:111)
Caused by: java.sql.SQLException: ORA-01424: missing or illegal character following the escape character

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:915)
at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:452)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2929)
at oracle.jdbc.driver.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:276)
at org.hibernate.cfg.JDBCBinder.processBasicColumns(JDBCBinder.java:732)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:123)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91)
... 8 more
!SUBENTRY 1 org.hibernate.eclipse.console 4 4 2005-06-15 07:45:32.970
!MESSAGE Reading from database
!STACK 0
org.hibernate.exception.GenericJDBCException: Reading from database
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:96)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:37)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:237)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:77)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:234)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:164)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:132)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:98)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:111)
Caused by: java.sql.SQLException: ORA-01424: missing or illegal character following the escape character

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:915)
at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:452)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2929)
at oracle.jdbc.driver.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:276)
at org.hibernate.cfg.JDBCBinder.processBasicColumns(JDBCBinder.java:732)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:123)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91)
... 8 more
!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2005-06-15 07:45:32.970
!MESSAGE Reading from database
!STACK 0
org.hibernate.exception.GenericJDBCException: Reading from database
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:96)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:37)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:237)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:77)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:234)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:164)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:132)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:98)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:111)
Caused by: java.sql.SQLException: ORA-01424: missing or illegal character following the escape character

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:915)
at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:452)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2929)
at oracle.jdbc.driver.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:276)
at org.hibernate.cfg.JDBCBinder.processBasicColumns(JDBCBinder.java:732)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:123)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91)
... 8 more
!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2005-06-15 07:45:32.970
!MESSAGE ORA-01424: missing or illegal character following the escape character

!STACK 0
java.sql.SQLException: ORA-01424: missing or illegal character following the escape character

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:915)
at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:452)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2929)
at oracle.jdbc.driver.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:276)
at org.hibernate.cfg.JDBCBinder.processBasicColumns(JDBCBinder.java:732)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:123)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:37)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:237)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:77)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:234)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:164)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:132)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:98)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:111)

Name and version of the database you are using:

Oracle 10g

The generated SQL (show_sql=true):

None.

Debug level Hibernate log excerpt:

Can I enable debug for Hibernate Tools?

Hi there!

I just downloaded new Hibernate Tools milestone 3.0alpha4a along with JBoss IDE 1.5m1.

I can successfully connect to the DataBase via the Console, but I get the error above when trying to do reverse engineering...

We have around 670 tables, but there are some SYNONYMS as well:

/1013c29d_PlanarImageServerPro
/1025308f_SunTileScheduler... (many more like these)

ABSPATH...
ALL... xxx
CHAR_TO_LEVEL....
EXF$ATTRIBUTE
MGMT$ALERT_CURRENT
STATS$BUFFER_POOL_STATISTICS...

etc,

Fortunately all of my business tables start with "SIT".

Any idea of the reason of the error?

Do you believe I can exclude all of the tables that don't start with "SIT" in the hibernate.reveng.xml file?

Thank you !!

_________________
Marcelo Torres


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 15, 2005 12:51 pm 
Newbie

Joined: Wed Jun 15, 2005 9:36 am
Posts: 9
Location: Mexico
As a complement to my previous post:

ORA-01424: missing or illegal character following the escape character

Cause: The character following the escape character in LIKE pattern is missing or not one of the wildcard characters '%' or '_'.


Regards,

Marcelo

_________________
Marcelo Torres


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 15, 2005 7:42 pm 
Beginner
Beginner

Joined: Wed Jun 15, 2005 7:14 pm
Posts: 28
I had to use the middlegen 2.0 instead of 2.1 tool because of that specific problem with our oracle 10g database. So you might want to try a different version.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 16, 2005 2:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it is because oracle are stupid and return tables with $ in their names which they are not able to handle them self.

simply try to do a exclusion of .*$.* in your rev.eng.xml

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 16, 2005 8:41 am 
Newbie

Joined: Wed Jun 15, 2005 9:36 am
Posts: 9
Location: Mexico
Thank you guys !!

It worked just as Max said...

I did an exclusion in hibernate.reveng.xml file as follows:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC
   "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN"
   "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd">

<hibernate-reverse-engineering>
   <table-filter match-schema="GDC" match-name=".*"/>
   <table-filter match-schema=".*" match-name=".*" exclude="true"/>
</hibernate-reverse-engineering>

Thank you for your help !!

_________________
Marcelo Torres


Top
 Profile  
 
 Post subject: Hibernate Tools 3.0alpha4a & Oracle 10g
PostPosted: Mon Aug 08, 2005 2:54 am 
Newbie

Joined: Sun Apr 24, 2005 7:25 pm
Posts: 5
Marcelo,

In your original message you indicated that your database was Oracle 10g. Were you able to get it to work with that database? I am getting the exact error as your initial post with 10g even with the hibernate.reveng.xml file you suggested (with match-schema="GDC" changed to my schema). I have it working perfectly with Oracle 9i though. I wonder if there is still a problem with 10g. Any idea on what I am missing?

Thanks!
Tat


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