Error running testng
troy.sellers Nov 24, 2008 11:40 PMHi All,
I am getting an error running my tests
org.jboss.seam.InstantiationException: Could not instantiate Seam component: MatadorLiteEntityManagerFactory at org.jboss.seam.Component.newInstance(Component.java:2096) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:112) at org.jboss.seam.init.Initialization.init(Initialization.java:727) at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:920) at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58) 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:580) at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:278) at org.testng.SuiteRunner.run(SuiteRunner.java:198) at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821) at org.testng.TestNG.runSuitesLocally(TestNG.java:788) at org.testng.TestNG.run(TestNG.java:708) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62) at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) 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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named MatadorLite at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:89) at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:85) at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50) 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.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138) at org.jboss.seam.Component.callComponentMethod(Component.java:2209) at org.jboss.seam.Component.callCreateMethod(Component.java:2124) at org.jboss.seam.Component.newInstance(Component.java:2084) ... 28 more
I am running maven2 build and have configured my src/test/resources
META-INF - components.xml - persistence.xml components.properties seam.properties
I thought the No Persistence provider
error was because the peristence.xml couldn't be found on the classpath, yet the components.xml can be found here?
Anyone have a suggestion on what I am missing here?
I have included a test datasource in the bootstrap/deploy directory using hsql.
Cheers,
Troy