Arquillian
  1. Arquillian
  2. ARQ-901

NPE when using @Cleanup(strategy=CleanupStrategy.USED_ROWS_ONLY)

    Details

    • Similar Issues:
      Show 10 results 

      Description

      NPE when using @Cleanup(strategy=CleanupStrategy.USED_ROWS_ONLY) with arquillian-persistence-impl 1.0.0.Alpha4.

      My Test class is annotated like this :

      @RunWith(Arquillian.class)
      @Transactional(TransactionMode.ROLLBACK)
      @Cleanup(strategy=CleanupStrategy.USED_ROWS_ONLY)
      @UsingDataSet("charge-clientele.yml")
      public class ChargeClienteleManagerTest {
      

      StackTrace :

      Caused by: org.jboss.arquillian.persistence.data.dbunit.exception.DBUnitDataSetHandlingException: Unable to clean database.
      	at org.jboss.arquillian.persistence.data.dbunit.cleanup.SeededDataOnlyCleanupStrategyExecutor.cleanupDatabase(SeededDataOnlyCleanupStrategyExecutor.java:51)
      	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 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.persistence.data.dbunit.DBUnitDataStateLogger.aroundCleanup(DBUnitDataStateLogger.java:108)
      	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.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: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 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: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 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.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 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: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)
      

        Activity

        Hide
        Bartosz Majsak
        added a comment -

        Thx for reporting an issue. Is it whole stack trace you are getting? How does your test class and arquillian.xml look like?
        Would it be possible to isolate this problem and share it as a simple project so I can easily reproduce and analyze?

        Show
        Bartosz Majsak
        added a comment - Thx for reporting an issue. Is it whole stack trace you are getting? How does your test class and arquillian.xml look like? Would it be possible to isolate this problem and share it as a simple project so I can easily reproduce and analyze?
        Hide
        Dupont Dupont
        added a comment -

        maven project testcase, stacktrace included

        Show
        Dupont Dupont
        added a comment - maven project testcase, stacktrace included
        Hide
        Dupont Dupont
        added a comment -

        Thanks Bartosz, here's a standalone testcase.

        You'll need to use JBoss 7.1 and bossas-remote-7 profile.

        You'll find in the attachement jboss-stacktrace.txt and junit-stacktrace.txt.

        Show
        Dupont Dupont
        added a comment - Thanks Bartosz, here's a standalone testcase. You'll need to use JBoss 7.1 and bossas-remote-7 profile. You'll find in the attachement jboss-stacktrace.txt and junit-stacktrace.txt.
        Hide
        Bartosz Majsak
        added a comment -

        Thank you, I will have a look at it soon!

        Show
        Bartosz Majsak
        added a comment - Thank you, I will have a look at it soon!
        Hide
        Bartosz Majsak
        added a comment -
        Show
        Bartosz Majsak
        added a comment - Pushed upstream .

          People

          • Assignee:
            Bartosz Majsak
            Reporter:
            Dupont Dupont
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: