NoSuchTableException

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

NoSuchTableException

Alexander Okunevich
Hi

task-dataset.xml

<!DOCTYPE dataset SYSTEM "dataset.dtd">
<dataset>
    <table name="XXX">
        <column>column1</column>
        <row>
            <value>123</value>
        </row>
    </table>
</dataset>


Code:

    String driverClass = "com.mysql.jdbc.Driver";
    String connectionUrl = "jdbc:mysql://localhost:3306";
    String username = "root";
    String password = "p@ssw0rd";
    String schema = "myschema";

     IDatabaseTester  dataTester = new JdbcDatabaseTester(driverClass,
connectionUrl, username, password, schema);

     DatabaseConfig config = dataTester.getConnection().getConfig();
     config.setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new
MySqlMetadataHandler());

     IDataSet   dataSet = new XmlDataSet(new
FileInputStream("task-dataset.xml"));

     DatabaseOperation.CLEAN_INSERT.execute(dataTester.getConnection(),
dataSet);


Result of execution this code:
org.dbunit.dataset.NoSuchTableException: XXX

Database has this table and field - 100%.

What I do wrong?

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: NoSuchTableException

krishnan.1000
Have you tried debugging through the source code?

On Wed, Jun 3, 2009 at 1:25 AM, Alexander Okunevich <[hidden email]> wrote:
Hi

task-dataset.xml

<!DOCTYPE dataset SYSTEM "dataset.dtd">
<dataset>
   <table name="XXX">
       <column>column1</column>
       <row>
           <value>123</value>
       </row>
   </table>
</dataset>


Code:

   String driverClass = "com.mysql.jdbc.Driver";
   String connectionUrl = "jdbc:mysql://localhost:3306";
   String username = "root";
   String password = "p@ssw0rd";
   String schema = "myschema";

    IDatabaseTester  dataTester = new JdbcDatabaseTester(driverClass,
connectionUrl, username, password, schema);

    DatabaseConfig config = dataTester.getConnection().getConfig();
    config.setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new
MySqlMetadataHandler());

    IDataSet   dataSet = new XmlDataSet(new
FileInputStream("task-dataset.xml"));

    DatabaseOperation.CLEAN_INSERT.execute(dataTester.getConnection(),
dataSet);


Result of execution this code:
org.dbunit.dataset.NoSuchTableException: XXX

Database has this table and field - 100%.

What I do wrong?

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: NoSuchTableException

Matthias Gommeringer
In reply to this post by Alexander Okunevich
Hi Alexander,

there may be several reasons for the exception. Please first of all ensure to use the latest 2.4.5 release since there have been some bugfixes with respect to tablename problems.
Next it is important on which platform you run mysql and whether or not you have case sensitive tablenames in the DB (i.e. in the JDBC DatabaseMetadata and hence in the RDBMS catalog).

See:
http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html

Also in the changelog for dbunit 2.4.4 (some fixes related to mysql):
http://dbunit.sourceforge.net/changes-report.html#a2.4.4

For the case-sensitive tablenames feature see (set it via DatabaseConnection.getConfig().setFeature(DatabaseConfig.FEATURE_CASE_SENSITIVE_TABLE_NAMES, true)):
http://dbunit.sourceforge.net/properties.html

HTH,
matthias


> -----Ursprüngliche Nachricht-----
> Von: "Alexander Okunevich" <[hidden email]>
> Gesendet: 03.06.09 10:25:55
> An: [hidden email]
> Betreff: [dbunit-user] NoSuchTableException


> Hi
>
> task-dataset.xml
>
> <!DOCTYPE dataset SYSTEM "dataset.dtd">
> <dataset>
>     <table name="XXX">
>         <column>column1</column>
>         <row>
>             <value>123</value>
>         </row>
>     </table>
> </dataset>
>
>
> Code:
>
>     String driverClass = "com.mysql.jdbc.Driver";
>     String connectionUrl = "jdbc:mysql://localhost:3306";
>     String username = "root";
>     String password = "p@ssw0rd";
>     String schema = "myschema";
>
>      IDatabaseTester  dataTester = new JdbcDatabaseTester(driverClass,
> connectionUrl, username, password, schema);
>
>      DatabaseConfig config = dataTester.getConnection().getConfig();
>      config.setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new
> MySqlMetadataHandler());
>
>      IDataSet   dataSet = new XmlDataSet(new
> FileInputStream("task-dataset.xml"));
>
>      DatabaseOperation.CLEAN_INSERT.execute(dataTester.getConnection(),
> dataSet);
>
>
> Result of execution this code:
> org.dbunit.dataset.NoSuchTableException: XXX
>
> Database has this table and field - 100%.
>
> What I do wrong?
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


___________________________________________________________________
WEB.DE FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und
Telefonanschluss für 17,95 Euro/mtl.! http://produkte.web.de/go/02/


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: NoSuchTableException

