14 Replies Latest reply: Jan 14, 2013 12:36 PM by Bernard Labno RSS

    ExclusiveTransactionException

    Bernard Labno Master

      Bartosz, have you come accross such exception?

       

      org.jboss.arquillian.persistence.data.dbunit.exception.DBUnitDataSetHandlingException: Unable to clean database.

          at org.jboss.arquillian.persistence.data.dbunit.cleanup.StrictCleanupStrategyExecutor.cleanupDatabase(StrictCleanupStrategyExecutor.java:46)

          at org.jboss.arquillian.persistence.data.dbunit.DBUnitDataHandler.cleanDatabase(DBUnitDataHandler.java:190)

          at org.jboss.arquillian.persistence.data.dbunit.DBUnitDataHandler.cleanup(DBUnitDataHandler.java:122)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

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

          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.persistence.data.dbunit.DBUnitDataStateLogger.aroundCleanup(DBUnitDataStateLogger.java:113)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

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

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

          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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

          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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

          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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

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

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

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

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

          at org.jboss.arquillian.persistence.lifecycle.DataCleanupHandler.prepareDatabase(DataCleanupHandler.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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

          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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

          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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

          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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

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

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

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

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

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

          at org.jboss.arquillian.persistence.lifecycle.ErrorCollectorHandler.createErrorCollector(ErrorCollectorHandler.java:38)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

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

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

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

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

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

          at org.jboss.arquillian.persistence.lifecycle.PersistenceTestTrigger.beforeTest(PersistenceTestTrigger.java:91)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

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

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

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

          at pl.com.it_crowd.arquillian.mock_contexts.MockContextsManager.startFacesContext(MockContextsManager.java:71)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

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

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

          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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

          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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

          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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

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

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

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

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

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

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

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

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

          at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)

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

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

          at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)

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

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

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

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

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

          at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

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

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

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

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

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

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

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

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

      Caused by: org.dbunit.operation.ExclusiveTransactionException

          at org.dbunit.operation.TransactionOperation.execute(TransactionOperation.java:72)

          at org.jboss.arquillian.persistence.data.dbunit.cleanup.StrictCleanupStrategyExecutor.cleanupDatabase(StrictCleanupStrategyExecutor.java:42)

          ... 175 more

       

       

      My arquillian.xml:

       

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

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

       

          <defaultProtocol type="Servlet 3.0"/>

       

          <engine>

              <property name="deploymentExportPath">target/</property>

              <property name="maxTestClassesBeforeRestart">1</property>

          </engine>

       

          <extension qualifier="persistence">

              <property name="defaultDataSource">${pu.jta.data.source}</property>

              <property name="initStatement">scripts/disableConstraints.sql</property>

              <property name="cleanupStatement">scripts/enableConstraints.sql</property>

              <property name="dumpData">true</property>

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

              <property name="alwaysExcludeFromDataSetsComparision">id</property>

          </extension>

       

          <extension qualifier="persistence-dbunit">

              <!--TODO Not working at the moment-->

              <!--<property name="dataSeedStrategy">CLEAN_INSERT</property>-->

          </extension>

       

      </arquillian>