9 Replies Latest reply on Feb 16, 2012 2:11 PM by kelly goedert

    arquillian-persistence-extension problem

    kelly goedert Apprentice

      Hi,

       

      I am trying to use arquillian persistence extension, running the tests against a jboss 6.1 and I am getting the following error:

       

       

      {code}

      org.jboss.arquillian.persistence.exception.DataSourceNotDefinedException: DataSource not defined

                at org.jboss.arquillian.persistence.metadata.MetadataProvider.getDataSourceName(MetadataProvider.java:110)

                at org.jboss.arquillian.persistence.lifecycle.PersistenceTestHandler.createDataSource(PersistenceTestHandler.java:96)

                at org.jboss.arquillian.persistence.lifecycle.PersistenceTestHandler.beforeTest(PersistenceTestHandler.java:78)

                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:597)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)

                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:597)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)

                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:597)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)

                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:597)

                at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)

                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)

                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:95)

                at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:222)

                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

                at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240)

                at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)

                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)

                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)

                at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

                at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

                at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

                at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

                at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

                at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185)

                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)

                at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)

                at org.junit.runner.JUnitCore.run(JUnitCore.java:157)

                at org.junit.runner.JUnitCore.run(JUnitCore.java:136)

                at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65)

                at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:160)

                at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:126)

                at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:90)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)

                at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)

                at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)

                at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)

                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)

                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)

                at java.lang.Thread.run(Thread.java:662)

       

      {code}

       

       

      My test is as follows:

       

      {code}

      @RunWith(Arquillian.class)

      public class UserManagerBeanITTest {

       

       

                @Deployment

                public static Archive<?> createDeploymentPackage()

                  {

                          return ShrinkWrap.create(JavaArchive.class, "test.jar")

                      .addPackage(User.class.getPackage())

                      .addPackage(UserManagerBean.class.getPackage())

                      .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")

                      .addAsManifestResource("test-persistence.xml", "persistence.xml");

       

       

                  }

       

       

                @EJB

                private UserManagerBean manager;

       

       

                @Test

                @UsingDataSet("datasets/users.yml")

                public void findExistingUser() {

                          List<User> users = manager.findByName("me");

       

       

                          assertNotNull(users);

                          assertEquals(1, users.size());

                          assertEquals("me", users.get(0));

                }

       

       

      }

       

      {code}

       

      Should this work on jbossas 6.1? If so, what is wrong? The version of arquillian is CR7 and the persistence extension is Alpha3

       

      Thanks

       

      Kelly

        • 1. Re: arquillian-persistence-extension problem
          Bartosz Majsak Master

          Hi Kelly,

           

          you should define data source either in arquillian.xml (something like this) or use @DataSource annotation.

           

          Hope that helps.

          • 2. Re: arquillian-persistence-extension problem
            kelly goedert Apprentice

            I did, it did not work. If I set it up like this

             

            <arquillian xmlns="http://jboss.com/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                      xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

                      <container qualifier="jbossas" default="true">

                                <configuration>

                                          <property name="providerUrl">jndi.port</property>

                                </configuration>

                                <extension qualifier="persistence">

                                          <property name="defaultDataSource">java:/DefaultDS</property>

                                          <property name="initStatement">SET REFERENTIAL_INTEGRITY FALSE</property>

                                          <property name="userTransactionJndi">java:/UserTransaction</property>

                                </extension>

                      </container>

            </arquillian>

             

             

            I still get the same error. The java:/DefaultDS is this datasource I am using on my test-persistence.xml

             

            <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"

                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                xsi:schemaLocation="

                    http://java.sun.com/xml/ns/persistence

                    http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

                <persistence-unit name="test">

                          <provider>org.hibernate.ejb.HibernatePersistence</provider>

                    <jta-data-source>java:/DefaultDS</jta-data-source>

                    <properties>

                        <property name="hibernate.hbm2ddl.auto" value="create-drop"/>

                        <property name="hibernate.show_sql" value="true"/>

                    </properties>

                </persistence-unit>

            </persistence>

             

            Thanks

             

            Kelly

            • 3. Re: arquillian-persistence-extension problem
              Bartosz Majsak Master

              Does it also fail when you move <extension> element outside of <container>? I believe <extension> elements should be defined as first-level nodes in arquillian.xml.

              1 of 1 people found this helpful
              • 4. Re: arquillian-persistence-extension problem
                kelly goedert Apprentice

                My mistake, it really should be first-level element. But I also had to remove the user userTransactionJndi property to make it work. If I leave it there I get this:

                 

                org.jboss.arquillian.persistence.transaction.TransactionNotAvailableException: Failed obtaining transaction.

                          at org.jboss.arquillian.persistence.transaction.TransactionalWrapper.obtainTransaction(TransactionalWrapper.java:78)

                          at org.jboss.arquillian.persistence.transaction.TransactionalWrapper.beforeTest(TransactionalWrapper.java:48)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                          at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                          at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                          at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)

                          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)

                          at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

                          at org.jboss.arquillian.persistence.lifecycle.TransactionHandler.startTransactionBeforeTest(TransactionHandler.java:46)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                          at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                          at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                          at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                          at org.jboss.arquillian.persistence.data.dbunit.DBUnitPersistenceTestLifecycleHandler.createDatabaseConnection(DBUnitPersistenceTestLifecycleHandler.java:72)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)

                          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)

                          at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

                          at org.jboss.arquillian.persistence.lifecycle.PersistenceTestHandler.beforeTest(PersistenceTestHandler.java:79)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                          at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                          at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                          at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)

                          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:597)

                          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)

                          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)

                          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)

                          at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:95)

                          at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:222)

                          at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

                          at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

                          at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240)

                          at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)

                          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)

                          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)

                          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

                          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

                          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

                          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

                          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

                          at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185)

                          at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

                          at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

                          at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)

                          at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

                          at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)

                          at org.junit.runner.JUnitCore.run(JUnitCore.java:157)

                          at org.junit.runner.JUnitCore.run(JUnitCore.java:136)

                          at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65)

                          at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:160)

                          at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:126)

                          at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:90)

                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)

                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)

                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)

                          at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)

                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)

                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)

                          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)

                          at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)

                          at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)

                          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)

                          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)

                          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)

                          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                          at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)

                          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)

                          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)

                          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)

                          at java.lang.Thread.run(Thread.java:662)

                Caused by: javax.naming.NameNotFoundException: UserTransaction not bound

                          at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)

                          at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)

                          at org.jnp.server.NamingServer.getObject(NamingServer.java:785)

                          at org.jnp.server.NamingServer.lookup(NamingServer.java:443)

                          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)

                          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)

                          at javax.naming.InitialContext.lookup(InitialContext.java:392)

                          at org.jboss.arquillian.persistence.transaction.TransactionalWrapper.obtainTransaction(TransactionalWrapper.java:74)

                          ... 151 more

                 

                I will look for the correct name for the user transaction now... as it seems to be the problem

                 

                Thanks again

                • 5. Re: arquillian-persistence-extension problem
                  Bartosz Majsak Master

                  If you remove transaction jndi name from arquillian.xml does it work?

                  • 7. Re: arquillian-persistence-extension problem
                    Bartosz Majsak Master

                    Then it means that "java:comp/UserTransaction" is valid for your container as it's the default setting (don't need to specify it in the xml explicitly). Otherwise you will be still getting the same exception about UserTransaction since @UsingDataSet by convention wraps your test with transaction.

                    • 8. Re: arquillian-persistence-extension problem
                      Bartosz Majsak Master

                      I'm aware that all these nitty gritty details need to be documented in our Confluence, and it is high prio task for Alpha4 release which you should expect shortly. Sorry for making it painful

                      • 9. Re: arquillian-persistence-extension problem
                        kelly goedert Apprentice

                        No problem. I am happily using it now.