Alexander Okunevich-2
>Please first of all ensure to use the latest 2.4.5 release since there have been some bugfixes with respect to tablename problems.

Yes, I have version 2.4.5.

>For the case-sensitive tablenames feature see (set it via DatabaseConnection.getConfig().setFeature(DatabaseConfig.FEATURE_CASE_SENSITIVE_TABLE_NAMES, true)):

After that I got:

org.dbunit.dataset.NoSuchColumnException: xxx.COLUMN1 -
(Non-uppercase input column: COLUMN1) in ColumnNameToIndexes cache
map. Note that the map's column names are NOT case sensitive.
        at org.dbunit.dataset.AbstractTableMetaData.getColumnIndex(AbstractTableMetaData.java:129)
        at org.dbunit.operation.AbstractOperation.getOperationMetaData(AbstractOperation.java:89)
        at org.dbunit.operation.AbstractBatchOperation.execute(AbstractBatchOperation.java:140)
        at org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:79)
        at dao.TaskDAOImplTest.testDBUnit(TaskDAOImplTest.java:107)

but in xml file and in DB column in lowcase.

Does dbunit have something like FEATURE_CASE_SENSITIVE_column_NAMES? ;)

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: 2.4.5 release

Karl Jóhann Pálsson
In reply to this post by Matthias Gommeringer

Could someone from dbunit please update the news page to refer to the new release?  The most recent news is 2.4.4.


-----Original Message-----
From: Matthias Gommeringer [mailto:[hidden email]]
Sent: Wednesday, June 03, 2009 9:08 PM
To: [hidden email]; [hidden email]
Subject: Re: [dbunit-user] NoSuchTableException

Hi Alexander,

there may be several reasons for the exception. Please first of all ensure to use the latest 2.4.5 release since there have been some bugfixes with respect to tablename problems.
Next it is important on which platform you run mysql and whether or not you have case sensitive tablenames in the DB (i.e. in the JDBC DatabaseMetadata and hence in the RDBMS catalog).

See:
http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html

Also in the changelog for dbunit 2.4.4 (some fixes related to mysql):
http://dbunit.sourceforge.net/changes-report.html#a2.4.4

For the case-sensitive tablenames feature see (set it via DatabaseConnection.getConfig().setFeature(DatabaseConfig.FEATURE_CASE_SENSITIVE_TABLE_NAMES, true)):
http://dbunit.sourceforge.net/properties.html

HTH,
matthias


> -----Ursprüngliche Nachricht-----
> Von: "Alexander Okunevich" <[hidden email]>
> Gesendet: 03.06.09 10:25:55
> An: [hidden email]
> Betreff: [dbunit-user] NoSuchTableException


> Hi
>
> task-dataset.xml
>
> <!DOCTYPE dataset SYSTEM "dataset.dtd">
> <dataset>
>     <table name="XXX">
>         <column>column1</column>
>         <row>
>             <value>123</value>
>         </row>
>     </table>
> </dataset>
>
>
> Code:
>
>     String driverClass = "com.mysql.jdbc.Driver";
>     String connectionUrl = "jdbc:mysql://localhost:3306";
>     String username = "root";
>     String password = "p@ssw0rd";
>     String schema = "myschema";
>
>      IDatabaseTester  dataTester = new JdbcDatabaseTester(driverClass,
> connectionUrl, username, password, schema);
>
>      DatabaseConfig config = dataTester.getConnection().getConfig();
>      config.setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new
> MySqlMetadataHandler());
>
>      IDataSet   dataSet = new XmlDataSet(new
> FileInputStream("task-dataset.xml"));
>
>      DatabaseOperation.CLEAN_INSERT.execute(dataTester.getConnection(),
> dataSet);
>
>
> Result of execution this code:
> org.dbunit.dataset.NoSuchTableException: XXX
>
> Database has this table and field - 100%.
>
> What I do wrong?
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


___________________________________________________________________
WEB.DE FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und
Telefonanschluss für 17,95 Euro/mtl.! http://produkte.web.de/go/02/


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: 2.4.5 release breaks TablesDependencyHelper (for Oracle at least)

Karl Jóhann Pálsson
More importantly, 2.4.5 breaks the following code.  It throws an Unsupported feature out of oracle for me, (see below) This is using the same sample code I was working on earlier this week.

        IDataSet depSet = TablesDependencyHelper.getDataset(connection, "CS_CUSTOMERSUBSCRIPTION",
                new HashSet(Arrays.asList(new new BigDecimal(356749), new BigDecimal(358103))));
        FlatXmlWriter depsWriter = new FlatXmlWriter(new FileOutputStream(CSDAO_SAMPLE_DATA_FILE));
        depsWriter.write(depSet);

