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