Help with a database connection and properties

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

Help with a database connection and properties

Tom Masterson-2
Hello

I am getting the following error and have been unable to find a solution after several hours of research on the internet.

org.dbunit.dataset.NoSuchColumnException: stnd_server.BEGIN_EFFECIVE_DT -  (Non-uppercase input column: BEGIN_EFFECIVE_DT) in ColumnNameToIndexes cache map. Note that the map's column names are NOT case sensitive.

I am also reciving the following warning from the logs:

2012-11-20 13:37:11,155 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 'MySQL' (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.

I am using a DataSourceDatabaseTester setup via spring and have tried adding the following line to my setup method to set the datatype factory but it appears to not be set.

databaseTester.getConnection().getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new MySqlDataTypeFactory());

Any suggestions on how to solve the error would be most appreciated.

Thanks
Tom

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Help with a database connection and properties

John Hurst-2
It seems the case-sensitivity is handled in the Metadata Handler, rather than the Data Type Factory.

See the MySqlConnection class. It has these statements in the constructor:

        getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY,
                new MySqlDataTypeFactory());
        getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, 
                new MySqlMetadataHandler());

You might try setting the Metadata Handler too and see if that helps.

John Hurst
Wellington, New Zealand



On Wed, Nov 21, 2012 at 11:59 AM, Tom Masterson <[hidden email]> wrote:
Hello

I am getting the following error and have been unable to find a solution after several hours of research on the internet.

org.dbunit.dataset.NoSuchColumnException: stnd_server.BEGIN_EFFECIVE_DT -  (Non-uppercase input column: BEGIN_EFFECIVE_DT) in ColumnNameToIndexes cache map. Note that the map's column names are NOT case sensitive.

I am also reciving the following warning from the logs:

2012-11-20 13:37:11,155 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 'MySQL' (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.

I am using a DataSourceDatabaseTester setup via spring and have tried adding the following line to my setup method to set the datatype factory but it appears to not be set.

databaseTester.getConnection().getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new MySqlDataTypeFactory());

Any suggestions on how to solve the error would be most appreciated.

Thanks
Tom

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



--
Life is interfering with my game

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Help with a database connection and properties

John Hurst-2
Haha, I did notice that spelling error, but didn't comment on it because some people have all kinds of weird spellings in columns. (We have one or two odd ones where I work, even. ;-)

Good on you.

John Hurst



On Wed, Nov 21, 2012 at 1:35 PM, Tom Masterson <[hidden email]> wrote:
Thanks John

I am officially embarassed.  Turns out it is right.  The column should have read BEGIN_EFFECTIVE_DT not BEGIN_EFFECIVE_DT.  I only stared at that all day before seeing the problem.

Tom


On Wed, 21 Nov 2012, John Hurst wrote:

It seems the case-sensitivity is handled in the Metadata Handler, rather than the Data Type Factory.
See the MySqlConnection class. It has these statements in the constructor:

        getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY,
                new MySqlDataTypeFactory());
        getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, 
                new MySqlMetadataHandler());

You might try setting the Metadata Handler too and see if that helps.

John Hurst
Wellington, New Zealand



On Wed, Nov 21, 2012 at 11:59 AM, Tom Masterson <[hidden email]> wrote:
      Hello

      I am getting the following error and have been unable to find a solution after several hours of research on the internet.

      org.dbunit.dataset.NoSuchColumnException: stnd_server.BEGIN_EFFECIVE_DT -  (Non-uppercase input column: BEGIN_EFFECIVE_DT) in ColumnNameToIndexes cache
      map. Note that the map's column names are NOT case sensitive.

      I am also reciving the following warning from the logs:

      2012-11-20 13:37:11,155 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 'MySQL' (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.

      I am using a DataSourceDatabaseTester setup via spring and have tried adding the following line to my setup method to set the datatype factory but it
      appears to not be set.

      databaseTester.getConnection().getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new MySqlDataTypeFactory());

      Any suggestions on how to solve the error would be most appreciated.

      Thanks
      Tom

      ------------------------------------------------------------------------------
      Monitor your physical, virtual and cloud infrastructure from a single
      web console. Get in-depth insight into apps, servers, databases, vmware,
      SAP, cloud infrastructure, etc. Download 30-day Free Trial.
      Pricing starts from $795 for 25 servers or applications!
      http://p.sf.net/sfu/zoho_dev2dev_nov
      _______________________________________________
      dbunit-user mailing list
      [hidden email]
      https://lists.sourceforge.net/lists/listinfo/dbunit-user




--
Life is interfering with my game




--
Life is interfering with my game

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user