The referred line 226 is the "depsWriter.write()" call.  Rolling back to dbunit 2.4.4 makes this work again.

Cheers,
Karl P

Exception in thread "main" org.dbunit.dataset.DataSetException: java.sql.SQLException: Unsupported feature
        at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:239)
        at org.dbunit.database.DatabaseDataSet.getTable(DatabaseDataSet.java:303)
        at org.dbunit.dataset.FilteredDataSet.getTable(FilteredDataSet.java:120)
        at org.dbunit.database.PrimaryKeyFilter.searchPKs(PrimaryKeyFilter.java:175)
        at org.dbunit.database.PrimaryKeyFilter.iterator(PrimaryKeyFilter.java:154)
        at org.dbunit.dataset.FilteredDataSet.createIterator(FilteredDataSet.java:89)
        at org.dbunit.dataset.AbstractDataSet.iterator(AbstractDataSet.java:187)
        at org.dbunit.dataset.stream.DataSetProducerAdapter.<init>(DataSetProducerAdapter.java:63)
        at org.dbunit.dataset.xml.FlatXmlWriter.write(FlatXmlWriter.java:122)
        at vodafone.nip.db.hibernate.ITestCustomerSubscriptionHibernateDAO.main(ITestCustomerSubscriptionHibernateDAO.java:226)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: java.sql.SQLException: Unsupported feature
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
        at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:689)
        at oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4442)
        at org.dbunit.util.SQLHelper.getDatabaseInfo(SQLHelper.java:279)
        at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:201)



-----Original Message-----
From: Karl Jóhann Pálsson [mailto:[hidden email]]
Sent: Thursday, June 04, 2009 5:16 PM
To: [hidden email]
Subject: Re: [dbunit-user] 2.4.5 release


Could someone from dbunit please update the news page to refer to the new release?  The most recent news is 2.4.4.


-----Original Message-----
From: Matthias Gommeringer [mailto:[hidden email]]
Sent: Wednesday, June 03, 2009 9:08 PM
To: [hidden email]; [hidden email]
Subject: Re: [dbunit-user] NoSuchTableException

Hi Alexander,

there may be several reasons for the exception. Please first of all ensure to use the latest 2.4.5 release since there have been some bugfixes with respect to tablename problems.
Next it is important on which platform you run mysql and whether or not you have case sensitive tablenames in the DB (i.e. in the JDBC DatabaseMetadata and hence in the RDBMS catalog).

See:
http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html

Also in the changelog for dbunit 2.4.4 (some fixes related to mysql):
http://dbunit.sourceforge.net/changes-report.html#a2.4.4

For the case-sensitive tablenames feature see (set it via DatabaseConnection.getConfig().setFeature(DatabaseConfig.FEATURE_CASE_SENSITIVE_TABLE_NAMES, true)):
http://dbunit.sourceforge.net/properties.html

HTH,
matthias


> -----Ursprüngliche Nachricht-----
> Von: "Alexander Okunevich" <[hidden email]>
> Gesendet: 03.06.09 10:25:55
> An: [hidden email]
> Betreff: [dbunit-user] NoSuchTableException


> Hi
>
> task-dataset.xml
>
> <!DOCTYPE dataset SYSTEM "dataset.dtd">
> <dataset>
>     <table name="XXX">
>         <column>column1</column>
>         <row>
>             <value>123</value>
>         </row>
>     </table>
> </dataset>
>
>
> Code:
>
>     String driverClass = "com.mysql.jdbc.Driver";
>     String connectionUrl = "jdbc:mysql://localhost:3306";
>     String username = "root";
>     String password = "p@ssw0rd";
>     String schema = "myschema";
>
>      IDatabaseTester  dataTester = new JdbcDatabaseTester(driverClass,
> connectionUrl, username, password, schema);
>
>      DatabaseConfig config = dataTester.getConnection().getConfig();
>      config.setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new
> MySqlMetadataHandler());
>
>      IDataSet   dataSet = new XmlDataSet(new
> FileInputStream("task-dataset.xml"));
>
>      DatabaseOperation.CLEAN_INSERT.execute(dataTester.getConnection(),
> dataSet);
>
>
> Result of execution this code:
> org.dbunit.dataset.NoSuchTableException: XXX
>
> Database has this table and field - 100%.
>
> What I do wrong?
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


___________________________________________________________________
WEB.DE FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und
Telefonanschluss für 17,95 Euro/mtl.! http://produkte.web.de/go/02/


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: 2.4.5 release breaks TablesDependencyHelper (for Oracle at least)

Matthias Gommeringer
Hi Karl,

could you please create a bug report for this on the sourceforge site? In the meantime I will work on a bugfix, just wrapping each of the calls with a try/catch so that it will not crash because of a simple log message that dbunit tries to print.

