[jboss-user] [JBoss Seam] - Re: DBUnit Data

neilac333 do-not-reply at jboss.com
Tue Nov 6 13:24:13 EST 2007


I'm still getting the same exception:


  | java.lang.RuntimeException: org.dbunit.dataset.DataSetException: java.net.MalformedURLException
  | 	at org.jboss.seam.mock.DBUnitSeamTest$DataSetOperation.<init>(DBUnitSeamTest.java:170)
  | 	at org.jboss.seam.mock.DBUnitSeamTest$DataSetOperation.<init>(DBUnitSeamTest.java:159)
  | 	at com.myorg.myproj.persistence.test.UpdatableEntityTest.prepareDBUnitOperations(Unknown Source)
  | 	at org.jboss.seam.mock.DBUnitSeamTest.init(DBUnitSeamTest.java:112)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
  | 	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
  | 	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
  | 	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
  | 	at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:165)
  | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
  | 	at org.testng.TestRunner.runWorkers(TestRunner.java:678)
  | 	at org.testng.TestRunner.privateRun(TestRunner.java:624)
  | 	at org.testng.TestRunner.run(TestRunner.java:495)
  | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
  | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
  | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
  | 	at org.testng.SuiteRunner.run(SuiteRunner.java:190)
  | 	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
  | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
  | 	at org.testng.TestNG.run(TestNG.java:699)
  | 	at org.testng.TestNG.privateMain(TestNG.java:824)
  | 	at org.testng.TestNG.main(TestNG.java:802)
  | Caused by: org.dbunit.dataset.DataSetException: java.net.MalformedURLException
  | 	at org.dbunit.dataset.xml.FlatXmlProducer.produce(FlatXmlProducer.java:169)
  | 	at org.dbunit.dataset.CachedDataSet.<init>(CachedDataSet.java:71)
  | 	at org.dbunit.dataset.xml.FlatXmlDataSet.<init>(FlatXmlDataSet.java:200)
  | 	at org.dbunit.dataset.xml.FlatXmlDataSet.<init>(FlatXmlDataSet.java:187)
  | 	at org.jboss.seam.mock.DBUnitSeamTest$DataSetOperation.<init>(DBUnitSeamTest.java:168)
  | 	... 25 more
  | 

I assume this means that the location I am passing to the DataSetOperation constructor isn't "right."  Here is what I am doing:


  | beforeTestOperations.add(
  |               new DataSetOperation("com/myorg/myproj/persistence/test/SRM_USER_Two.xml")
  |       );
  | 

The seed file above is in the folder described, and I even tried the absolute path (i.e. C:\...) to no avail. 

Any insight into how to exectue the DBUnit Seam test properly is appreciated.

And even if I get that working, I would absolutely love to know why my original Ant configuration has the data "disappear."  It may be merely academic, but I am really curious about the reason for this bizarre behavior.

Thanks.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102304#4102304

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102304



More information about the jboss-user mailing list