Monday, September 15, 2008

Fixing the Unitils Error "Missing configuration for org.unitils.core.dbsupport.DbSupport.implClassName"

If you get the following:
Caused by: org.unitils.core.UnitilsException: Missing configuration for org.unitils.core.dbsupport.DbSupport.implClassName at org.unitils.util.ConfigUtils.getConfiguredClassName( at org.unitils.util.ConfigUtils.getConfiguredInstance( at org.unitils.core.dbsupport.DbSupportFactory.getDbSupport( at org.unitils.core.dbsupport.DbSupportFactory.getDefaultDbSupport( at org.unitils.dbunit.DbUnitModule.getDefaultDbSupport( at org.unitils.dbunit.DbUnitModule.getDataSetFactory( at org.unitils.dbunit.DbUnitModule.getDataSetFactory( at org.unitils.dbunit.DbUnitModule.getDataSet( at org.unitils.dbunit.DbUnitModule.insertDataSet( ... 20 more
This basically means that the database.dialect you are using in your doesn't have a matching a property key that looks like "org.unitils.core.dbsupport.DbSupport.implClassName.(somedialectname)" in the (including those in the default on the classpath included in unitils). To fix, use one of the supported dialects: 'oracle', 'db2', 'mysql', or 'hsqldb' (for more recently added dialects, see the Unitils Cookbook).


Farshid said...

Thanks for the tip. It was a good help.

Yasser Zamani said...

Thank you very saved me!

Константин Гадырка said...

Thanks a lot!