Thanks for reporting,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "Karl Jóhann Pálsson" <[hidden email]>
> Gesendet: 04.06.09 21:12:46
> An: <[hidden email]>
> Betreff: Re: [dbunit-user] 2.4.5 release breaks TablesDependencyHelper (for Oracle at least)


> More importantly, 2.4.5 breaks the following code.  It throws an Unsupported feature out of oracle for me, (see below) This is using the same sample code I was working on earlier this week.
>
>         IDataSet depSet = TablesDependencyHelper.getDataset(connection, "CS_CUSTOMERSUBSCRIPTION",
> new HashSet(Arrays.asList(new new BigDecimal(356749), new BigDecimal(358103))));
>         FlatXmlWriter depsWriter = new FlatXmlWriter(new FileOutputStream(CSDAO_SAMPLE_DATA_FILE));
>         depsWriter.write(depSet);
>
> The referred line 226 is the "depsWriter.write()" call.  Rolling back to dbunit 2.4.4 makes this work again.
>
> Cheers,
> Karl P
>
> Exception in thread "main" org.dbunit.dataset.DataSetException: java.sql.SQLException: Unsupported feature
> at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:239)
> at org.dbunit.database.DatabaseDataSet.getTable(DatabaseDataSet.java:303)
> at org.dbunit.dataset.FilteredDataSet.getTable(FilteredDataSet.java:120)
> at org.dbunit.database.PrimaryKeyFilter.searchPKs(PrimaryKeyFilter.java:175)
> at org.dbunit.database.PrimaryKeyFilter.iterator(PrimaryKeyFilter.java:154)
> at org.dbunit.dataset.FilteredDataSet.createIterator(FilteredDataSet.java:89)
> at org.dbunit.dataset.AbstractDataSet.iterator(AbstractDataSet.java:187)
> at org.dbunit.dataset.stream.DataSetProducerAdapter.<init>(DataSetProducerAdapter.java:63)
> at org.dbunit.dataset.xml.FlatXmlWriter.write(FlatXmlWriter.java:122)
> at vodafone.nip.db.hibernate.ITestCustomerSubscriptionHibernateDAO.main(ITestCustomerSubscriptionHibernateDAO.java:226)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
> Caused by: java.sql.SQLException: Unsupported feature
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
> at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:689)
> at oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4442)
> at org.dbunit.util.SQLHelper.getDatabaseInfo(SQLHelper.java:279)
> at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:201)
>
>
>
> -----Original Message-----
> From: Karl Jóhann Pálsson [mailto:[hidden email]]
> Sent: Thursday, June 04, 2009 5:16 PM
> To: [hidden email]
> Subject: Re: [dbunit-user] 2.4.5 release
>
>
> Could someone from dbunit please update the news page to refer to the new release?  The most recent news is 2.4.4.
>
>
> -----Original Message-----
> From: Matthias Gommeringer [mailto:[hidden email]]
> Sent: Wednesday, June 03, 2009 9:08 PM
> To: [hidden email]; [hidden email]
> Subject: Re: [dbunit-user] NoSuchTableException
>
> Hi Alexander,
>
> there may be several reasons for the exception. Please first of all ensure to use the latest 2.4.5 release since there have been some bugfixes with respect to tablename problems.
> Next it is important on which platform you run mysql and whether or not you have case sensitive tablenames in the DB (i.e. in the JDBC DatabaseMetadata and hence in the RDBMS catalog).
>
> See:
> http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html
>
> Also in the changelog for dbunit 2.4.4 (some fixes related to mysql):
> http://dbunit.sourceforge.net/changes-report.html#a2.4.4
>
> For the case-sensitive tablenames feature see (set it via DatabaseConnection.getConfig().setFeature(DatabaseConfig.FEATURE_CASE_SENSITIVE_TABLE_NAMES, true)):
> http://dbunit.sourceforge.net/properties.html
>
> HTH,
> matthias
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: "Alexander Okunevich" <[hidden email]>
> > Gesendet: 03.06.09 10:25:55
> > An: [hidden email]
> > Betreff: [dbunit-user] NoSuchTableException
>
>
> > Hi
> >
> > task-dataset.xml
> >
> > <!DOCTYPE dataset SYSTEM "dataset.dtd">
> > <dataset>
> >     <table name="XXX">
> >         <column>column1</column>
> >         <row>
> >             <value>123</value>
> >         </row>
> >     </table>
> > </dataset>
> >
> >
> > Code:
> >
> >     String driverClass = "com.mysql.jdbc.Driver";
> >     String connectionUrl = "jdbc:mysql://localhost:3306";
> >     String username = "root";
> >     String password = "p@ssw0rd";
> >     String schema = "myschema";
> >
> >      IDatabaseTester  dataTester = new JdbcDatabaseTester(driverClass,
> > connectionUrl, username, password, schema);
> >
> >      DatabaseConfig config = dataTester.getConnection().getConfig();
> >      config.setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new
> > MySqlMetadataHandler());
> >
> >      IDataSet   dataSet = new XmlDataSet(new
> > FileInputStream("task-dataset.xml"));
> >
> >      DatabaseOperation.CLEAN_INSERT.execute(dataTester.getConnection(),
> > dataSet);
> >
> >
> > Result of execution this code:
> > org.dbunit.dataset.NoSuchTableException: XXX
> >
> > Database has this table and field - 100%.
> >
> > What I do wrong?
> >
> > ------------------------------------------------------------------------------
> > OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> > looking to deploy the next generation of Solaris that includes the latest
> > innovations from Sun and the OpenSource community. Download a copy and
> > enjoy capabilities such as Networking, Storage and Virtualization.
> > Go to: http://p.sf.net/sfu/opensolaris-get
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
>
>
> ___________________________________________________________________
> WEB.DE FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und
> Telefonanschluss für 17,95 Euro/mtl.! http://produkte.web.de/go/02/
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


