Quantcast

NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

schubach
I have working code that loads data into multiple postgres schemas.  The same code also works to load data into multiple oracle schemas.  However, when I try to get the code to function against mysql, I come upon a roadblock.  It seems that unless I specify a different url for each schema (which is a database in mysql terminology) (e.g. jdbc:mysql://localhost:3306/central for central schema), then I get a NoSuchTableException when I try to load tables into a different database.  I thought that the qualifiedTableNames="true" would help, but still if I connect to jdbc:mysql://localhost:3306/schema_1 and try to load data into schema_2.mytable, I get a NoSuchTableException, even though  I can describe, insert, update, and delete from schema_2.mytable connected to schema_1 in normal mysql client and in my application code.  Is this a bug? If so, is there any chance of it getting fixed?
Thanks!
[hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

Matthias Gommeringer
Please give a try to the latest snapshot build from http://parabuild.viewtier.com:8080/parabuild/build/result/30/3517/dbunit-2.4.4-SNAPSHOT.jar

regards,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "schubach" <[hidden email]>
> Gesendet: 25.02.09 00:01:53
> An: [hidden email]
> Betreff: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases


>
> I have working code that loads data into multiple postgres schemas.  The same
> code also works to load data into multiple oracle schemas.  However, when I
> try to get the code to function against mysql, I come upon a roadblock.  It
> seems that unless I specify a different url for each schema (which is a
> database in mysql terminology) (e.g. jdbc:mysql://localhost:3306/central for
> central schema), then I get a NoSuchTableException when I try to load tables
> into a different database.  I thought that the qualifiedTableNames="true"
> would help, but still if I connect to jdbc:mysql://localhost:3306/schema_1
> and try to load data into schema_2.mytable, I get a NoSuchTableException,
> even though  I can describe, insert, update, and delete from
> schema_2.mytable connected to schema_1 in normal mysql client and in my
> application code.  Is this a bug? If so, is there any chance of it getting
> fixed?
> Thanks!
> [hidden email]
> --
> View this message in context: http://www.nabble.com/NoSuchTableException-when-using-qualifiedTableNames-with-mutliple-mysql-databases-tp22191356p22191356.html
> Sent from the DBUnit - Users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


_______________________________________________________________________
Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

schubach
In reply to this post by schubach
Unfortunately using the snapshot jar, I get a NoSuchTableException even on the same schema as I have in my url. So for instance connecting to jdbc:mysql://localhost:3306/central with qualifiedTableNames=true, I cannot even load data into central.table1.  Thank you for your continued effort and your quick response.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

Roberto Lo Giacco-4
schubach wrote:
> Unfortunately using the snapshot jar, I get a NoSuchTableException even on
> the same schema as I have in my url. So for instance connecting to
> jdbc:mysql://localhost:3306/central with qualifiedTableNames=true, I cannot
> even load data into central.table1.  Thank you for your continued effort and
> your quick response.
>  
Any luck with latest 2.4.4 release?

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

schubach

Unfortunately no.



----- Original Message ----
From: Roberto Lo Giacco <[hidden email]>
To: [hidden email]
Sent: Wednesday, February 25, 2009 11:17:01 AM
Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

schubach wrote:
> Unfortunately using the snapshot jar, I get a NoSuchTableException even on
> the same schema as I have in my url. So for instance connecting to
> jdbc:mysql://localhost:3306/central with qualifiedTableNames=true, I cannot
> even load data into central.table1.  Thank you for your continued effort and
> your quick response.
>  
Any luck with latest 2.4.4 release?

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



     

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

Matthias Gommeringer
In reply to this post by schubach
Hi Bernard,

did you see the bug report http://sourceforge.net/support/tracker.php?aid=2517257 ? If you try to import/export on different OSes (Linux/Windows) the feature "caseSensitiveTableNames" might be of interest for you (see http://www.dbunit.org/properties.html).

regards,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "Bernard Schubach" <[hidden email]>
> Gesendet: 25.02.09 18:35:04
> An: [hidden email]
> Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases


>
> Unfortunately no.
>
>
>
> ----- Original Message ----
> From: Roberto Lo Giacco <[hidden email]>
> To: [hidden email]
> Sent: Wednesday, February 25, 2009 11:17:01 AM
> Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
> schubach wrote:
> > Unfortunately using the snapshot jar, I get a NoSuchTableException even on
> > the same schema as I have in my url. So for instance connecting to
> > jdbc:mysql://localhost:3306/central with qualifiedTableNames=true, I cannot
> > even load data into central.table1.  Thank you for your continued effort and
> > your quick response.
> >  
> Any luck with latest 2.4.4 release?
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
>      
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


_______________________________________________________________________
Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

schubach
In reply to this post by schubach
I am only working on Windows.  Nonetheless, I verified in my C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data\ directory that both the schema name and table name are in lowercase, and tried setting caseSensitiveTableNames to true (my dbunit file already used lowercase names), but still I got the same NoSuchTableException.  Fwiw, if I changed qualifiedTableNames to false and removed the schema prefix from the xml files, then I did not get the exception, but instead got a warning followed by a NoSuchColumnException, even though of course the column exists.

WARNING: No columns found for table 'buildings' that are supported by dbunit. Will return an empty column list
C:\Documents and Settings\bernard\My Documents\java\osfc\subversion\trunk\tools\ant\dbTargets.xml:125: org.dbunit.dataset.NoSuchColumnException: buildings.ID -  (Non-uppercase input column: ID) in ColumnNameToIndexes cache map. Note that the map's column names are NOT case sensitive.

Thanks again for working so diligently on this.



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

Matthias Gommeringer
In reply to this post by schubach
Hi Bernard,

I assume that it is related to bug #2545095 ( http://sourceforge.net/support/tracker.php?aid=2545095 ). You should either use the org.dbunit.ext.mysql.MySqlConnection (it inherits from DatabaseConnection) or you should set the MySqlMetadataHandler:
getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new MySqlMetadataHandler())

Hope this solves your problem.

regards,
matthias


> -----Ursprüngliche Nachricht-----
> Von: "Bernard Schubach" <[hidden email]>
> Gesendet: 25.02.09 21:50:33
> An: dbunit user <[hidden email]>
> Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases


> I am only working on Windows. Nonetheless, I verified in my C:\
> Documents and Settings\All Users\Application Data\MySQL\MySQL Server
> 5.1\data\ directory that both the schema name and table name are in
> lowercase, and tried setting caseSensitiveTableNames to true (my
> dbunit file already used lowercase names), but still I got the same
> NoSuchTableException. Fwiw, if I changed qualifiedTableNames to false
> and removed the schema prefix from the xml files, then I did not get
> the exception, but instead got a warning followed by a NoSuchColumnExce
> ption, even though of course the column exists.
>
> WARNING: No columns found for table 'buildings' that are supported by
> dbunit. Will return an empty column list
> C:\Documents and Settings\bernard\My Documents\java\osfc\subversion\
> trunk\tools\ant\dbTargets.xml:125: org.dbunit.dataset.NoSuchColumnExcep
> tion: buildings.ID - (Non-uppercase input column: ID) in ColumnNameToIn
> dexes cache map. Note that the map's column names are NOT case
> sensitive.
>
> Thanks again for working so diligently on this.
>
> ----------------------------------------------------------------------
> -------- Open Source Business Conference (OSBC), March 24-25, 2009,
> San Francisco, CA -OSBC tackles the biggest issue in open source:
> Open Sourcing the Enterprise -Strategies to boost innovation and cut
> costs with open source participation -Receive a $600 discount off the
> registration fee with the source code: SFAD http://p.sf.net/sfu/
> XcvMzF8H_______________________________________________ dbunit-user
> mailing list [hidden email] https://lists.
>
> sourceforge.net/lists/listinfo/dbunit-user


_______________________________________________________________________
Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

schubach

I'm using org.dbunit.ant.DbUnitTask, and looking at:
http://www.dbunit.org/apidocs/org/dbunit/ant/DbUnitTask.html
there does not seem to be a setter for the metadataHandler and I do not know how to override the database connection class using this class.  Could you please provide advice?  Sorry for not providing this detail earlier.
Thanks,
Bernard



----- Original Message ----
From: Matthias Gommeringer <[hidden email]>
To: [hidden email]
Sent: Thursday, February 26, 2009 3:30:20 PM
Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

Hi Bernard,

I assume that it is related to bug #2545095 ( http://sourceforge.net/support/tracker.php?aid=2545095 ). You should either use the org.dbunit.ext.mysql.MySqlConnection (it inherits from DatabaseConnection) or you should set the MySqlMetadataHandler:
getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new MySqlMetadataHandler())

Hope this solves your problem.

regards,
matthias


> -----Ursprüngliche Nachricht-----
> Von: "Bernard Schubach" <[hidden email]>
> Gesendet: 25.02.09 21:50:33
> An: dbunit user <[hidden email]>
> Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases


> I am only working on Windows. Nonetheless, I verified in my C:\
> Documents and Settings\All Users\Application Data\MySQL\MySQL Server
> 5.1\data\ directory that both the schema name and table name are in
> lowercase, and tried setting caseSensitiveTableNames to true (my
> dbunit file already used lowercase names), but still I got the same
> NoSuchTableException. Fwiw, if I changed qualifiedTableNames to false
> and removed the schema prefix from the xml files, then I did not get
> the exception, but instead got a warning followed by a NoSuchColumnExce
> ption, even though of course the column exists.
>
> WARNING: No columns found for table 'buildings' that are supported by
> dbunit. Will return an empty column list
> C:\Documents and Settings\bernard\My Documents\java\osfc\subversion\
> trunk\tools\ant\dbTargets.xml:125: org.dbunit.dataset.NoSuchColumnExcep
> tion: buildings.ID - (Non-uppercase input column: ID) in ColumnNameToIn
> dexes cache map. Note that the map's column names are NOT case
> sensitive.
>
> Thanks again for working so diligently on this.
>
> ----------------------------------------------------------------------
> -------- Open Source Business Conference (OSBC), March 24-25, 2009,
> San Francisco, CA -OSBC tackles the biggest issue in open source:
> Open Sourcing the Enterprise -Strategies to boost innovation and cut
> costs with open source participation -Receive a $600 discount off the
> registration fee with the source code: SFAD http://p.sf.net/sfu/
> XcvMzF8H_______________________________________________ dbunit-user
> mailing list [hidden email] https://lists.
>
> sourceforge.net/lists/listinfo/dbunit-user


_______________________________________________________________________
Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



     

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

Matthias Gommeringer
In reply to this post by schubach
Hi Bernard,

it should work the following way (I looked into the antTestBuildFile.xml) - you can find an example at the bottom of http://www.dbunit.org/anttask.html :

...
    <target name="test-datatypefactory-via-generic-config">
      <dbunit driver="${dbunit.profile.driverClass}"
              url="${dbunit.profile.connectionUrl}"
              userid="${dbunit.profile.user}"
              password="${dbunit.profile.password}">
          <dbconfig>
              <property name="metadataHandler" value="org.something.that.implements.IMetadataHandler" />
              <feature name="caseSensitiveTableNames" value="true" />
          </dbconfig>
          <operation type="NONE"/>
      </dbunit>
    </target>
...

regards
matthias


> -----Ursprüngliche Nachricht-----
> Von: "Bernard Schubach" <[hidden email]>
> Gesendet: 27.02.09 15:02:43
> An: [hidden email]
> Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases


>
> I'm using org.dbunit.ant.DbUnitTask, and looking at:
> http://www.dbunit.org/apidocs/org/dbunit/ant/DbUnitTask.html
> there does not seem to be a setter for the metadataHandler and I do not know how to override the database connection class using this class.  Could you please provide advice?  Sorry for not providing this detail earlier.
> Thanks,
> Bernard
>
>
>
> ----- Original Message ----
> From: Matthias Gommeringer <[hidden email]>
> To: [hidden email]
> Sent: Thursday, February 26, 2009 3:30:20 PM
> Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
> Hi Bernard,
>
> I assume that it is related to bug #2545095 ( http://sourceforge.net/support/tracker.php?aid=2545095 ). You should either use the org.dbunit.ext.mysql.MySqlConnection (it inherits from DatabaseConnection) or you should set the MySqlMetadataHandler:
> getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new MySqlMetadataHandler())
>
> Hope this solves your problem.
>
> regards,
> matthias
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: "Bernard Schubach" <[hidden email]>
> > Gesendet: 25.02.09 21:50:33
> > An: dbunit user <[hidden email]>
> > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
>
> > I am only working on Windows. Nonetheless, I verified in my C:\
> > Documents and Settings\All Users\Application Data\MySQL\MySQL Server
> > 5.1\data\ directory that both the schema name and table name are in
> > lowercase, and tried setting caseSensitiveTableNames to true (my
> > dbunit file already used lowercase names), but still I got the same
> > NoSuchTableException. Fwiw, if I changed qualifiedTableNames to false
> > and removed the schema prefix from the xml files, then I did not get
> > the exception, but instead got a warning followed by a NoSuchColumnExce
> > ption, even though of course the column exists.
> >
> > WARNING: No columns found for table 'buildings' that are supported by
> > dbunit. Will return an empty column list
> > C:\Documents and Settings\bernard\My Documents\java\osfc\subversion\
> > trunk\tools\ant\dbTargets.xml:125: org.dbunit.dataset.NoSuchColumnExcep
> > tion: buildings.ID - (Non-uppercase input column: ID) in ColumnNameToIn
> > dexes cache map. Note that the map's column names are NOT case
> > sensitive.
> >
> > Thanks again for working so diligently on this.
> >
> > ----------------------------------------------------------------------
> > -------- Open Source Business Conference (OSBC), March 24-25, 2009,
> > San Francisco, CA -OSBC tackles the biggest issue in open source:
> > Open Sourcing the Enterprise -Strategies to boost innovation and cut
> > costs with open source participation -Receive a $600 discount off the
> > registration fee with the source code: SFAD http://p.sf.net/sfu/
> > XcvMzF8H_______________________________________________ dbunit-user
> > mailing list [hidden email] https://lists.
> >
> > sourceforge.net/lists/listinfo/dbunit-user
>
>
> _______________________________________________________________________
> Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
> für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
>      
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


_______________________________________________________________________
DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die
DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

schubach

Still my primary problem remains, which is that when I try to load data into more than one schema, I get a NoSuchTableException on the schema that does not match my url.  I cannot code the schema name into the url as a parameter because my code needs to work with other databases (Postgre and Oracle) and the person in charge of our code does not like the idea of having separate urls for each schema multipled by the number of databases..  I decided to build a very small demonstration of my problem (I should have done this a long time ago, sorry).  My example has 3 files in its main directory, and a lib subdirectory with 5 files. Namely:
  build.xml
  schema1.xml
  schema2.xml
  lib/commons-logging.jar
  lib/dbunit-2.4.4.jar
  lib/mysql-connector-java-5.1.7-bin.jar
  lib/slf4j-api-1.5.6.jar
  lib/slf4j-jcl-1.5.6.jar

schema1.xml:

<?xml version='1.0' encoding='UTF-8'?>
<dataset>
  <table1 column1="value1"/>
</dataset>

schema2.xml:

<?xml version='1.0' encoding='UTF-8'?>
<dataset>
  <table2 column2="value2"/>
</dataset>

build.xml
<?xml version="1.0"?>

<project name="test" default="reset.schemas" basedir=".">

    <target name="init.db.properties">
        <propertyfile comment="db properties for development" file="db.properties">
            <entry key="db.connection.driver_class" value="org.gjt.mm.mysql.Driver"/>
            <entry key="db.connection.url" value="jdbc:mysql://localhost:3306/schema1"/>
            <entry key="superuser.db.connection.url" value="jdbc:mysql://localhost:3306/mysql"/>
            <entry key="db.connection.username" value="root"/>
            <entry key="db.connection.password" value="devildogs"/>
        </propertyfile>
    </target>

    <target name="reset.schemas" depends="init.db.properties">
        <property file="db.properties"/>
        <sequential>
            <sql driver="${db.connection.driver_class}"
                 url="${superuser.db.connection.url}"
                 userid="${db.connection.username}"
                 password="${db.connection.password}"
         onerror="continue"
                 autocommit="true">
                <classpath>
                    <fileset dir="./lib/">
                        <include name="mysql-connector-java-5.1.7-bin.jar"/>
                    </fileset>
                </classpath>
                drop schema schema1;
                drop schema schema2;
                create schema schema1;
                create schema schema2;
                create table schema1.table1 (column1 varchar(20), primary key (column1));
                create table schema2.table2 (column2 varchar(20), primary key (column2));
            </sql>
        </sequential>
        <populateDb databaseSchema="schema1" dbunitData="schema1.xml"/>
        <populateDb databaseSchema="schema2" dbunitData="schema2.xml"/>
    </target>

    <macrodef name="populateDb">
        <attribute name="databaseSchema"/>
        <attribute name="dbunitData"/>
        <sequential>
            <dbunit driver="${db.connection.driver_class}"
                    url="${db.connection.url}"
                    schema="@{databaseSchema}"
                    userid="${db.connection.username}"
                    password="${db.connection.password}">
                <dbconfig>
                    <property name="datatypeFactory" value="org.dbunit.ext.mysql.MySqlDataTypeFactory"/>
                    <property name="metadataHandler" value="org.dbunit.ext.mysql.MySqlMetadataHandler"/>
                    <feature name="qualifiedTableNames" value="false"/>
                </dbconfig>
                <operation type="REFRESH" src="@{dbunitData}"/>
            </dbunit>
        </sequential>
    </macrodef>

    <taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask">
        <classpath>
        <fileset dir="./lib/">
                    <include name="dbunit-2.4.4.jar"/>
                <include name="mysql-connector-java-5.1.7-bin.jar"/>
            <include name="slf4j-api-1.5.6.jar"/>
            <include name="slf4j-jcl-1.5.6.jar"/>
            <include name="commons-logging.jar"/>
        </fileset>
        </classpath>
    </taskdef>

