how to remove class org.dbunit.dataset.datatype.DefaultDataTypeFactory warning

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to remove class org.dbunit.dataset.datatype.DefaultDataTypeFactory warning

Feng Xuemin

Hello,

  Why I always get this warning when I run test cases, how can I remove it? Thanks.

 

Nov 13, 2009 4:28:41 PM org.dbunit.dataset.AbstractTableMetaData getDataTypeFactory

WARNING: Potential problem found: The configured data type factory 'class org.dbunit.dataset.datatype.DefaultDataTypeFactory' might cause problems with the current database 'Oracle' (e.g. some datatypes may not be supported properly). In rare cases you might see this message because the list of supported database products is incomplete (list=[derby]). If so please request a java-class update via the forums.If you are using your own IDataTypeFactory extending DefaultDataTypeFactory, ensure that you override getValidDbProducts() to specify the supported database products.

 

Best Regards

Xuemin


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: how to remove class org.dbunit.dataset.datatype.DefaultDataTypeFactory warning

saw303
Hi Xuemin

It seems that your are working against an Oracle DBMS. You need to set the DataFactory for your DBMS by overriding setUpDatabaseConfig within your DatabaseTestCase.

@Override
protected void setUpDatabaseConfig(DatabaseConfig config)
{
   // for Oracle 10
   config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new Oracle10DataTypeFactory();
   // below Oracle 10
   config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new OracleDataTypeFactory();
}

This should solve the issue. For further info please read the FAQ.


Best regards,
Silvio


2009/11/13 Feng Xuemin <[hidden email]>

Hello,

  Why I always get this warning when I run test cases, how can I remove it? Thanks.

 

Nov 13, 2009 4:28:41 PM org.dbunit.dataset.AbstractTableMetaData getDataTypeFactory

WARNING: Potential problem found: The configured data type factory 'class org.dbunit.dataset.datatype.DefaultDataTypeFactory' might cause problems with the current database 'Oracle' (e.g. some datatypes may not be supported properly). In rare cases you might see this message because the list of supported database products is incomplete (list=[derby]). If so please request a java-class update via the forums.If you are using your own IDataTypeFactory extending DefaultDataTypeFactory, ensure that you override getValidDbProducts() to specify the supported database products.

 

Best Regards

Xuemin


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: how to remove class org.dbunit.dataset.datatype.DefaultDataTypeFactory warning

Feng Xuemin

Hi Silvio,

  Thanks for you informationJ

Best Regards,

Xuemin


From: Silvio Wangler [mailto:[hidden email]]
Sent: Friday, November 13, 2009 17:38
To: [hidden email]
Subject: Re: [dbunit-user] how to remove class org.dbunit.dataset.datatype.DefaultDataTypeFactory warning

 

Hi Xuemin

 

It seems that your are working against an Oracle DBMS. You need to set the DataFactory for your DBMS by overriding setUpDatabaseConfig within your DatabaseTestCase.

 

@Override

protected void setUpDatabaseConfig(DatabaseConfig config)

{

   // for Oracle 10

   config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new Oracle10DataTypeFactory();

   // below Oracle 10

   config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new OracleDataTypeFactory();

}

 

This should solve the issue. For further info please read the FAQ.

 

 

Best regards,

Silvio

 

2009/11/13 Feng Xuemin <[hidden email]>

Hello,

  Why I always get this warning when I run test cases, how can I remove it? Thanks.

 

Nov 13, 2009 4:28:41 PM org.dbunit.dataset.AbstractTableMetaData getDataTypeFactory

WARNING: Potential problem found: The configured data type factory 'class org.dbunit.dataset.datatype.DefaultDataTypeFactory' might cause problems with the current database 'Oracle' (e.g. some datatypes may not be supported properly). In rare cases you might see this message because the list of supported database products is incomplete (list=[derby]). If so please request a java-class update via the forums.If you are using your own IDataTypeFactory extending DefaultDataTypeFactory, ensure that you override getValidDbProducts() to specify the supported database products.

 

Best Regards

Xuemin


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user

 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user