___________________________________________________________________________________
WEB.DE FreeDSL mit DSL 6.000 Flatrate und Telefonanschluss für 17,95 Euro/mtl.!*
http://dslspecial.web.de/freedsl-aktionspreis/?ac=OM.AD.AD008K15039B7069a&mc=DSL002


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: 2.4.5 release breaks TablesDependencyHelper (for Oracle at least)

Matthias Gommeringer
In reply to this post by Karl Jóhann Pálsson
Nevertheless I think you are using a quite old oracle driver... ;-)

> -----Ursprüngliche Nachricht-----
> Von: "Karl Jóhann Pálsson" <[hidden email]>
> Gesendet: 04.06.09 21:12:46
> An: <[hidden email]>
> Betreff: Re: [dbunit-user] 2.4.5 release breaks TablesDependencyHelper (for Oracle at least)


> More importantly, 2.4.5 breaks the following code.  It throws an Unsupported feature out of oracle for me, (see below) This is using the same sample code I was working on earlier this week.
>
>         IDataSet depSet = TablesDependencyHelper.getDataset(connection, "CS_CUSTOMERSUBSCRIPTION",
> new HashSet(Arrays.asList(new new BigDecimal(356749), new BigDecimal(358103))));
>         FlatXmlWriter depsWriter = new FlatXmlWriter(new FileOutputStream(CSDAO_SAMPLE_DATA_FILE));
>         depsWriter.write(depSet);
>
> The referred line 226 is the "depsWriter.write()" call.  Rolling back to dbunit 2.4.4 makes this work again.
>
> Cheers,
> Karl P
>
> Exception in thread "main" org.dbunit.dataset.DataSetException: java.sql.SQLException: Unsupported feature
> at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:239)
> at org.dbunit.database.DatabaseDataSet.getTable(DatabaseDataSet.java:303)
> at org.dbunit.dataset.FilteredDataSet.getTable(FilteredDataSet.java:120)
> at org.dbunit.database.PrimaryKeyFilter.searchPKs(PrimaryKeyFilter.java:175)
> at org.dbunit.database.PrimaryKeyFilter.iterator(PrimaryKeyFilter.java:154)
> at org.dbunit.dataset.FilteredDataSet.createIterator(FilteredDataSet.java:89)
> at org.dbunit.dataset.AbstractDataSet.iterator(AbstractDataSet.java:187)
> at org.dbunit.dataset.stream.DataSetProducerAdapter.<init>(DataSetProducerAdapter.java:63)
> at org.dbunit.dataset.xml.FlatXmlWriter.write(FlatXmlWriter.java:122)
> at vodafone.nip.db.hibernate.ITestCustomerSubscriptionHibernateDAO.main(ITestCustomerSubscriptionHibernateDAO.java:226)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
> Caused by: java.sql.SQLException: Unsupported feature
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
> at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:689)
> at oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4442)
> at org.dbunit.util.SQLHelper.getDatabaseInfo(SQLHelper.java:279)
> at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:201)
>
>
>
> -----Original Message-----
> From: Karl Jóhann Pálsson [mailto:[hidden email]]
> Sent: Thursday, June 04, 2009 5:16 PM
> To: [hidden email]
> Subject: Re: [dbunit-user] 2.4.5 release
>
>
> Could someone from dbunit please update the news page to refer to the new release?  The most recent news is 2.4.4.
>
>
> -----Original Message-----
> From: Matthias Gommeringer [mailto:[hidden email]]
> Sent: Wednesday, June 03, 2009 9:08 PM
> To: [hidden email]; [hidden email]
> Subject: Re: [dbunit-user] NoSuchTableException
>
> Hi Alexander,
>
> there may be several reasons for the exception. Please first of all ensure to use the latest 2.4.5 release since there have been some bugfixes with respect to tablename problems.
> Next it is important on which platform you run mysql and whether or not you have case sensitive tablenames in the DB (i.e. in the JDBC DatabaseMetadata and hence in the RDBMS catalog).
>
> See:
> http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html
>
> Also in the changelog for dbunit 2.4.4 (some fixes related to mysql):
> http://dbunit.sourceforge.net/changes-report.html#a2.4.4
>
> For the case-sensitive tablenames feature see (set it via DatabaseConnection.getConfig().setFeature(DatabaseConfig.FEATURE_CASE_SENSITIVE_TABLE_NAMES, true)):
> http://dbunit.sourceforge.net/properties.html
>
> HTH,
> matthias
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: "Alexander Okunevich" <[hidden email]>
> > Gesendet: 03.06.09 10:25:55
> > An: [hidden email]
> > Betreff: [dbunit-user] NoSuchTableException
>
>
> > Hi
> >
> > task-dataset.xml
> >
> > <!DOCTYPE dataset SYSTEM "dataset.dtd">
> > <dataset>
> >     <table name="XXX">
> >         <column>column1</column>
> >         <row>
> >             <value>123</value>
> >         </row>
> >     </table>
> > </dataset>
> >
> >
> > Code:
> >
> >     String driverClass = "com.mysql.jdbc.Driver";
> >     String connectionUrl = "jdbc:mysql://localhost:3306";
> >     String username = "root";
> >     String password = "p@ssw0rd";
> >     String schema = "myschema";
> >
> >      IDatabaseTester  dataTester = new JdbcDatabaseTester(driverClass,
> > connectionUrl, username, password, schema);
> >
> >      DatabaseConfig config = dataTester.getConnection().getConfig();
> >      config.setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new
> > MySqlMetadataHandler());
> >
> >      IDataSet   dataSet = new XmlDataSet(new
> > FileInputStream("task-dataset.xml"));
> >
> >      DatabaseOperation.CLEAN_INSERT.execute(dataTester.getConnection(),
> > dataSet);
> >
> >
> > Result of execution this code:
> > org.dbunit.dataset.NoSuchTableException: XXX
> >
> > Database has this table and field - 100%.
> >
> > What I do wrong?
> >
> > ------------------------------------------------------------------------------
> > OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> > looking to deploy the next generation of Solaris that includes the latest
> > innovations from Sun and the OpenSource community. Download a copy and
> > enjoy capabilities such as Networking, Storage and Virtualization.
> > Go to: http://p.sf.net/sfu/opensolaris-get
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
>
>
> ___________________________________________________________________
> WEB.DE FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und
> Telefonanschluss für 17,95 Euro/mtl.! http://produkte.web.de/go/02/
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


