|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
No columns found for tableHello,
I am having trouble testing a dao code : I use hibernate, dbunit, glue with unitils (JUnit4). And I try to inject the following flatxml dataset to my database : <?xml version='1.0' encoding='UTF-8'?> <dataset> <COMPANIES id="1" code="TestCompany" name="Test Company" min_threshold="25.0" max_threshold="75.0" /> </dataset> (the desc table is +-------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------+--------------+------+-----+---------+----------------+ | id | bigint(20) | NO | PRI | NULL | auto_increment | | code | varchar(255) | NO | UNI | NULL | | | created_on | datetime | YES | | NULL | | | max_threshold | double | NO | | NULL | | | min_threshold | double | NO | | NULL | | | modifiedOn | datetime | YES | | NULL | | | name | varchar(255) | NO | | NULL | | | created_by | bigint(20) | YES | MUL | NULL | | | modified_by | bigint(20) | YES | MUL | NULL | | | quota_strategy_id | bigint(20) | YES | MUL | NULL | | | root_workgroup_id | bigint(20) | YES | MUL | NULL | | | schedule_id | bigint(20) | YES | MUL | NULL | | +-------------------+--------------+------+-----+---------+----------------+) but I have a warning and no data are injected WARN 23 juil. 2009 11:44:09 [DatabaseTableMetaData] getColumns - No columns found for table 'COMPANIES' that are supported by dbunit. Will return an empty column list Any ideas? Thanks, Cyril |
|
|
Re: No columns found for tableHello, can someone show me how to getby the "child record found",
"parent record exists", constraints issues in Oracle with Java environment? I am new to DBunit and has been struggling with insert data into the database using flatXml files. Here is my code. I know someone says I can set foreign key to 0 but I do not know how to do that in my java code. Please help. Thanks in advance. Class.forName("oracle.jdbc.OracleDriver"); Connection jdbcConnection = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:BEER", "acme", "acme"); String sqlCommand = "SET CONSTRAINTS ALL IMMEDIATE"; Statement st = jdbcConnection.createStatement(); st.execute(sqlCommand); IDatabaseConnection connection = new DatabaseConnection(jdbcConnection, "acme"); IDataSet dataSet = new FlatXmlDataSet(new FileInputStream("c:\\DataTest\\rate.xml")); Thanks. ------------------------------------------------------------------------------ _______________________________________________ dbunit-user mailing list dbunit-user@... https://lists.sourceforge.net/lists/listinfo/dbunit-user |
| Free embeddable forum powered by Nabble | Forum Help |