-->
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.  [ 3 posts ] 
Author Message
 Post subject: [Solved] DB2 "DatabaseMetaData information is not known"
PostPosted: Fri Aug 07, 2009 10:12 am 
Beginner
Beginner

Joined: Fri Jan 23, 2009 10:34 am
Posts: 25
Location: Switzerland
Using Hibernate 3.3.1, after migration from DB2 V8 to DB2 V9, I had the following warning message from class

com.ibm.db2.jcc.a.SqlException: DatabaseMetaData information is not known for server DB2/NTSQL09050 by this version of JDBC driver
at com.ibm.db2.jcc.a.p.supportsResultSetType(p.java:5158)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDatabaseMetaData.supportsResultSetType(WSJdbcDatabaseMetaData.java:2919)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:80)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
...

The solution would probably to use a new SQL driver adapted to DB2 V9, but in the meantime, I found a workaround while reading SettingsFactory.java.

Workaround is: you simply need to define the following property in the persistence.xml:

<property name="hibernate.temp.use_jdbc_metadata_defaults" value="false"/>

This problem/solution is also found here:
http://forums.sun.com/thread.jspa?threadID=5137610
http://forums.sun.com/thread.jspa?threadID=5368052

Note: this solution does probably not work for https://forum.hibernate.org/viewtopic.php?f=6&t=995595 because the property is not used.


Top
 Profile  
 
 Post subject: Re: [Solved] DB2 "DatabaseMetaData information is not known"
PostPosted: Fri Aug 07, 2009 5:41 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
thanks for the info, but you shouldnt use that temp flag. use a propery uptodate driver instead.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: [Solved] DB2 "DatabaseMetaData information is not known"
PostPosted: Sun Aug 09, 2009 4:04 am 
Beginner
Beginner

Joined: Fri Jan 23, 2009 10:34 am
Posts: 25
Location: Switzerland
I strongly agree Max. This temporary flag is only used by our team until we install the new driver. This avoids "visual pollution" of the log files. ;-)


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