__________________________________________________________
WEB.DE FreeDSL mit DSL 6.000 Flatrate und Telefonanschluss
für 17,95 Euro/mtl.!* http://produkte.web.de/go/02/


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: NoSuchTableException

Matthias Gommeringer
In reply to this post by Alexander Okunevich
Hm, no there is no FEATURE_CASE_SENSITIVE_column_NAMES in dbunit...could you please provide a unit test that lets me reproduce this behavior?

thanks,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "Alexander Okunevich" <[hidden email]>
> Gesendet: 04.06.09 17:53:14
> An: [hidden email]
> Betreff: Re: [dbunit-user] NoSuchTableException


> >Please first of all ensure to use the latest 2.4.5 release since there have been some bugfixes with respect to tablename problems.
>
> Yes, I have version 2.4.5.
>
> >For the case-sensitive tablenames feature see (set it via DatabaseConnection.getConfig().setFeature(DatabaseConfig.FEATURE_CASE_SENSITIVE_TABLE_NAMES, true)):
>
> After that I got:
>
> org.dbunit.dataset.NoSuchColumnException: xxx.COLUMN1 -
> (Non-uppercase input column: COLUMN1) in ColumnNameToIndexes cache
> map. Note that the map's column names are NOT case sensitive.
> at org.dbunit.dataset.AbstractTableMetaData.getColumnIndex(AbstractTableMetaData.java:129)
> at org.dbunit.operation.AbstractOperation.getOperationMetaData(AbstractOperation.java:89)
> at org.dbunit.operation.AbstractBatchOperation.execute(AbstractBatchOperation.java:140)
> at org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:79)
> at dao.TaskDAOImplTest.testDBUnit(TaskDAOImplTest.java:107)
>
> but in xml file and in DB column in lowcase.
>
> Does dbunit have something like FEATURE_CASE_SENSITIVE_column_NAMES? ;)
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


__________________________________________________________
WEB.DE FreeDSL mit DSL 6.000 Flatrate und Telefonanschluss
für 17,95 Euro/mtl.!* http://produkte.web.de/go/02/


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: NoSuchTableException

