-->
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.  [ 4 posts ] 
Author Message
 Post subject: reverse engineering problem with db2
PostPosted: Fri Mar 13, 2009 1:32 am 
Newbie

Joined: Thu Mar 12, 2009 11:13 pm
Posts: 2
I got a problem reverse engineering domain code from a db2 database which is on a Linux server, Has anyone of you ever succeeded with db2 database? Any help would be highly appreciated.


configuration:
Hibernate Tools version: HibernateTools-3.2.3
Database: DB2 9.5
JDBC-Driver: I copied db2jcc.jar Iand db2jcc_license_cu.jar from server to my lib.
Eclipse Version: 3.3.2
Build id: M20080221-1800

The exception is as following:


Error
Thu Mar 12 15:10:47 CST 2009
com.ibm.db2.jcc.b.SqlException: DatabaseMetaData information is not known for server DB2/LINUXSQL09052 by this version of JDBC driver

com.ibm.db2.jcc.b.SqlException: DatabaseMetaData information is not known for server DB2/LINUXSQL09052 by this version of JDBC driver
at com.ibm.db2.jcc.b.s.storesMixedCaseQuotedIdentifiers(s.java:873)
at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.caseForSearch(AbstractMetaDataDialect.java:163)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:22)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:476)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:74)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$2.execute(LazyDatabaseSchemaWorkbenchAdapter.java:111)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:102)
at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:59)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:103)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:196)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 15, 2009 1:40 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I tested with db2 and did not bump into issues.

Seems like you got some combination of drivers and db2 server that result in an exception being thrown when we ask what casing to use for the database identifiers.

Please report in jira with what drivers/database/os version you are using (prefereably with links to get the drivers and database for testing)

As a workaround you can look into implementing a subclass of JBDCMetaDataDialect that does call the storesMixedCaseQuotedIdentifiers method and just return a fixed true or false.

Then look in docs for the property to set to use your JBDCMetaDataDialect sub class.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: reverse engineering problem with db2
PostPosted: Tue Mar 17, 2009 2:28 am 
Newbie

Joined: Thu Mar 12, 2009 11:13 pm
Posts: 2
Hi Max, Thanks for your help. I have solved this problem. We can now generate the java files through db2 database now. But I still don't figure out why, I tried again the next day(without changing anything), it just succeeded. It's the same case with one of my colleagues. He met the same exception as I did, but it somehow works the next day. and we connect to different db2 server.

I've never bumped into this exception afterwards, But he did, and after he restarted the server, the exception just disapeared.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 19, 2009 9:45 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
The only info I can find about the error is http://www-01.ibm.com/support/docview.w ... wg21259874

But Db2 can be funny at times with respect to jdbc drivers :)

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