</project>


Please let me know if you can reproduce my problem and if there is a workaround or if there will be a patch.

Thank you,
Bernard

----- Original Message ----
From: Matthias Gommeringer <[hidden email]>
To: [hidden email]
Sent: Friday, February 27, 2009 2:58:03 PM
Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

Hi Bernard,

it should work the following way (I looked into the antTestBuildFile.xml) - you can find an example at the bottom of http://www.dbunit.org/anttask.html :

...
    <target name="test-datatypefactory-via-generic-config">
      <dbunit driver="${dbunit.profile.driverClass}"
              url="${dbunit.profile.connectionUrl}"
              userid="${dbunit.profile.user}"
              password="${dbunit.profile.password}">
          <dbconfig>
              <property name="metadataHandler" value="org.something.that.implements.IMetadataHandler" />
              <feature name="caseSensitiveTableNames" value="true" />
          </dbconfig>
          <operation type="NONE"/>
      </dbunit>
    </target>
...

regards
matthias


> -----Ursprüngliche Nachricht-----
> Von: "Bernard Schubach" <[hidden email]>
> Gesendet: 27.02.09 15:02:43
> An: [hidden email]
> Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases


>
> I'm using org.dbunit.ant.DbUnitTask, and looking at:
> http://www.dbunit.org/apidocs/org/dbunit/ant/DbUnitTask.html
> there does not seem to be a setter for the metadataHandler and I do not know how to override the database connection class using this class.  Could you please provide advice?  Sorry for not providing this detail earlier.
> Thanks,
> Bernard
>
>
>
> ----- Original Message ----
> From: Matthias Gommeringer <[hidden email]>
> To: [hidden email]
> Sent: Thursday, February 26, 2009 3:30:20 PM
> Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
> Hi Bernard,
>
> I assume that it is related to bug #2545095 ( http://sourceforge.net/support/tracker.php?aid=2545095 ). You should either use the org.dbunit.ext.mysql.MySqlConnection (it inherits from DatabaseConnection) or you should set the MySqlMetadataHandler:
> getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new MySqlMetadataHandler())
>
> Hope this solves your problem.
>
> regards,
> matthias
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: "Bernard Schubach" <[hidden email]>
> > Gesendet: 25.02.09 21:50:33
> > An: dbunit user <[hidden email]>
> > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
>
> > I am only working on Windows. Nonetheless, I verified in my C:\
> > Documents and Settings\All Users\Application Data\MySQL\MySQL Server
> > 5.1\data\ directory that both the schema name and table name are in
> > lowercase, and tried setting caseSensitiveTableNames to true (my
> > dbunit file already used lowercase names), but still I got the same
> > NoSuchTableException. Fwiw, if I changed qualifiedTableNames to false
> > and removed the schema prefix from the xml files, then I did not get
> > the exception, but instead got a warning followed by a NoSuchColumnExce
> > ption, even though of course the column exists.
> >
> > WARNING: No columns found for table 'buildings' that are supported by
> > dbunit. Will return an empty column list
> > C:\Documents and Settings\bernard\My Documents\java\osfc\subversion\
> > trunk\tools\ant\dbTargets.xml:125: org.dbunit.dataset.NoSuchColumnExcep
> > tion: buildings.ID - (Non-uppercase input column: ID) in ColumnNameToIn
> > dexes cache map. Note that the map's column names are NOT case
> > sensitive.
> >
> > Thanks again for working so diligently on this.
> >
> > ----------------------------------------------------------------------
> > -------- Open Source Business Conference (OSBC), March 24-25, 2009,
> > San Francisco, CA -OSBC tackles the biggest issue in open source:
> > Open Sourcing the Enterprise -Strategies to boost innovation and cut
> > costs with open source participation -Receive a $600 discount off the
> > registration fee with the source code: SFAD http://p.sf.net/sfu/
> > XcvMzF8H_______________________________________________ dbunit-user
> > mailing list [hidden email] https://lists.
> >
> > sourceforge.net/lists/listinfo/dbunit-user
>
>
> _______________________________________________________________________
> Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
> für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
>      
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


_______________________________________________________________________
DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die
DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



     

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

Matthias Gommeringer
In reply to this post by schubach
Hi Bernard,

I am able to reproduce your problem. I think it is again the known bug with mysql which uses the catalog instead of the schema when using the DatabaseMetaData object. Hopefully I manage to look into this tomorrow.

regards,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "Bernard Schubach" <[hidden email]>
> Gesendet: 02.03.09 20:45:17
> An: [hidden email]
> Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases


>
> Still my primary problem remains, which is that when I try to load data into more than one schema, I get a NoSuchTableException on the schema that does not match my url.  I cannot code the schema name into the url as a parameter because my code needs to work with other databases (Postgre and Oracle) and the person in charge of our code does not like the idea of having separate urls for each schema multipled by the number of databases..  I decided to build a very small demonstration of my problem (I should have done this a long time ago, sorry).  My example has 3 files in its main directory, and a lib subdirectory with 5 files. Namely:
>   build.xml
>   schema1.xml
>   schema2.xml
>   lib/commons-logging.jar
>   lib/dbunit-2.4.4.jar
>   lib/mysql-connector-java-5.1.7-bin.jar
>   lib/slf4j-api-1.5.6.jar
>   lib/slf4j-jcl-1.5.6.jar
>
> schema1.xml:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <dataset>
>   <table1 column1="value1"/>
> </dataset>
>
> schema2.xml:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <dataset>
>   <table2 column2="value2"/>
> </dataset>
>
> build.xml
> <?xml version="1.0"?>
>
> <project name="test" default="reset.schemas" basedir=".">
>
>     <target name="init.db.properties">
>         <propertyfile comment="db properties for development" file="db.properties">
>             <entry key="db.connection.driver_class" value="org.gjt.mm.mysql.Driver"/>
>             <entry key="db.connection.url" value="jdbc:mysql://localhost:3306/schema1"/>
>             <entry key="superuser.db.connection.url" value="jdbc:mysql://localhost:3306/mysql"/>
>             <entry key="db.connection.username" value="root"/>
>             <entry key="db.connection.password" value="devildogs"/>
>         </propertyfile>
>     </target>
>
>     <target name="reset.schemas" depends="init.db.properties">
>         <property file="db.properties"/>
>         <sequential>
>             <sql driver="${db.connection.driver_class}"
>                  url="${superuser.db.connection.url}"
>                  userid="${db.connection.username}"
>                  password="${db.connection.password}"
>          onerror="continue"
>                  autocommit="true">
>                 <classpath>
>                     <fileset dir="./lib/">
>                         <include name="mysql-connector-java-5.1.7-bin.jar"/>
>                     </fileset>
>                 </classpath>
>                 drop schema schema1;
>                 drop schema schema2;
>                 create schema schema1;
>                 create schema schema2;
>                 create table schema1.table1 (column1 varchar(20), primary key (column1));
>                 create table schema2.table2 (column2 varchar(20), primary key (column2));
>             </sql>
>         </sequential>
>         <populateDb databaseSchema="schema1" dbunitData="schema1.xml"/>
>         <populateDb databaseSchema="schema2" dbunitData="schema2.xml"/>
>     </target>
>
>     <macrodef name="populateDb">
>         <attribute name="databaseSchema"/>
>         <attribute name="dbunitData"/>
>         <sequential>
>             <dbunit driver="${db.connection.driver_class}"
>                     url="${db.connection.url}"
>                     schema="@{databaseSchema}"
>                     userid="${db.connection.username}"
>                     password="${db.connection.password}">
>                 <dbconfig>
>                     <property name="datatypeFactory" value="org.dbunit.ext.mysql.MySqlDataTypeFactory"/>
>                     <property name="metadataHandler" value="org.dbunit.ext.mysql.MySqlMetadataHandler"/>
>                     <feature name="qualifiedTableNames" value="false"/>
>                 </dbconfig>
>                 <operation type="REFRESH" src="@{dbunitData}"/>
>             </dbunit>
>         </sequential>
>     </macrodef>
>
>     <taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask">
>         <classpath>
>         <fileset dir="./lib/">
>                     <include name="dbunit-2.4.4.jar"/>
>                 <include name="mysql-connector-java-5.1.7-bin.jar"/>
>             <include name="slf4j-api-1.5.6.jar"/>
>             <include name="slf4j-jcl-1.5.6.jar"/>
>             <include name="commons-logging.jar"/>
>         </fileset>
>         </classpath>
>     </taskdef>
>
> </project>
>
>
> Please let me know if you can reproduce my problem and if there is a workaround or if there will be a patch.
>
> Thank you,
> Bernard
>
> ----- Original Message ----
> From: Matthias Gommeringer <[hidden email]>
> To: [hidden email]
> Sent: Friday, February 27, 2009 2:58:03 PM
> Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
> Hi Bernard,
>
> it should work the following way (I looked into the antTestBuildFile.xml) - you can find an example at the bottom of http://www.dbunit.org/anttask.html :
>
> ...
>     <target name="test-datatypefactory-via-generic-config">
>       <dbunit driver="${dbunit.profile.driverClass}"
>               url="${dbunit.profile.connectionUrl}"
>               userid="${dbunit.profile.user}"
>               password="${dbunit.profile.password}">
>           <dbconfig>
>               <property name="metadataHandler" value="org.something.that.implements.IMetadataHandler" />
>               <feature name="caseSensitiveTableNames" value="true" />
>           </dbconfig>
>           <operation type="NONE"/>
>       </dbunit>
>     </target>
> ...
>
> regards
> matthias
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: "Bernard Schubach" <[hidden email]>
> > Gesendet: 27.02.09 15:02:43
> > An: [hidden email]
> > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
>
> >
> > I'm using org.dbunit.ant.DbUnitTask, and looking at:
> > http://www.dbunit.org/apidocs/org/dbunit/ant/DbUnitTask.html
> > there does not seem to be a setter for the metadataHandler and I do not know how to override the database connection class using this class.  Could you please provide advice?  Sorry for not providing this detail earlier.
> > Thanks,
> > Bernard
> >
> >
> >
> > ----- Original Message ----
> > From: Matthias Gommeringer <[hidden email]>
> > To: [hidden email]
> > Sent: Thursday, February 26, 2009 3:30:20 PM
> > Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
> >
> > Hi Bernard,
> >
> > I assume that it is related to bug #2545095 ( http://sourceforge.net/support/tracker.php?aid=2545095 ). You should either use the org.dbunit.ext.mysql.MySqlConnection (it inherits from DatabaseConnection) or you should set the MySqlMetadataHandler:
> > getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new MySqlMetadataHandler())
> >
> > Hope this solves your problem.
> >
> > regards,
> > matthias
> >
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: "Bernard Schubach" <[hidden email]>
> > > Gesendet: 25.02.09 21:50:33
> > > An: dbunit user <[hidden email]>
> > > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
> >
> >
> > > I am only working on Windows. Nonetheless, I verified in my C:\
> > > Documents and Settings\All Users\Application Data\MySQL\MySQL Server
> > > 5.1\data\ directory that both the schema name and table name are in
> > > lowercase, and tried setting caseSensitiveTableNames to true (my
> > > dbunit file already used lowercase names), but still I got the same
> > > NoSuchTableException. Fwiw, if I changed qualifiedTableNames to false
> > > and removed the schema prefix from the xml files, then I did not get
> > > the exception, but instead got a warning followed by a NoSuchColumnExce
> > > ption, even though of course the column exists.
> > >
> > > WARNING: No columns found for table 'buildings' that are supported by
> > > dbunit. Will return an empty column list
> > > C:\Documents and Settings\bernard\My Documents\java\osfc\subversion\
> > > trunk\tools\ant\dbTargets.xml:125: org.dbunit.dataset.NoSuchColumnExcep
> > > tion: buildings.ID - (Non-uppercase input column: ID) in ColumnNameToIn
> > > dexes cache map. Note that the map's column names are NOT case
> > > sensitive.
> > >
> > > Thanks again for working so diligently on this.
> > >
> > > ----------------------------------------------------------------------
> > > -------- Open Source Business Conference (OSBC), March 24-25, 2009,
> > > San Francisco, CA -OSBC tackles the biggest issue in open source:
> > > Open Sourcing the Enterprise -Strategies to boost innovation and cut
> > > costs with open source participation -Receive a $600 discount off the
> > > registration fee with the source code: SFAD http://p.sf.net/sfu/
> > > XcvMzF8H_______________________________________________ dbunit-user
> > > mailing list [hidden email] https://lists.
> > >
> > > sourceforge.net/lists/listinfo/dbunit-user
> >
> >
> > _______________________________________________________________________
> > Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
> > für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a
> >
> >
> > ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > -Strategies to boost innovation and cut costs with open source participation
> > -Receive a $600 discount off the registration fee with the source code: SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
> >
> >
> >      
> >
> > ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > -Strategies to boost innovation and cut costs with open source participation
> > -Receive a $600 discount off the registration fee with the source code: SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
>
>
> _______________________________________________________________________
> DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die
> DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
>      
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


_______________________________________________________________________
DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die
DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

Matthias Gommeringer
In reply to this post by schubach
Hi Bernard,

could you please test the attached version (build from my local machine)?

regards,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "Bernard Schubach" <[hidden email]>
> Gesendet: 02.03.09 20:45:17
> An: [hidden email]
> Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases


>
> Still my primary problem remains, which is that when I try to load data into more than one schema, I get a NoSuchTableException on the schema that does not match my url.  I cannot code the schema name into the url as a parameter because my code needs to work with other databases (Postgre and Oracle) and the person in charge of our code does not like the idea of having separate urls for each schema multipled by the number of databases..  I decided to build a very small demonstration of my problem (I should have done this a long time ago, sorry).  My example has 3 files in its main directory, and a lib subdirectory with 5 files. Namely:
>   build.xml
>   schema1.xml
>   schema2.xml
>   lib/commons-logging.jar
>   lib/dbunit-2.4.4.jar
>   lib/mysql-connector-java-5.1.7-bin.jar
>   lib/slf4j-api-1.5.6.jar
>   lib/slf4j-jcl-1.5.6.jar
>
> schema1.xml:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <dataset>
>   <table1 column1="value1"/>
> </dataset>
>
> schema2.xml:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <dataset>
>   <table2 column2="value2"/>
> </dataset>
>
> build.xml
> <?xml version="1.0"?>
>
> <project name="test" default="reset.schemas" basedir=".">
>
>     <target name="init.db.properties">
>         <propertyfile comment="db properties for development" file="db.properties">
>             <entry key="db.connection.driver_class" value="org.gjt.mm.mysql.Driver"/>
>             <entry key="db.connection.url" value="jdbc:mysql://localhost:3306/schema1"/>
>             <entry key="superuser.db.connection.url" value="jdbc:mysql://localhost:3306/mysql"/>
>             <entry key="db.connection.username" value="root"/>
>             <entry key="db.connection.password" value="devildogs"/>
>         </propertyfile>
>     </target>
>
>     <target name="reset.schemas" depends="init.db.properties">
>         <property file="db.properties"/>
>         <sequential>
>             <sql driver="${db.connection.driver_class}"
>                  url="${superuser.db.connection.url}"
>                  userid="${db.connection.username}"
>                  password="${db.connection.password}"
>          onerror="continue"
>                  autocommit="true">
>                 <classpath>
>                     <fileset dir="./lib/">
>                         <include name="mysql-connector-java-5.1.7-bin.jar"/>
>                     </fileset>
>                 </classpath>
>                 drop schema schema1;
>                 drop schema schema2;
>                 create schema schema1;
>                 create schema schema2;
>                 create table schema1.table1 (column1 varchar(20), primary key (column1));
>                 create table schema2.table2 (column2 varchar(20), primary key (column2));
>             </sql>
>         </sequential>
>         <populateDb databaseSchema="schema1" dbunitData="schema1.xml"/>
>         <populateDb databaseSchema="schema2" dbunitData="schema2.xml"/>
>     </target>
>
>     <macrodef name="populateDb">
>         <attribute name="databaseSchema"/>
>         <attribute name="dbunitData"/>
>         <sequential>
>             <dbunit driver="${db.connection.driver_class}"
>                     url="${db.connection.url}"
>                     schema="@{databaseSchema}"
>                     userid="${db.connection.username}"
>                     password="${db.connection.password}">
>                 <dbconfig>
>                     <property name="datatypeFactory" value="org.dbunit.ext.mysql.MySqlDataTypeFactory"/>
>                     <property name="metadataHandler" value="org.dbunit.ext.mysql.MySqlMetadataHandler"/>
>                     <feature name="qualifiedTableNames" value="false"/>
>                 </dbconfig>
>                 <operation type="REFRESH" src="@{dbunitData}"/>
>             </dbunit>
>         </sequential>
>     </macrodef>
>
>     <taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask">
>         <classpath>
>         <fileset dir="./lib/">
>                     <include name="dbunit-2.4.4.jar"/>
>                 <include name="mysql-connector-java-5.1.7-bin.jar"/>
>             <include name="slf4j-api-1.5.6.jar"/>
>             <include name="slf4j-jcl-1.5.6.jar"/>
>             <include name="commons-logging.jar"/>
>         </fileset>
>         </classpath>
>     </taskdef>
>
> </project>
>
>
> Please let me know if you can reproduce my problem and if there is a workaround or if there will be a patch.
>
> Thank you,
> Bernard
>
> ----- Original Message ----
> From: Matthias Gommeringer <[hidden email]>
> To: [hidden email]
> Sent: Friday, February 27, 2009 2:58:03 PM
> Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
> Hi Bernard,
>
> it should work the following way (I looked into the antTestBuildFile.xml) - you can find an example at the bottom of http://www.dbunit.org/anttask.html :
>
> ...
>     <target name="test-datatypefactory-via-generic-config">
>       <dbunit driver="${dbunit.profile.driverClass}"
>               url="${dbunit.profile.connectionUrl}"
>               userid="${dbunit.profile.user}"
>               password="${dbunit.profile.password}">
>           <dbconfig>
>               <property name="metadataHandler" value="org.something.that.implements.IMetadataHandler" />
>               <feature name="caseSensitiveTableNames" value="true" />
>           </dbconfig>
>           <operation type="NONE"/>
>       </dbunit>
>     </target>
> ...
>
> regards
> matthias
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: "Bernard Schubach" <[hidden email]>
> > Gesendet: 27.02.09 15:02:43
> > An: [hidden email]
> > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
>
> >
> > I'm using org.dbunit.ant.DbUnitTask, and looking at:
> > http://www.dbunit.org/apidocs/org/dbunit/ant/DbUnitTask.html
> > there does not seem to be a setter for the metadataHandler and I do not know how to override the database connection class using this class.  Could you please provide advice?  Sorry for not providing this detail earlier.
> > Thanks,
> > Bernard
> >
> >
> >
> > ----- Original Message ----
> > From: Matthias Gommeringer <[hidden email]>
> > To: [hidden email]
> > Sent: Thursday, February 26, 2009 3:30:20 PM
> > Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
> >
> > Hi Bernard,
> >
> > I assume that it is related to bug #2545095 ( http://sourceforge.net/support/tracker.php?aid=2545095 ). You should either use the org.dbunit.ext.mysql.MySqlConnection (it inherits from DatabaseConnection) or you should set the MySqlMetadataHandler:
> > getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new MySqlMetadataHandler())
> >
> > Hope this solves your problem.
> >
> > regards,
> > matthias
> >
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: "Bernard Schubach" <[hidden email]>
> > > Gesendet: 25.02.09 21:50:33
> > > An: dbunit user <[hidden email]>
> > > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
> >
> >
> > > I am only working on Windows. Nonetheless, I verified in my C:\
> > > Documents and Settings\All Users\Application Data\MySQL\MySQL Server
> > > 5.1\data\ directory that both the schema name and table name are in
> > > lowercase, and tried setting caseSensitiveTableNames to true (my
> > > dbunit file already used lowercase names), but still I got the same
> > > NoSuchTableException. Fwiw, if I changed qualifiedTableNames to false
> > > and removed the schema prefix from the xml files, then I did not get
> > > the exception, but instead got a warning followed by a NoSuchColumnExce
> > > ption, even though of course the column exists.
> > >
> > > WARNING: No columns found for table 'buildings' that are supported by
> > > dbunit. Will return an empty column list
> > > C:\Documents and Settings\bernard\My Documents\java\osfc\subversion\
> > > trunk\tools\ant\dbTargets.xml:125: org.dbunit.dataset.NoSuchColumnExcep
> > > tion: buildings.ID - (Non-uppercase input column: ID) in ColumnNameToIn
> > > dexes cache map. Note that the map's column names are NOT case
> > > sensitive.
> > >
> > > Thanks again for working so diligently on this.
> > >
> > > ----------------------------------------------------------------------
> > > -------- Open Source Business Conference (OSBC), March 24-25, 2009,
> > > San Francisco, CA -OSBC tackles the biggest issue in open source:
> > > Open Sourcing the Enterprise -Strategies to boost innovation and cut
> > > costs with open source participation -Receive a $600 discount off the
> > > registration fee with the source code: SFAD http://p.sf.net/sfu/
> > > XcvMzF8H_______________________________________________ dbunit-user
> > > mailing list [hidden email] https://lists.
> > >
> > > sourceforge.net/lists/listinfo/dbunit-user
> >
> >
> > _______________________________________________________________________
> > Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
> > für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a
> >
> >
> > ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > -Strategies to boost innovation and cut costs with open source participation
> > -Receive a $600 discount off the registration fee with the source code: SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
> >
> >
> >      
> >
> > ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > -Strategies to boost innovation and cut costs with open source participation
> > -Receive a $600 discount off the registration fee with the source code: SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
>
>
> _______________________________________________________________________
> DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die
> DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
>      
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>

____________________________________________________________________
Psssst! Schon vom neuen WEB.DE MultiMessenger gehört?
Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user

