FW: org.dbunit.dataset.NoSuchTableException Oracle 10.1

View: New views
8 Messages — Rating Filter:   Alert me  

FW: org.dbunit.dataset.NoSuchTableException Oracle 10.1

by Sean Howes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

 

 


From: Sean Howes
Sent: 07 May 2008 18:04
To: 'dbunit-user@....'
Subject: org.dbunit.dataset.NoSuchTableException Oracle 10.1

 

Hello,

 

I am more than likely missing something but when running the following code to try to run this code:

 

private static String SCHEMA = "TEST";

 

public static void main(String[] argv) throws Exception {

        Class driverClass = Class.forName("oracle.jdbc.OracleDriver");

        Connection jdbcConnection = DriverManager.getConnection("jdbc:oracle:thin:@my.server.addres:9999:AHOO","test","test");

        IDatabaseConnection connection = new DatabaseConnection(jdbcConnection,SCHEMA);

        DatabaseConnection databaseConnection = new DatabaseConnection(jdbcConnection,SCHEMA);

        databaseConnection.getConfig().setProperty("http://www.dbunit.org/features/qualifiedTableNames", true);

 

        IDataSet dataSet = new FlatXmlDataSet(new File("resource/dataset.xml"));

 

        try {

            DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet);

        }

        finally {

            connection.close();

        }

}

 

I get the following error:

 

Exception in thread "main" org.dbunit.dataset.NoSuchTableException: MANUFACTURER

            at org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.java:192)

            at org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:98)

            at org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:67)

            at com.yahoo.yam.tests.UserPrimitiveTest.main(UserPrimitiveTest.java:74)

 

This is driving me mad as my user has the rights to create tables and I have done though the oracle admin tool. My data set looks like this :

 

<?xml version="1.0" encoding="UTF-8" ?>

<dataset>

<MANUFACTURER id="1" NAME="IBM" />

<MANUFACTURER id="2" NAME="DELL" />

</dataset>

 

Can anyone please help as I have no idea what I am doing wrong, I am sure it will be something obvious to everyone but me . I am using Oracle 10.1, and Dbunit 2.2.1, I have tried with the latest dbunit from the website and I get the same error.

 

The bit of code that throws the exception is here :

 

   public ITableMetaData getTableMetaData(String tableName) throws DataSetException

    {

        initialize();

 

        // Verify if table exist in the database

        String upperTableName = tableName.toUpperCase();

        if (!_tableMap.containsKey(upperTableName))

        {

            throw new NoSuchTableException(tableName);

        }

 

But I am unsure of why this is being run. What I want to do is have dbunit insert the data I have in the dataset.xml into my oracle database so I can (eventually) test against it.

 

Any help is much appreciated,

 

Regards,

 

Sean  


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user

Re: FW: org.dbunit.dataset.NoSuchTableException Oracle 10.1

by reneluers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think i have something similair with oracle 8.1.

Could you check what the rowcount is in your dataSet ?

With me the dataset never contains any result unless i put it in by hand myself.

Maybe Oracle is the problem?

Grx Rene


Sean Howes wrote:
 

 

________________________________

From: Sean Howes
Sent: 07 May 2008 18:04
To: 'dbunit-user@lists.sourceforge.net.'
Subject: org.dbunit.dataset.NoSuchTableException Oracle 10.1

 

Hello,

 

I am more than likely missing something but when running the following
code to try to run this code:

 

private static String SCHEMA = "TEST";

 

public static void main(String[] argv) throws Exception {

        Class driverClass = Class.forName("oracle.jdbc.OracleDriver");

        Connection jdbcConnection =
DriverManager.getConnection("jdbc:oracle:thin:@my.server.addres:9999:AHO
O","test","test");

        IDatabaseConnection connection = new
DatabaseConnection(jdbcConnection,SCHEMA);

        DatabaseConnection databaseConnection = new
DatabaseConnection(jdbcConnection,SCHEMA);

 
databaseConnection.getConfig().setProperty("http://www.dbunit.org/featur
es/qualifiedTableNames", true);

 

        IDataSet dataSet = new FlatXmlDataSet(new
File("resource/dataset.xml"));

 

        try {

            DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet);

        }

        finally {

            connection.close();

        }

}

 

I get the following error:

 

Exception in thread "main" org.dbunit.dataset.NoSuchTableException:
MANUFACTURER

            at
org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.jav
a:192)

            at
org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:
98)

            at
org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:
67)

            at
com.yahoo.yam.tests.UserPrimitiveTest.main(UserPrimitiveTest.java:74)

 

This is driving me mad as my user has the rights to create tables and I
have done though the oracle admin tool. My data set looks like this :

 

<?xml version="1.0" encoding="UTF-8" ?>

<dataset>

<MANUFACTURER id="1" NAME="IBM" />

<MANUFACTURER id="2" NAME="DELL" />

</dataset>

 

Can anyone please help as I have no idea what I am doing wrong, I am
sure it will be something obvious to everyone but me . I am using Oracle
10.1, and Dbunit 2.2.1, I have tried with the latest dbunit from the
website and I get the same error.

 

The bit of code that throws the exception is here :

 

   public ITableMetaData getTableMetaData(String tableName) throws
DataSetException

    {

        initialize();

 

        // Verify if table exist in the database

        String upperTableName = tableName.toUpperCase();

        if (!_tableMap.containsKey(upperTableName))

        {

            throw new NoSuchTableException(tableName);

        }

 

But I am unsure of why this is being run. What I want to do is have
dbunit insert the data I have in the dataset.xml into my oracle database
so I can (eventually) test against it.

 

Any help is much appreciated,

 

Regards,

 

Sean  


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
dbunit-user mailing list
dbunit-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbunit-user

Re: FW: org.dbunit.dataset.NoSuchTableException Oracle 10.1

by Sean Howes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have checked and there is nothing in the db. I don't think its just
Oracle though as I get the same problem with MySQL. Am I missing
something that I am supposed to do?

Regards,

Sean

-----Original Message-----
From: dbunit-user-bounces@...
[mailto:dbunit-user-bounces@...] On Behalf Of
reneluers
Sent: 08 May 2008 10:58
To: dbunit-user@...
Subject: Re: [dbunit-user] FW: org.dbunit.dataset.NoSuchTableException
Oracle 10.1


I think i have something similair with oracle 8.1.

Could you check what the rowcount is in your dataSet ?

With me the dataset never contains any result unless i put it in by hand
myself.

Maybe Oracle is the problem?

Grx Rene



Sean Howes wrote:

>
>  
>
>  
>
> ________________________________
>
> From: Sean Howes
> Sent: 07 May 2008 18:04
> To: 'dbunit-user@....'
> Subject: org.dbunit.dataset.NoSuchTableException Oracle 10.1
>
>  
>
> Hello,
>
>  
>
> I am more than likely missing something but when running the following
> code to try to run this code:
>
>  
>
> private static String SCHEMA = "TEST";
>
>  
>
> public static void main(String[] argv) throws Exception {
>
>         Class driverClass = Class.forName("oracle.jdbc.OracleDriver");
>
>         Connection jdbcConnection =
>
DriverManager.getConnection("jdbc:oracle:thin:@my.server.addres:9999:AHO

> O","test","test");
>
>         IDatabaseConnection connection = new
> DatabaseConnection(jdbcConnection,SCHEMA);
>
>         DatabaseConnection databaseConnection = new
> DatabaseConnection(jdbcConnection,SCHEMA);
>
>  
>
databaseConnection.getConfig().setProperty("http://www.dbunit.org/featur

> es/qualifiedTableNames", true);
>
>  
>
>         IDataSet dataSet = new FlatXmlDataSet(new
> File("resource/dataset.xml"));
>
>  
>
>         try {
>
>             DatabaseOperation.CLEAN_INSERT.execute(connection,
dataSet);

>
>         }
>
>         finally {
>
>             connection.close();
>
>         }
>
> }
>
>  
>
> I get the following error:
>
>  
>
> Exception in thread "main" org.dbunit.dataset.NoSuchTableException:
> MANUFACTURER
>
>             at
>
org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.jav
> a:192)
>
>             at
>
org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:
> 98)
>
>             at
>
org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:
> 67)
>
>             at
> com.yahoo.yam.tests.UserPrimitiveTest.main(UserPrimitiveTest.java:74)
>
>  
>
> This is driving me mad as my user has the rights to create tables and
I