Alexander Okunevich-2
> Hm, no there is no FEATURE_CASE_SENSITIVE_column_NAMES in dbunit...could you please provide a unit test that lets me reproduce this behavior?


MySQL server:
mysql.exe  Ver 14.14 Distrib 5.1.34, for Win32 (ia32)

DbUnit version 2.4.5

SQL for creating table:

CREATE TABLE `xxx` (
  `column1` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`column1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

mydataset.xml:

<!DOCTYPE dataset SYSTEM "dataset.dtd">
<dataset>
    <table name="xxx">
        <column>column1</column>
        <row>
            <value>123</value>
        </row>
    </table>
</dataset>


unit test:

public class SimpleTest {

    private String driverClass = "com.mysql.jdbc.Driver";
    private String connectionUrl = "jdbc:mysql://localhost:3306/myschema";
    private String username = "root";
    private String password = "p@ssw0rd";
    private String schema = "myschema";

    @Test
    public void testDBUnit() {
        try {
            IDatabaseTester dataTester = new
JdbcDatabaseTester(driverClass, connectionUrl, username, password,
schema);

            DatabaseConfig config = dataTester.getConnection().getConfig();
            config.setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER,
new MySqlMetadataHandler());
            config.setFeature(DatabaseConfig.FEATURE_CASE_SENSITIVE_TABLE_NAMES,
true);

            IDataSet dataSet = new XmlDataSet(new
FileInputStream("task-dataset.xml"));

            DatabaseOperation.CLEAN_INSERT.execute(dataTester.getConnection(),
dataSet);

        } catch (Exception e) {
            e.printStackTrace();
            Assert.fail();
        }

    }

}

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: NoSuchTableException

Alexander Okunevich-2
> mydataset.xml:
> FileInputStream("task-dataset.xml"));

There are the same files.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: 2.4.5 release

Roberto Lo Giacco-4
In reply to this post by Karl Jóhann Pálsson
Karl Jóhann Pálsson wrote:
> Could someone from dbunit please update the news page to refer to the new release?  The most recent news is 2.4.4.
>  
Front page has been updated to report the new 2.4.5 release. Thanks for
reporting the mistake :)

--

  Roberto Lo Giacco

  Chief Technical Officer
  SmartLab s.r.l.
  via Spagna, snc - 87036 Rende (CS) - Italy

  Mobile: +39 392 8765657
  Email: [hidden email]
  Skype: longisland-75
  Web: http://www.smartlab.it 


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: 2.4.5 release breaks TablesDependencyHelper (for Oracle at least)

Karl Jóhann Pálsson
In reply to this post by Matthias Gommeringer

Quite correct.  I'd never had any reason to change it, but it turned out to be a 9.0.2 driver from 2002.  Dropping in an 11.x driver not only made this go away, but added automatic dialect detection in hibernate, which has dramatically simplified my config for swapping out db backends :)  Thanks for pointing me in this direction :)

-----Original Message-----
From: Matthias Gommeringer [mailto:[hidden email]]
Sent: Thursday, June 04, 2009 8:38 PM
To: [hidden email]
Subject: Re: [dbunit-user] 2.4.5 release breaks TablesDependencyHelper (for Oracle at least)

Nevertheless I think you are using a quite old oracle driver... ;-)

> -----Ursprüngliche Nachricht-----
> Von: "Karl Jóhann Pálsson" <[hidden email]>
> Gesendet: 04.06.09 21:12:46
> An: <[hidden email]>
> Betreff: Re: [dbunit-user] 2.4.5 release breaks TablesDependencyHelper (for Oracle at least)


> More importantly, 2.4.5 breaks the following code.  It throws an Unsupported feature out of oracle for me, (see below) This is using the same sample code I was working on earlier this week.
>
>         IDataSet depSet = TablesDependencyHelper.getDataset(connection, "CS_CUSTOMERSUBSCRIPTION",
> new HashSet(Arrays.asList(new new BigDecimal(356749), new BigDecimal(358103))));
>         FlatXmlWriter depsWriter = new FlatXmlWriter(new FileOutputStream(CSDAO_SAMPLE_DATA_FILE));
>         depsWriter.write(depSet);
>
> The referred line 226 is the "depsWriter.write()" call.  Rolling back to dbunit 2.4.4 makes this work again.
>
> Cheers,
> Karl P
>
> Exception in thread "main" org.dbunit.dataset.DataSetException: java.sql.SQLException: Unsupported feature
> at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:239)
> at org.dbunit.database.DatabaseDataSet.getTable(DatabaseDataSet.java:303)
> at org.dbunit.dataset.FilteredDataSet.getTable(FilteredDataSet.java:120)
> at org.dbunit.database.PrimaryKeyFilter.searchPKs(PrimaryKeyFilter.java:175)
> at org.dbunit.database.PrimaryKeyFilter.iterator(PrimaryKeyFilter.java:154)
> at org.dbunit.dataset.FilteredDataSet.createIterator(FilteredDataSet.java:89)
> at org.dbunit.dataset.AbstractDataSet.iterator(AbstractDataSet.java:187)
> at org.dbunit.dataset.stream.DataSetProducerAdapter.<init>(DataSetProducerAdapter.java:63)
> at org.dbunit.dataset.xml.FlatXmlWriter.write(FlatXmlWriter.java:122)
> at vodafone.nip.db.hibernate.ITestCustomerSubscriptionHibernateDAO.main(ITestCustomerSubscriptionHibernateDAO.java:226)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
> Caused by: java.sql.SQLException: Unsupported feature
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
> at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:689)
> at oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4442)
> at org.dbunit.util.SQLHelper.getDatabaseInfo(SQLHelper.java:279)
> at org.dbunit.database.DatabaseDataSet.initialize(DatabaseDataSet.java:201)
>
>
>
> -----Original Message-----
> From: Karl Jóhann Pálsson [mailto:[hidden email]]
> Sent: Thursday, June 04, 2009 5:16 PM
> To: [hidden email]
> Subject: Re: [dbunit-user] 2.4.5 release
>
>
> Could someone from dbunit please update the news page to refer to the new release?  The most recent news is 2.4.4.
>
>
> -----Original Message-----
> From: Matthias Gommeringer [mailto:[hidden email]]
> Sent: Wednesday, June 03, 2009 9:08 PM
> To: [hidden email]; [hidden email]
> Subject: Re: [dbunit-user] NoSuchTableException
>
> Hi Alexander,
>
> there may be several reasons for the exception. Please first of all ensure to use the latest 2.4.5 release since there have been some bugfixes with respect to tablename problems.
> Next it is important on which platform you run mysql and whether or not you have case sensitive tablenames in the DB (i.e. in the JDBC DatabaseMetadata and hence in the RDBMS catalog).
>
> See:
> http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html
>
> Also in the changelog for dbunit 2.4.4 (some fixes related to mysql):
> http://dbunit.sourceforge.net/changes-report.html#a2.4.4
>
> For the case-sensitive tablenames feature see (set it via DatabaseConnection.getConfig().setFeature(DatabaseConfig.FEATURE_CASE_SENSITIVE_TABLE_NAMES, true)):
> http://dbunit.sourceforge.net/properties.html
>
> HTH,
> matthias
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: "Alexander Okunevich" <[hidden email]>
> > Gesendet: 03.06.09 10:25:55
> > An: [hidden email]
> > Betreff: [dbunit-user] NoSuchTableException
>
>
> > Hi
> >
> > task-dataset.xml
> >
> > <!DOCTYPE dataset SYSTEM "dataset.dtd">
> > <dataset>
> >     <table name="XXX">
> >         <column>column1</column>
> >         <row>
> >             <value>123</value>
> >         </row>
> >     </table>
> > </dataset>
> >
> >
> > Code:
> >
> >     String driverClass = "com.mysql.jdbc.Driver";
> >     String connectionUrl = "jdbc:mysql://localhost:3306";
> >     String username = "root";
> >     String password = "p@ssw0rd";
> >     String schema = "myschema";
> >
> >      IDatabaseTester  dataTester = new JdbcDatabaseTester(driverClass,
> > connectionUrl, username, password, schema);
> >
> >      DatabaseConfig config = dataTester.getConnection().getConfig();
> >      config.setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new
> > MySqlMetadataHandler());
> >
> >      IDataSet   dataSet = new XmlDataSet(new
> > FileInputStream("task-dataset.xml"));
> >
> >      DatabaseOperation.CLEAN_INSERT.execute(dataTester.getConnection(),
> > dataSet);
> >
> >
> > Result of execution this code:
> > org.dbunit.dataset.NoSuchTableException: XXX
> >
> > Database has this table and field - 100%.
> >
> > What I do wrong?
> >
> > ------------------------------------------------------------------------------
> > OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> > looking to deploy the next generation of Solaris that includes the latest
> > innovations from Sun and the OpenSource community. Download a copy and
> > enjoy capabilities such as Networking, Storage and Virtualization.
> > Go to: http://p.sf.net/sfu/opensolaris-get
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
>
>
> ___________________________________________________________________
> WEB.DE FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und
> Telefonanschluss für 17,95 Euro/mtl.! http://produkte.web.de/go/02/
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


__________________________________________________________
WEB.DE FreeDSL mit DSL 6.000 Flatrate und Telefonanschluss
für 17,95 Euro/mtl.!* http://produkte.web.de/go/02/


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user