dbunit-2.4.5-SNAPSHOT.jar (743K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

Matthias Gommeringer
In reply to this post by schubach
Hi Bernard,

I created a bug report #2658082 https://sourceforge.net/tracker/index.php?func=detail&aid=2658082&group_id=47439&atid=449491 and (hopefully) fixed it. Could you please test the latest snapshot from parabuild ( http://parabuild.viewtier.com:8080/parabuild/build/result/30/3573/dbunit-2.4.5-SNAPSHOT.jar ).

Regards,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "Bernard Schubach" <[hidden email]>
> Gesendet: 02.03.09 20:45:17
> An: [hidden email]
> Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases


>
> Still my primary problem remains, which is that when I try to load data into more than one schema, I get a NoSuchTableException on the schema that does not match my url.  I cannot code the schema name into the url as a parameter because my code needs to work with other databases (Postgre and Oracle) and the person in charge of our code does not like the idea of having separate urls for each schema multipled by the number of databases..  I decided to build a very small demonstration of my problem (I should have done this a long time ago, sorry).  My example has 3 files in its main directory, and a lib subdirectory with 5 files. Namely:
>   build.xml
>   schema1.xml
>   schema2.xml
>   lib/commons-logging.jar
>   lib/dbunit-2.4.4.jar
>   lib/mysql-connector-java-5.1.7-bin.jar
>   lib/slf4j-api-1.5.6.jar
>   lib/slf4j-jcl-1.5.6.jar
>
> schema1.xml:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <dataset>
>   <table1 column1="value1"/>
> </dataset>
>
> schema2.xml:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <dataset>
>   <table2 column2="value2"/>
> </dataset>
>
> build.xml
> <?xml version="1.0"?>
>
> <project name="test" default="reset.schemas" basedir=".">
>
>     <target name="init.db.properties">
>         <propertyfile comment="db properties for development" file="db.properties">
>             <entry key="db.connection.driver_class" value="org.gjt.mm.mysql.Driver"/>
>             <entry key="db.connection.url" value="jdbc:mysql://localhost:3306/schema1"/>
>             <entry key="superuser.db.connection.url" value="jdbc:mysql://localhost:3306/mysql"/>
>             <entry key="db.connection.username" value="root"/>
>             <entry key="db.connection.password" value="devildogs"/>
>         </propertyfile>
>     </target>
>
>     <target name="reset.schemas" depends="init.db.properties">
>         <property file="db.properties"/>
>         <sequential>
>             <sql driver="${db.connection.driver_class}"
>                  url="${superuser.db.connection.url}"
>                  userid="${db.connection.username}"
>                  password="${db.connection.password}"
>          onerror="continue"
>                  autocommit="true">
>                 <classpath>
>                     <fileset dir="./lib/">
>                         <include name="mysql-connector-java-5.1.7-bin.jar"/>
>                     </fileset>
>                 </classpath>
>                 drop schema schema1;
>                 drop schema schema2;
>                 create schema schema1;
>                 create schema schema2;
>                 create table schema1.table1 (column1 varchar(20), primary key (column1));
>                 create table schema2.table2 (column2 varchar(20), primary key (column2));
>             </sql>
>         </sequential>
>         <populateDb databaseSchema="schema1" dbunitData="schema1.xml"/>
>         <populateDb databaseSchema="schema2" dbunitData="schema2.xml"/>
>     </target>
>
>     <macrodef name="populateDb">
>         <attribute name="databaseSchema"/>
>         <attribute name="dbunitData"/>
>         <sequential>
>             <dbunit driver="${db.connection.driver_class}"
>                     url="${db.connection.url}"
>                     schema="@{databaseSchema}"
>                     userid="${db.connection.username}"
>                     password="${db.connection.password}">
>                 <dbconfig>
>                     <property name="datatypeFactory" value="org.dbunit.ext.mysql.MySqlDataTypeFactory"/>
>                     <property name="metadataHandler" value="org.dbunit.ext.mysql.MySqlMetadataHandler"/>
>                     <feature name="qualifiedTableNames" value="false"/>
>                 </dbconfig>
>                 <operation type="REFRESH" src="@{dbunitData}"/>
>             </dbunit>
>         </sequential>
>     </macrodef>
>
>     <taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask">
>         <classpath>
>         <fileset dir="./lib/">
>                     <include name="dbunit-2.4.4.jar"/>
>                 <include name="mysql-connector-java-5.1.7-bin.jar"/>
>             <include name="slf4j-api-1.5.6.jar"/>
>             <include name="slf4j-jcl-1.5.6.jar"/>
>             <include name="commons-logging.jar"/>
>         </fileset>
>         </classpath>
>     </taskdef>
>
> </project>
>
>
> Please let me know if you can reproduce my problem and if there is a workaround or if there will be a patch.
>
> Thank you,
> Bernard
>
> ----- Original Message ----
> From: Matthias Gommeringer <[hidden email]>
> To: [hidden email]
> Sent: Friday, February 27, 2009 2:58:03 PM
> Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
> Hi Bernard,
>
> it should work the following way (I looked into the antTestBuildFile.xml) - you can find an example at the bottom of http://www.dbunit.org/anttask.html :
>
> ...
>     <target name="test-datatypefactory-via-generic-config">
>       <dbunit driver="${dbunit.profile.driverClass}"
>               url="${dbunit.profile.connectionUrl}"
>               userid="${dbunit.profile.user}"
>               password="${dbunit.profile.password}">
>           <dbconfig>
>               <property name="metadataHandler" value="org.something.that.implements.IMetadataHandler" />
>               <feature name="caseSensitiveTableNames" value="true" />
>           </dbconfig>
>           <operation type="NONE"/>
>       </dbunit>
>     </target>
> ...
>
> regards
> matthias
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: "Bernard Schubach" <[hidden email]>
> > Gesendet: 27.02.09 15:02:43
> > An: [hidden email]
> > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
>
> >
> > I'm using org.dbunit.ant.DbUnitTask, and looking at:
> > http://www.dbunit.org/apidocs/org/dbunit/ant/DbUnitTask.html
> > there does not seem to be a setter for the metadataHandler and I do not know how to override the database connection class using this class.  Could you please provide advice?  Sorry for not providing this detail earlier.
> > Thanks,
> > Bernard
> >
> >
> >
> > ----- Original Message ----
> > From: Matthias Gommeringer <[hidden email]>
> > To: [hidden email]
> > Sent: Thursday, February 26, 2009 3:30:20 PM
> > Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
> >
> > Hi Bernard,
> >
> > I assume that it is related to bug #2545095 ( http://sourceforge.net/support/tracker.php?aid=2545095 ). You should either use the org.dbunit.ext.mysql.MySqlConnection (it inherits from DatabaseConnection) or you should set the MySqlMetadataHandler:
> > getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new MySqlMetadataHandler())
> >
> > Hope this solves your problem.
> >
> > regards,
> > matthias
> >
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: "Bernard Schubach" <[hidden email]>
> > > Gesendet: 25.02.09 21:50:33
> > > An: dbunit user <[hidden email]>
> > > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
> >
> >
> > > I am only working on Windows. Nonetheless, I verified in my C:\
> > > Documents and Settings\All Users\Application Data\MySQL\MySQL Server
> > > 5.1\data\ directory that both the schema name and table name are in
> > > lowercase, and tried setting caseSensitiveTableNames to true (my
> > > dbunit file already used lowercase names), but still I got the same
> > > NoSuchTableException. Fwiw, if I changed qualifiedTableNames to false
> > > and removed the schema prefix from the xml files, then I did not get
> > > the exception, but instead got a warning followed by a NoSuchColumnExce
> > > ption, even though of course the column exists.
> > >
> > > WARNING: No columns found for table 'buildings' that are supported by
> > > dbunit. Will return an empty column list
> > > C:\Documents and Settings\bernard\My Documents\java\osfc\subversion\
> > > trunk\tools\ant\dbTargets.xml:125: org.dbunit.dataset.NoSuchColumnExcep
> > > tion: buildings.ID - (Non-uppercase input column: ID) in ColumnNameToIn
> > > dexes cache map. Note that the map's column names are NOT case
> > > sensitive.
> > >
> > > Thanks again for working so diligently on this.
> > >
> > > ----------------------------------------------------------------------
> > > -------- Open Source Business Conference (OSBC), March 24-25, 2009,
> > > San Francisco, CA -OSBC tackles the biggest issue in open source:
> > > Open Sourcing the Enterprise -Strategies to boost innovation and cut
> > > costs with open source participation -Receive a $600 discount off the
> > > registration fee with the source code: SFAD http://p.sf.net/sfu/
> > > XcvMzF8H_______________________________________________ dbunit-user
> > > mailing list [hidden email] https://lists.
> > >
> > > sourceforge.net/lists/listinfo/dbunit-user
> >
> >
> > _______________________________________________________________________
> > Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
> > für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a
> >
> >
> > ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > -Strategies to boost innovation and cut costs with open source participation
> > -Receive a $600 discount off the registration fee with the source code: SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
> >
> >
> >      
> >
> > ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > -Strategies to boost innovation and cut costs with open source participation
> > -Receive a $600 discount off the registration fee with the source code: SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
>
>
> _______________________________________________________________________
> DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die
> DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
>      
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


____________________________________________________________________
Psssst! Schon vom neuen WEB.DE MultiMessenger gehört?
Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

schubach

Matthias,

It is fixed.  I have become a big fan of dbunit, because it is not too common that you report a bug with a piece of software and within a day of having a working test case it is fixed.

Thanks for all of your help,
Bernard



----- Original Message ----
From: Matthias Gommeringer <[hidden email]>
To: [hidden email]
Sent: Tuesday, March 3, 2009 12:55:53 PM
Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

Hi Bernard,

I created a bug report #2658082 https://sourceforge.net/tracker/index.php?func=detail&aid=2658082&group_id=47439&atid=449491 and (hopefully) fixed it. Could you please test the latest snapshot from parabuild ( http://parabuild.viewtier.com:8080/parabuild/build/result/30/3573/dbunit-2.4.5-SNAPSHOT.jar ).

Regards,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "Bernard Schubach" <[hidden email]>
> Gesendet: 02.03.09 20:45:17
> An: [hidden email]
> Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases


>
> Still my primary problem remains, which is that when I try to load data into more than one schema, I get a NoSuchTableException on the schema that does not match my url.  I cannot code the schema name into the url as a parameter because my code needs to work with other databases (Postgre and Oracle) and the person in charge of our code does not like the idea of having separate urls for each schema multipled by the number of databases..  I decided to build a very small demonstration of my problem (I should have done this a long time ago, sorry).  My example has 3 files in its main directory, and a lib subdirectory with 5 files. Namely:
>   build.xml
>   schema1.xml
>   schema2.xml
>   lib/commons-logging.jar
>   lib/dbunit-2.4.4.jar
>   lib/mysql-connector-java-5.1.7-bin.jar
>   lib/slf4j-api-1.5.6.jar
>   lib/slf4j-jcl-1.5.6.jar
>
> schema1.xml:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <dataset>
>   <table1 column1="value1"/>
> </dataset>
>
> schema2.xml:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <dataset>
>   <table2 column2="value2"/>
> </dataset>
>
> build.xml
> <?xml version="1.0"?>
>
> <project name="test" default="reset.schemas" basedir=".">
>
>     <target name="init.db.properties">
>         <propertyfile comment="db properties for development" file="db.properties">
>             <entry key="db.connection.driver_class" value="org.gjt.mm.mysql.Driver"/>
>             <entry key="db.connection.url" value="jdbc:mysql://localhost:3306/schema1"/>
>             <entry key="superuser.db.connection.url" value="jdbc:mysql://localhost:3306/mysql"/>
>             <entry key="db.connection.username" value="root"/>
>             <entry key="db.connection.password" value="devildogs"/>
>         </propertyfile>
>     </target>
>
>     <target name="reset.schemas" depends="init.db.properties">
>         <property file="db.properties"/>
>         <sequential>
>             <sql driver="${db.connection.driver_class}"
>                  url="${superuser.db.connection.url}"
>                  userid="${db.connection.username}"
>                  password="${db.connection.password}"
>          onerror="continue"
>                  autocommit="true">
>                 <classpath>
>                     <fileset dir="./lib/">
>                         <include name="mysql-connector-java-5.1.7-bin.jar"/>
>                     </fileset>
>                 </classpath>
>                 drop schema schema1;
>                 drop schema schema2;
>                 create schema schema1;
>                 create schema schema2;
>                 create table schema1.table1 (column1 varchar(20), primary key (column1));
>                 create table schema2.table2 (column2 varchar(20), primary key (column2));
>             </sql>
>         </sequential>
>         <populateDb databaseSchema="schema1" dbunitData="schema1.xml"/>
>         <populateDb databaseSchema="schema2" dbunitData="schema2.xml"/>
>     </target>
>
>     <macrodef name="populateDb">
>         <attribute name="databaseSchema"/>
>         <attribute name="dbunitData"/>
>         <sequential>
>             <dbunit driver="${db.connection.driver_class}"
>                     url="${db.connection.url}"
>                     schema="@{databaseSchema}"
>                     userid="${db.connection.username}"
>                     password="${db.connection.password}">
>                 <dbconfig>
>                     <property name="datatypeFactory" value="org.dbunit.ext.mysql.MySqlDataTypeFactory"/>
>                     <property name="metadataHandler" value="org.dbunit.ext.mysql.MySqlMetadataHandler"/>
>                     <feature name="qualifiedTableNames" value="false"/>
>                 </dbconfig>
>                 <operation type="REFRESH" src="@{dbunitData}"/>
>             </dbunit>
>         </sequential>
>     </macrodef>
>
>     <taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask">
>         <classpath>
>         <fileset dir="./lib/">
>                     <include name="dbunit-2.4.4.jar"/>
>                 <include name="mysql-connector-java-5.1.7-bin.jar"/>
>             <include name="slf4j-api-1.5.6.jar"/>
>             <include name="slf4j-jcl-1.5.6.jar"/>
>             <include name="commons-logging.jar"/>
>         </fileset>
>         </classpath>
>     </taskdef>
>
> </project>
>
>
> Please let me know if you can reproduce my problem and if there is a workaround or if there will be a patch.
>
> Thank you,
> Bernard
>
> ----- Original Message ----
> From: Matthias Gommeringer <[hidden email]>
> To: [hidden email]
> Sent: Friday, February 27, 2009 2:58:03 PM
> Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
> Hi Bernard,
>
> it should work the following way (I looked into the antTestBuildFile.xml) - you can find an example at the bottom of http://www.dbunit.org/anttask.html :
>
> ...
>     <target name="test-datatypefactory-via-generic-config">
>       <dbunit driver="${dbunit.profile.driverClass}"
>               url="${dbunit.profile.connectionUrl}"
>               userid="${dbunit.profile.user}"
>               password="${dbunit.profile.password}">
>           <dbconfig>
>               <property name="metadataHandler" value="org.something.that.implements.IMetadataHandler" />
>               <feature name="caseSensitiveTableNames" value="true" />
>           </dbconfig>
>           <operation type="NONE"/>
>       </dbunit>
>     </target>
> ...
>
> regards
> matthias
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: "Bernard Schubach" <[hidden email]>
> > Gesendet: 27.02.09 15:02:43
> > An: [hidden email]
> > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
>
> >
> > I'm using org.dbunit.ant.DbUnitTask, and looking at:
> > http://www.dbunit.org/apidocs/org/dbunit/ant/DbUnitTask.html
> > there does not seem to be a setter for the metadataHandler and I do not know how to override the database connection class using this class.  Could you please provide advice?  Sorry for not providing this detail earlier.
> > Thanks,
> > Bernard
> >
> >
> >
> > ----- Original Message ----
> > From: Matthias Gommeringer <[hidden email]>
> > To: [hidden email]
> > Sent: Thursday, February 26, 2009 3:30:20 PM
> > Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
> >
> > Hi Bernard,
> >
> > I assume that it is related to bug #2545095 ( http://sourceforge.net/support/tracker.php?aid=2545095 ). You should either use the org.dbunit.ext.mysql.MySqlConnection (it inherits from DatabaseConnection) or you should set the MySqlMetadataHandler:
> > getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new MySqlMetadataHandler())
> >
> > Hope this solves your problem.
> >
> > regards,
> > matthias
> >
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: "Bernard Schubach" <[hidden email]>
> > > Gesendet: 25.02.09 21:50:33
> > > An: dbunit user <[hidden email]>
> > > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
> >
> >
> > > I am only working on Windows. Nonetheless, I verified in my C:\
> > > Documents and Settings\All Users\Application Data\MySQL\MySQL Server
> > > 5.1\data\ directory that both the schema name and table name are in
> > > lowercase, and tried setting caseSensitiveTableNames to true (my
> > > dbunit file already used lowercase names), but still I got the same
> > > NoSuchTableException. Fwiw, if I changed qualifiedTableNames to false
> > > and removed the schema prefix from the xml files, then I did not get
> > > the exception, but instead got a warning followed by a NoSuchColumnExce
> > > ption, even though of course the column exists.
> > >
> > > WARNING: No columns found for table 'buildings' that are supported by
> > > dbunit. Will return an empty column list
> > > C:\Documents and Settings\bernard\My Documents\java\osfc\subversion\
> > > trunk\tools\ant\dbTargets.xml:125: org.dbunit.dataset.NoSuchColumnExcep
> > > tion: buildings.ID - (Non-uppercase input column: ID) in ColumnNameToIn
> > > dexes cache map. Note that the map's column names are NOT case
> > > sensitive.
> > >
> > > Thanks again for working so diligently on this.
> > >
> > > ----------------------------------------------------------------------
> > > -------- Open Source Business Conference (OSBC), March 24-25, 2009,
> > > San Francisco, CA -OSBC tackles the biggest issue in open source:
> > > Open Sourcing the Enterprise -Strategies to boost innovation and cut
> > > costs with open source participation -Receive a $600 discount off the
> > > registration fee with the source code: SFAD http://p.sf.net/sfu/
> > > XcvMzF8H_______________________________________________ dbunit-user
> > > mailing list [hidden email] https://lists.
> > >
> > > sourceforge.net/lists/listinfo/dbunit-user
> >
> >
> > _______________________________________________________________________
> > Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
> > für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a
> >
> >
> > ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > -Strategies to boost innovation and cut costs with open source participation
> > -Receive a $600 discount off the registration fee with the source code: SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
> >
> >
> >      
> >
> > ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > -Strategies to boost innovation and cut costs with open source participation
> > -Receive a $600 discount off the registration fee with the source code: SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
>
>
> _______________________________________________________________________
> DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die
> DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
>      
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


____________________________________________________________________
Psssst! Schon vom neuen WEB.DE MultiMessenger gehört?
Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



     

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NoSuchTableException when using qualifiedTableNames with mutliple mysql databases

Matthias Gommeringer
In reply to this post by schubach
Hi Bernard,

thanks for the kudos :-) this kind of feedback is what keeps us working on open source projects in our spare time.

have a good time,
matthias


> -----Ursprüngliche Nachricht-----
> Von: "Bernard Schubach" <[hidden email]>
> Gesendet: 03.03.09 21:07:07
> An: [hidden email]
> Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases


>
> Matthias,
>
> It is fixed.  I have become a big fan of dbunit, because it is not too common that you report a bug with a piece of software and within a day of having a working test case it is fixed.
>
> Thanks for all of your help,
> Bernard
>
>
>
> ----- Original Message ----
> From: Matthias Gommeringer <[hidden email]>
> To: [hidden email]
> Sent: Tuesday, March 3, 2009 12:55:53 PM
> Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
> Hi Bernard,
>
> I created a bug report #2658082 https://sourceforge.net/tracker/index.php?func=detail&aid=2658082&group_id=47439&atid=449491 and (hopefully) fixed it. Could you please test the latest snapshot from parabuild ( http://parabuild.viewtier.com:8080/parabuild/build/result/30/3573/dbunit-2.4.5-SNAPSHOT.jar ).
>
> Regards,
> matthias
>
> > -----Ursprüngliche Nachricht-----
> > Von: "Bernard Schubach" <[hidden email]>
> > Gesendet: 02.03.09 20:45:17
> > An: [hidden email]
> > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
>
>
> >
> > Still my primary problem remains, which is that when I try to load data into more than one schema, I get a NoSuchTableException on the schema that does not match my url.  I cannot code the schema name into the url as a parameter because my code needs to work with other databases (Postgre and Oracle) and the person in charge of our code does not like the idea of having separate urls for each schema multipled by the number of databases..  I decided to build a very small demonstration of my problem (I should have done this a long time ago, sorry).  My example has 3 files in its main directory, and a lib subdirectory with 5 files. Namely:
> >   build.xml
> >   schema1.xml
> >   schema2.xml
> >   lib/commons-logging.jar
> >   lib/dbunit-2.4.4.jar
> >   lib/mysql-connector-java-5.1.7-bin.jar
> >   lib/slf4j-api-1.5.6.jar
> >   lib/slf4j-jcl-1.5.6.jar
> >
> > schema1.xml:
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <dataset>
> >   <table1 column1="value1"/>
> > </dataset>
> >
> > schema2.xml:
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <dataset>
> >   <table2 column2="value2"/>
> > </dataset>
> >
> > build.xml
> > <?xml version="1.0"?>
> >
> > <project name="test" default="reset.schemas" basedir=".">
> >
> >     <target name="init.db.properties">
> >         <propertyfile comment="db properties for development" file="db.properties">
> >             <entry key="db.connection.driver_class" value="org.gjt.mm.mysql.Driver"/>
> >             <entry key="db.connection.url" value="jdbc:mysql://localhost:3306/schema1"/>
> >             <entry key="superuser.db.connection.url" value="jdbc:mysql://localhost:3306/mysql"/>
> >             <entry key="db.connection.username" value="root"/>
> >             <entry key="db.connection.password" value="devildogs"/>
> >         </propertyfile>
> >     </target>
> >
> >     <target name="reset.schemas" depends="init.db.properties">
> >         <property file="db.properties"/>
> >         <sequential>
> >             <sql driver="${db.connection.driver_class}"
> >                  url="${superuser.db.connection.url}"
> >                  userid="${db.connection.username}"
> >                  password="${db.connection.password}"
> >          onerror="continue"
> >                  autocommit="true">
> >                 <classpath>
> >                     <fileset dir="./lib/">
> >                         <include name="mysql-connector-java-5.1.7-bin.jar"/>
> >                     </fileset>
> >                 </classpath>
> >                 drop schema schema1;
> >                 drop schema schema2;
> >                 create schema schema1;
> >                 create schema schema2;
> >                 create table schema1.table1 (column1 varchar(20), primary key (column1));
> >                 create table schema2.table2 (column2 varchar(20), primary key (column2));
> >             </sql>
> >         </sequential>
> >         <populateDb databaseSchema="schema1" dbunitData="schema1.xml"/>
> >         <populateDb databaseSchema="schema2" dbunitData="schema2.xml"/>
> >     </target>
> >
> >     <macrodef name="populateDb">
> >         <attribute name="databaseSchema"/>
> >         <attribute name="dbunitData"/>
> >         <sequential>
> >             <dbunit driver="${db.connection.driver_class}"
> >                     url="${db.connection.url}"
> >                     schema="@{databaseSchema}"
> >                     userid="${db.connection.username}"
> >                     password="${db.connection.password}">
> >                 <dbconfig>
> >                     <property name="datatypeFactory" value="org.dbunit.ext.mysql.MySqlDataTypeFactory"/>
> >                     <property name="metadataHandler" value="org.dbunit.ext.mysql.MySqlMetadataHandler"/>
> >                     <feature name="qualifiedTableNames" value="false"/>
> >                 </dbconfig>
> >                 <operation type="REFRESH" src="@{dbunitData}"/>
> >             </dbunit>
> >         </sequential>
> >     </macrodef>
> >
> >     <taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask">
> >         <classpath>
> >         <fileset dir="./lib/">
> >                     <include name="dbunit-2.4.4.jar"/>
> >                 <include name="mysql-connector-java-5.1.7-bin.jar"/>
> >             <include name="slf4j-api-1.5.6.jar"/>
> >             <include name="slf4j-jcl-1.5.6.jar"/>
> >             <include name="commons-logging.jar"/>
> >         </fileset>
> >         </classpath>
> >     </taskdef>
> >
> > </project>
> >
> >
> > Please let me know if you can reproduce my problem and if there is a workaround or if there will be a patch.
> >
> > Thank you,
> > Bernard
> >
> > ----- Original Message ----
> > From: Matthias Gommeringer <[hidden email]>
> > To: [hidden email]
> > Sent: Friday, February 27, 2009 2:58:03 PM
> > Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
> >
> > Hi Bernard,
> >
> > it should work the following way (I looked into the antTestBuildFile.xml) - you can find an example at the bottom of http://www.dbunit.org/anttask.html :
> >
> > ...
> >     <target name="test-datatypefactory-via-generic-config">
> >       <dbunit driver="${dbunit.profile.driverClass}"
> >               url="${dbunit.profile.connectionUrl}"
> >               userid="${dbunit.profile.user}"
> >               password="${dbunit.profile.password}">
> >           <dbconfig>
> >               <property name="metadataHandler" value="org.something.that.implements.IMetadataHandler" />
> >               <feature name="caseSensitiveTableNames" value="true" />
> >           </dbconfig>
> >           <operation type="NONE"/>
> >       </dbunit>
> >     </target>
> > ...
> >
> > regards
> > matthias
> >
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: "Bernard Schubach" <[hidden email]>
> > > Gesendet: 27.02.09 15:02:43
> > > An: [hidden email]
> > > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
> >
> >
> > >
> > > I'm using org.dbunit.ant.DbUnitTask, and looking at:
> > > http://www.dbunit.org/apidocs/org/dbunit/ant/DbUnitTask.html
> > > there does not seem to be a setter for the metadataHandler and I do not know how to override the database connection class using this class.  Could you please provide advice?  Sorry for not providing this detail earlier.
> > > Thanks,
> > > Bernard
> > >
> > >
> > >
> > > ----- Original Message ----
> > > From: Matthias Gommeringer <[hidden email]>
> > > To: [hidden email]
> > > Sent: Thursday, February 26, 2009 3:30:20 PM
> > > Subject: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
> > >
> > > Hi Bernard,
> > >
> > > I assume that it is related to bug #2545095 ( http://sourceforge.net/support/tracker.php?aid=2545095 ). You should either use the org.dbunit.ext.mysql.MySqlConnection (it inherits from DatabaseConnection) or you should set the MySqlMetadataHandler:
> > > getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new MySqlMetadataHandler())
> > >
> > > Hope this solves your problem.
> > >
> > > regards,
> > > matthias
> > >
> > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: "Bernard Schubach" <[hidden email]>
> > > > Gesendet: 25.02.09 21:50:33
> > > > An: dbunit user <[hidden email]>
> > > > Betreff: Re: [dbunit-user] NoSuchTableException when using qualifiedTableNames with mutliple mysql databases
> > >
> > >
> > > > I am only working on Windows. Nonetheless, I verified in my C:\
> > > > Documents and Settings\All Users\Application Data\MySQL\MySQL Server
> > > > 5.1\data\ directory that both the schema name and table name are in
> > > > lowercase, and tried setting caseSensitiveTableNames to true (my
> > > > dbunit file already used lowercase names), but still I got the same
> > > > NoSuchTableException. Fwiw, if I changed qualifiedTableNames to false
> > > > and removed the schema prefix from the xml files, then I did not get
> > > > the exception, but instead got a warning followed by a NoSuchColumnExce
> > > > ption, even though of course the column exists.
> > > >
> > > > WARNING: No columns found for table 'buildings' that are supported by
> > > > dbunit. Will return an empty column list
> > > > C:\Documents and Settings\bernard\My Documents\java\osfc\subversion\
> > > > trunk\tools\ant\dbTargets.xml:125: org.dbunit.dataset.NoSuchColumnExcep
> > > > tion: buildings.ID - (Non-uppercase input column: ID) in ColumnNameToIn
> > > > dexes cache map. Note that the map's column names are NOT case
> > > > sensitive.
> > > >
> > > > Thanks again for working so diligently on this.
> > > >
> > > > ----------------------------------------------------------------------
> > > > -------- Open Source Business Conference (OSBC), March 24-25, 2009,
> > > > San Francisco, CA -OSBC tackles the biggest issue in open source:
> > > > Open Sourcing the Enterprise -Strategies to boost innovation and cut
> > > > costs with open source participation -Receive a $600 discount off the
> > > > registration fee with the source code: SFAD http://p.sf.net/sfu/
> > > > XcvMzF8H_______________________________________________ dbunit-user
> > > > mailing list [hidden email] https://lists.
> > > >
> > > > sourceforge.net/lists/listinfo/dbunit-user
> > >
> > >
> > > _______________________________________________________________________
> > > Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
> > > für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a
> > >
> > >
> > > ------------------------------------------------------------------------------
> > > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > > -Strategies to boost innovation and cut costs with open source participation
> > > -Receive a $600 discount off the registration fee with the source code: SFAD
> > > http://p.sf.net/sfu/XcvMzF8H
> > > _______________________________________________
> > > dbunit-user mailing list
> > > [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> > >
> > >
> > >
> > >      
> > >
> > > ------------------------------------------------------------------------------
> > > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > > -Strategies to boost innovation and cut costs with open source participation
> > > -Receive a $600 discount off the registration fee with the source code: SFAD
> > > http://p.sf.net/sfu/XcvMzF8H
> > > _______________________________________________
> > > dbunit-user mailing list
> > > [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> > >
> >
> >
> > _______________________________________________________________________
> > DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die
> > DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a
> >
> >
> > ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > -Strategies to boost innovation and cut costs with open source participation
> > -Receive a $600 discount off the registration fee with the source code: SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
> >
> >
> >      
> >
> > ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > -Strategies to boost innovation and cut costs with open source participation
> > -Receive a $600 discount off the registration fee with the source code: SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > _______________________________________________
> > dbunit-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/dbunit-user
> >
>
>
> ____________________________________________________________________
> Psssst! Schon vom neuen WEB.DE MultiMessenger gehört?
> Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
>
>      
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


_______________________________________________________________________
Jetzt 1 Monat kostenlos! WEB.DE FreeDSL - Telefonanschluss + DSL
für nur 17,95 EURO/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K15039B7069a


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Loading...