DatabaseTester appears to ignore the DataTypeFactory configuration

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

DatabaseTester appears to ignore the DataTypeFactory configuration

mtopolnik

I've got this piece of code:

IDatabaseTester t = ... (get the instance) ...;
DatabaseConfig c = t.getConnection().getConfig();
c.setProperty(
       DatabaseConfig.PROPERTY_DATATYPE_FACTORY,
       new org.dbunit.ext.postgresql.PostgresqlDataTypeFactory());
t.setDataSet(
       new FlatXmlDataSetBuilder().setColumnSensing(true)
       .build(getClass().getResourceAsStream("/db/fixtures/fixture1.xml")));
t.onSetup();

However, I still get 10 repetitions of the classic warning during the onSetup call:

WARN org.dbunit.dataset.AbstractTableMetaData - Potential problem found: The configured data type factory 'class org.dbunit.dataset.datatype.DefaultDataTypeFactory' might cause problems with the current database 'PostgreSQL' (e.g. some datatypes may not be supported properly).

I've found a related question in the archives (over a year old), where the user had the same warnings, but was mainly asking about an unrelated error. Only the error part got answered, and this issue remained unsettled.

My version of dbUnit is 2.4.9, fetched by Maven.


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user