DB2: Re: Problem with DatabaseTableMetaData

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

DB2: Re: Problem with DatabaseTableMetaData

John Hurst-2
Hello Darrell,

I don't know much about DB2. I would like to set up a test environment with DB2 so that we can check DbUnit's behavior on it. I have done this for Oracle, Postgresql and MySQL, and I also have a virtual machine with SQL-Server on it so I will probably get that done at some point.

When I looked at DB2 the installation instructions were rather daunting. Do you happen to know whether there is a really easy way to set up an Express version of DB2 on a Linux box? E.g. .deb file provided anywhere? (E.g. I believe Oracle Express Edition is available as a .deb -- I think I've used that one in the past.)

I've kind of run short of time to work on DbUnit lately, but I'm still hoping to get back into it.

Regards

John Hurst

On Sun, Mar 27, 2011 at 10:45 AM, Darrell Roberts <[hidden email]> wrote:
Hi,

I just started using dbunit to test our applications using DB2 V9 FP4. I'm using the type 4 driver for DB2 as well. 

When I use IConnection.createQueryTable(<tablename>, <sql query>) to compare my database data with my data sets I get the following warning message:

"WARN  DatabaseTableMetaData.createColumnFromDbMetaData - Cannot find column from ResultSetMetaData info via DatabaseMetaData. Returning null. Even if this is expected to never happen it probably happened due to a JDBC driver bug. To get around this you may want to configure a user defined interface org.dbunit.database.IMetadataHandler"

I checked-out the source code to dbunit 2.4.8 to further investigate the root cause. The problem seems to be in DefaultMetadataHandler.matches() method. A comparison is performed on the catalog name, schema name, table name and column name read from the DataBaseMetaData and with that of the ResultSetMetaData. The comparison fails on the catalog name. The ResultSetMetaData is able to get the catalog name but the DataBaseMetaData has null for the catalog name.

Has this problem been reported before? Is there a workaround?





------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user




--
Life is interfering with my game

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user