> have done though the oracle admin tool. My data set looks like this :
>
>  
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> <dataset>
>
> <MANUFACTURER id="1" NAME="IBM" />
>
> <MANUFACTURER id="2" NAME="DELL" />
>
> </dataset>
>
>  
>
> Can anyone please help as I have no idea what I am doing wrong, I am
> sure it will be something obvious to everyone but me . I am using
Oracle

> 10.1, and Dbunit 2.2.1, I have tried with the latest dbunit from the
> website and I get the same error.
>
>  
>
> The bit of code that throws the exception is here :
>
>  
>
>    public ITableMetaData getTableMetaData(String tableName) throws
> DataSetException
>
>     {
>
>         initialize();
>
>  
>
>         // Verify if table exist in the database
>
>         String upperTableName = tableName.toUpperCase();
>
>         if (!_tableMap.containsKey(upperTableName))
>
>         {
>
>             throw new NoSuchTableException(tableName);
>
>         }
>
>  
>
> But I am unsure of why this is being run. What I want to do is have
> dbunit insert the data I have in the dataset.xml into my oracle
database

> so I can (eventually) test against it.
>
>  
>
> Any help is much appreciated,
>
>  
>
> Regards,
>
>  
>
> Sean  
>
>
>
------------------------------------------------------------------------
-
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save
$100.
> Use priority code J8TL2D2.
>
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
> _______________________________________________
> dbunit-user mailing list
> dbunit-user@...
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>

--
View this message in context:
http://www.nabble.com/FW%3A-org.dbunit.dataset.NoSuchTableException-Orac
le-10.1-tp17123913p17124117.html
Sent from the DBUnit - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user

Re: FW: org.dbunit.dataset.NoSuchTableException Oracle 10.1

by Sean Howes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok I may be being really really daft. Do I need to make the db tables
first as I though last time I used dbunit it created them for me but it
might have been hibernate doing that for me. So am I being daft ?

Regards,

Sean

-----Original Message-----
From: dbunit-user-bounces@...
[mailto:dbunit-user-bounces@...] On Behalf Of
reneluers
Sent: 08 May 2008 10:58
To: dbunit-user@...
Subject: Re: [dbunit-user] FW: org.dbunit.dataset.NoSuchTableException
Oracle 10.1


I think i have something similair with oracle 8.1.

Could you check what the rowcount is in your dataSet ?

With me the dataset never contains any result unless i put it in by hand
myself.

Maybe Oracle is the problem?

Grx Rene



Sean Howes wrote:

>
>  
>
>  
>
> ________________________________
>
> From: Sean Howes
> Sent: 07 May 2008 18:04
> To: 'dbunit-user@....'
> Subject: org.dbunit.dataset.NoSuchTableException Oracle 10.1
>
>  
>
> Hello,
>
>  
>
> I am more than likely missing something but when running the following
> code to try to run this code:
>
>  
>
> private static String SCHEMA = "TEST";
>
>  
>
> public static void main(String[] argv) throws Exception {
>
>         Class driverClass = Class.forName("oracle.jdbc.OracleDriver");
>
>         Connection jdbcConnection =
>
DriverManager.getConnection("jdbc:oracle:thin:@my.server.addres:9999:AHO

> O","test","test");
>
>         IDatabaseConnection connection = new
> DatabaseConnection(jdbcConnection,SCHEMA);
>
>         DatabaseConnection databaseConnection = new
> DatabaseConnection(jdbcConnection,SCHEMA);
>
>  
>
databaseConnection.getConfig().setProperty("http://www.dbunit.org/featur

> es/qualifiedTableNames", true);
>
>  
>
>         IDataSet dataSet = new FlatXmlDataSet(new
> File("resource/dataset.xml"));
>
>  
>
>         try {
>
>             DatabaseOperation.CLEAN_INSERT.execute(connection,
dataSet);

>
>         }
>
>         finally {
>
>             connection.close();
>
>         }
>
> }
>
>  
>
> I get the following error:
>
>  
>
> Exception in thread "main" org.dbunit.dataset.NoSuchTableException:
> MANUFACTURER
>
>             at
>
org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.jav
> a:192)
>
>             at
>
org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:
> 98)
>
>             at
>
org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:
> 67)
>
>             at
> com.yahoo.yam.tests.UserPrimitiveTest.main(UserPrimitiveTest.java:74)
>
>  
>
> This is driving me mad as my user has the rights to create tables and
I

> have done though the oracle admin tool. My data set looks like this :
>
>  
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> <dataset>
>
> <MANUFACTURER id="1" NAME="IBM" />
>
> <MANUFACTURER id="2" NAME="DELL" />
>
> </dataset>
>
>  
>
> Can anyone please help as I have no idea what I am doing wrong, I am
> sure it will be something obvious to everyone but me . I am using
Oracle

> 10.1, and Dbunit 2.2.1, I have tried with the latest dbunit from the
> website and I get the same error.
>
>  
>
> The bit of code that throws the exception is here :
>
>  
>
>    public ITableMetaData getTableMetaData(String tableName) throws
> DataSetException
>
>     {
>
>         initialize();
>
>  
>
>         // Verify if table exist in the database
>
>         String upperTableName = tableName.toUpperCase();
>
>         if (!_tableMap.containsKey(upperTableName))
>
>         {
>
>             throw new NoSuchTableException(tableName);
>
>         }
>
>  
>
> But I am unsure of why this is being run. What I want to do is have
> dbunit insert the data I have in the dataset.xml into my oracle
database

> so I can (eventually) test against it.
>
>  
>
> Any help is much appreciated,
>
>  
>
> Regards,
>
>  
>
> Sean  
>
>
>
------------------------------------------------------------------------
-
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save
$100.
> Use priority code J8TL2D2.
>
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
> _______________________________________________
> dbunit-user mailing list
> dbunit-user@...
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>

--
View this message in context:
http://www.nabble.com/FW%3A-org.dbunit.dataset.NoSuchTableException-Orac
le-10.1-tp17123913p17124117.html
Sent from the DBUnit - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user

Re: FW: org.dbunit.dataset.NoSuchTableException Oracle 10.1

by Marcus Ilgner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

[...]
> databaseConnection.getConfig().setProperty("http://www.dbunit.org/features/qualifiedTableNames",
> true);
[...]
What happens, when you remove this line? I'd interpret "qualified
table names" as "always needs schema prefixed" or something like
that...

Best regards
Marcus

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user

Re: FW: org.dbunit.dataset.NoSuchTableException Oracle 10.1

by Moody Lee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

yes, i think dbunit will not make the db tables for you,
because dbunit know nothing about your table but the table name, column names and the values you are trying to insert.
you should make it yourself.

2008/5/9 Sean Howes <howes@...>:
Ok I may be being really really daft. Do I need to make the db tables
first as I though last time I used dbunit it created them for me but it
might have been hibernate doing that for me. So am I being daft ?
w
Regards,

Sean

-----Original Message-----
From: dbunit-user-bounces@...
[mailto:dbunit-user-bounces@...] On Behalf Of
reneluers
Sent: 08 May 2008 10:58
Subject: Re: [dbunit-user] FW: org.dbunit.dataset.NoSuchTableException
Oracle 10.1


I think i have something similair with oracle 8.1.

Could you check what the rowcount is in your dataSet ?

With me the dataset never contains any result unless i put it in by hand
myself.

Maybe Oracle is the problem?

Grx Rene



Sean Howes wrote:
>
>
>
>
>
> ________________________________
>
> From: Sean Howes
> Sent: 07 May 2008 18:04
> To: 'dbunit-user@....'
> Subject: org.dbunit.dataset.NoSuchTableException Oracle 10.1
>
>
>
> Hello,
>
>
>
> I am more than likely missing something but when running the following
> code to try to run this code:
>
>
>
> private static String SCHEMA = "TEST";
>
>
>
> public static void main(String[] argv) throws Exception {
>
>         Class driverClass = Class.forName("oracle.jdbc.OracleDriver");
>
>         Connection jdbcConnection =
>
DriverManager.getConnection("jdbc:oracle:thin:@my.server.addres:9999:AHO
> O","test","test");
>
>         IDatabaseConnection connection = new
> DatabaseConnection(jdbcConnection,SCHEMA);
>
>         DatabaseConnection databaseConnection = new
> DatabaseConnection(jdbcConnection,SCHEMA);
>
>
>
databaseConnection.getConfig().setProperty("http://www.dbunit.org/featur
> es/qualifiedTableNames", true);
>
>
>
>         IDataSet dataSet = new FlatXmlDataSet(new
> File("resource/dataset.xml"));
>
>
>
>         try {
>
>             DatabaseOperation.CLEAN_INSERT.execute(connection,
dataSet);
>
>         }
>
>         finally {
>
>             connection.close();
>
>         }
>
> }
>
>
>
> I get the following error:
>
>
>
> Exception in thread "main" org.dbunit.dataset.NoSuchTableException:
> MANUFACTURER
>
>             at
>
org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.jav
> a:192)
>
>             at
>
org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:
> 98)
>
>             at
>
org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:
> 67)
>
>             at
> com.yahoo.yam.tests.UserPrimitiveTest.main(UserPrimitiveTest.java:74)
>
>
>
> This is driving me mad as my user has the rights to create tables and
I
> have done though the oracle admin tool. My data set looks like this :
>
>
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> <dataset>
>
> <MANUFACTURER id="1" NAME="IBM" />
>
> <MANUFACTURER id="2" NAME="DELL" />
>
> </dataset>
>
>
>
> Can anyone please help as I have no idea what I am doing wrong, I am
> sure it will be something obvious to everyone but me . I am using
Oracle
> 10.1, and Dbunit 2.2.1, I have tried with the latest dbunit from the
> website and I get the same error.
>
>
>
> The bit of code that throws the exception is here :
>
>
>
>    public ITableMetaData getTableMetaData(String tableName) throws
> DataSetException
>
>     {
>
>         initialize();
>
>
>
>         // Verify if table exist in the database
>
>         String upperTableName = tableName.toUpperCase();
>
>         if (!_tableMap.containsKey(upperTableName))
>
>         {
>
>             throw new NoSuchTableException(tableName);
>
>         }
>
>
>
> But I am unsure of why this is being run. What I want to do is have
> dbunit insert the data I have in the dataset.xml into my oracle
database
> so I can (eventually) test against it.
>
>
>
> Any help is much appreciated,
>
>
>
> Regards,
>
>
>
> Sean
>
>
>
------------------------------------------------------------------------
-
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save
$100.
> Use priority code J8TL2D2.
>
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
> _______________________________________________
> dbunit-user mailing list
> dbunit-user@...
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>

--
View this message in context:
http://www.nabble.com/FW%3A-org.dbunit.dataset.NoSuchTableException-Orac
le-10.1-tp17123913p17124117.html

Sent from the DBUnit - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
avaone
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user

Re: FW: org.dbunit.dataset.NoSuchTableException Oracle 10.1

by Marcus Ilgner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Thu, May 15, 2008 at 4:09 AM, Moody Lee <mmoody.lee@...> wrote:
> yes, i think dbunit will not make the db tables for you,
> because dbunit know nothing about your table but the table name, column
> names and the values you are trying to insert.
> you should make it yourself.
>

If you're looking for a library to evolve your database and create the
tables, have a look at Liquibase (http://www.liquibase.org/). I've
been using it for some weeks now and like it quite much.

> 2008/5/9 Sean Howes <howes@...>:
>>
>> Ok I may be being really really daft. Do I need to make the db tables
>> first as I though last time I used dbunit it created them for me but it
>> might have been hibernate doing that for me. So am I being daft ?
>> w
>> Regards,
>>
>> Sean
>>
>> -----Original Message-----
>> From: dbunit-user-bounces@...
>> [mailto:dbunit-user-bounces@...] On Behalf Of
>> reneluers
>> Sent: 08 May 2008 10:58
>> To: dbunit-user@...
>> Subject: Re: [dbunit-user] FW: org.dbunit.dataset.NoSuchTableException
>> Oracle 10.1
>>
>>
>> I think i have something similair with oracle 8.1.
>>
>> Could you check what the rowcount is in your dataSet ?
>>
>> With me the dataset never contains any result unless i put it in by hand
>> myself.
>>
>> Maybe Oracle is the problem?
>>
>> Grx Rene
>>
>>
>>
>> Sean Howes wrote:
>> >
>> >
>> >
>> >
>> >
>> > ________________________________
>> >
>> > From: Sean Howes
>> > Sent: 07 May 2008 18:04
>> > To: 'dbunit-user@....'
>> > Subject: org.dbunit.dataset.NoSuchTableException Oracle 10.1
>> >
>> >
>> >
>> > Hello,
>> >
>> >
>> >
>> > I am more than likely missing something but when running the following
>> > code to try to run this code:
>> >
>> >
>> >
>> > private static String SCHEMA = "TEST";
>> >
>> >
>> >
>> > public static void main(String[] argv) throws Exception {
>> >
>> >         Class driverClass = Class.forName("oracle.jdbc.OracleDriver");
>> >
>> >         Connection jdbcConnection =
>> >
>> DriverManager.getConnection("jdbc:oracle:thin:@my.server.addres:9999:AHO
>> > O","test","test");
>> >
>> >         IDatabaseConnection connection = new
>> > DatabaseConnection(jdbcConnection,SCHEMA);
>> >
>> >         DatabaseConnection databaseConnection = new
>> > DatabaseConnection(jdbcConnection,SCHEMA);
>> >
>> >
>> >
>> databaseConnection.getConfig().setProperty("http://www.dbunit.org/featur
>> > es/qualifiedTableNames", true);
>> >
>> >
>> >
>> >         IDataSet dataSet = new FlatXmlDataSet(new
>> > File("resource/dataset.xml"));
>> >
>> >
>> >
>> >         try {
>> >
>> >             DatabaseOperation.CLEAN_INSERT.execute(connection,
>> dataSet);
>> >
>> >         }
>> >
>> >         finally {
>> >
>> >             connection.close();
>> >
>> >         }
>> >
>> > }
>> >
>> >
>> >
>> > I get the following error:
>> >
>> >
>> >
>> > Exception in thread "main" org.dbunit.dataset.NoSuchTableException:
>> > MANUFACTURER
>> >
>> >             at
>> >
>> org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.jav
>> > a:192)
>> >
>> >             at
>> >
>> org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:
>> > 98)
>> >
>> >             at
>> >
>> org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:
>> > 67)
>> >
>> >             at
>> > com.yahoo.yam.tests.UserPrimitiveTest.main(UserPrimitiveTest.java:74)
>> >
>> >
>> >
>> > This is driving me mad as my user has the rights to create tables and
>> I
>> > have done though the oracle admin tool. My data set looks like this :
>> >
>> >
>> >
>> > <?xml version="1.0" encoding="UTF-8" ?>
>> >
>> > <dataset>
>> >
>> > <MANUFACTURER id="1" NAME="IBM" />
>> >
>> > <MANUFACTURER id="2" NAME="DELL" />
>> >
>> > </dataset>
>> >
>> >
>> >
>> > Can anyone please help as I have no idea what I am doing wrong, I am
>> > sure it will be something obvious to everyone but me . I am using
>> Oracle
>> > 10.1, and Dbunit 2.2.1, I have tried with the latest dbunit from the
>> > website and I get the same error.
>> >
>> >
>> >
>> > The bit of code that throws the exception is here :
>> >
>> >
>> >
>> >    public ITableMetaData getTableMetaData(String tableName) throws
>> > DataSetException
>> >
>> >     {
>> >
>> >         initialize();
>> >
>> >
>> >
>> >         // Verify if table exist in the database
>> >
>> >         String upperTableName = tableName.toUpperCase();
>> >
>> >         if (!_tableMap.containsKey(upperTableName))
>> >
>> >         {
>> >
>> >             throw new NoSuchTableException(tableName);
>> >
>> >         }
>> >
>> >
>> >
>> > But I am unsure of why this is being run. What I want to do is have
>> > dbunit insert the data I have in the dataset.xml into my oracle
>> database
>> > so I can (eventually) test against it.
>> >
>> >
>> >
>> > Any help is much appreciated,
>> >
>> >
>> >
>> > Regards,
>> >
>> >
>> >
>> > Sean
>> >

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user

Re: FW: org.dbunit.dataset.NoSuchTableExceptionOracle 10.1

by Sean Howes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the feedback guys m I shall look into liquibase

Regards,

Sean Howes

-----Original Message-----
From: dbunit-user-bounces@...
[mailto:dbunit-user-bounces@...] On Behalf Of Marcus
Ilgner
Sent: 15 May 2008 09:54
To: dbunit-user@...
Subject: Re: [dbunit-user] FW:
org.dbunit.dataset.NoSuchTableExceptionOracle 10.1

Hi,

On Thu, May 15, 2008 at 4:09 AM, Moody Lee <mmoody.lee@...> wrote:
> yes, i think dbunit will not make the db tables for you,
> because dbunit know nothing about your table but the table name,
column
> names and the values you are trying to insert.
> you should make it yourself.
>

If you're looking for a library to evolve your database and create the
tables, have a look at Liquibase (http://www.liquibase.org/). I've
been using it for some weeks now and like it quite much.

> 2008/5/9 Sean Howes <howes@...>:
>>
>> Ok I may be being really really daft. Do I need to make the db tables
>> first as I though last time I used dbunit it created them for me but
it

>> might have been hibernate doing that for me. So am I being daft ?
>> w
>> Regards,
>>
>> Sean
>>
>> -----Original Message-----
>> From: dbunit-user-bounces@...
>> [mailto:dbunit-user-bounces@...] On Behalf Of
>> reneluers
>> Sent: 08 May 2008 10:58
>> To: dbunit-user@...
>> Subject: Re: [dbunit-user] FW:
org.dbunit.dataset.NoSuchTableException
>> Oracle 10.1
>>
>>
>> I think i have something similair with oracle 8.1.
>>
>> Could you check what the rowcount is in your dataSet ?
>>
>> With me the dataset never contains any result unless i put it in by
hand

>> myself.
>>
>> Maybe Oracle is the problem?
>>
>> Grx Rene
>>
>>
>>
>> Sean Howes wrote:
>> >
>> >
>> >
>> >
>> >
>> > ________________________________
>> >
>> > From: Sean Howes
>> > Sent: 07 May 2008 18:04
>> > To: 'dbunit-user@....'
>> > Subject: org.dbunit.dataset.NoSuchTableException Oracle 10.1
>> >
>> >
>> >
>> > Hello,
>> >
>> >
>> >
>> > I am more than likely missing something but when running the
following

>> > code to try to run this code:
>> >
>> >
>> >
>> > private static String SCHEMA = "TEST";
>> >
>> >
>> >
>> > public static void main(String[] argv) throws Exception {
>> >
>> >         Class driverClass =
Class.forName("oracle.jdbc.OracleDriver");
>> >
>> >         Connection jdbcConnection =
>> >
>>
DriverManager.getConnection("jdbc:oracle:thin:@my.server.addres:9999:AHO

>> > O","test","test");
>> >
>> >         IDatabaseConnection connection = new
>> > DatabaseConnection(jdbcConnection,SCHEMA);
>> >
>> >         DatabaseConnection databaseConnection = new
>> > DatabaseConnection(jdbcConnection,SCHEMA);
>> >
>> >
>> >
>>
databaseConnection.getConfig().setProperty("http://www.dbunit.org/featur

>> > es/qualifiedTableNames", true);
>> >
>> >
>> >
>> >         IDataSet dataSet = new FlatXmlDataSet(new
>> > File("resource/dataset.xml"));
>> >
>> >
>> >
>> >         try {
>> >
>> >             DatabaseOperation.CLEAN_INSERT.execute(connection,
>> dataSet);
>> >
>> >         }
>> >
>> >         finally {
>> >
>> >             connection.close();
>> >
>> >         }
>> >
>> > }
>> >
>> >
>> >
>> > I get the following error:
>> >
>> >
>> >
>> > Exception in thread "main" org.dbunit.dataset.NoSuchTableException:
>> > MANUFACTURER
>> >
>> >             at
>> >
>>
org.dbunit.database.DatabaseDataSet.getTableMetaData(DatabaseDataSet.jav
>> > a:192)
>> >
>> >             at
>> >
>>
org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:
>> > 98)
>> >
>> >             at
>> >
>>
org.dbunit.operation.CompositeOperation.execute(CompositeOperation.java:
>> > 67)
>> >
>> >             at
>> >
com.yahoo.yam.tests.UserPrimitiveTest.main(UserPrimitiveTest.java:74)
>> >
>> >
>> >
>> > This is driving me mad as my user has the rights to create tables
and
>> I
>> > have done though the oracle admin tool. My data set looks like this
:

>> >
>> >
>> >
>> > <?xml version="1.0" encoding="UTF-8" ?>
>> >
>> > <dataset>
>> >
>> > <MANUFACTURER id="1" NAME="IBM" />
>> >
>> > <MANUFACTURER id="2" NAME="DELL" />
>> >
>> > </dataset>
>> >
>> >
>> >
>> > Can anyone please help as I have no idea what I am doing wrong, I
am
>> > sure it will be something obvious to everyone but me . I am using
>> Oracle
>> > 10.1, and Dbunit 2.2.1, I have tried with the latest dbunit from
the

>> > website and I get the same error.
>> >
>> >
>> >
>> > The bit of code that throws the exception is here :
>> >
>> >
>> >
>> >    public ITableMetaData getTableMetaData(String tableName) throws
>> > DataSetException
>> >
>> >     {
>> >
>> >         initialize();
>> >
>> >
>> >
>> >         // Verify if table exist in the database
>> >
>> >         String upperTableName = tableName.toUpperCase();
>> >
>> >         if (!_tableMap.containsKey(upperTableName))
>> >
>> >         {
>> >
>> >             throw new NoSuchTableException(tableName);
>> >
>> >         }
>> >
>> >
>> >
>> > But I am unsure of why this is being run. What I want to do is have
>> > dbunit insert the data I have in the dataset.xml into my oracle
>> database
>> > so I can (eventually) test against it.
>> >
>> >
>> >
>> > Any help is much appreciated,
>> >
>> >
>> >
>> > Regards,
>> >
>> >
>> >
>> > Sean
>> >

------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
dbunit-user mailing list
dbunit-user@...
https://lists.sourceforge.net/lists/listinfo/dbunit-user
LightInTheBox - Buy quality products at wholesale price