Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datasets are inserting to database always after any insert from test method #31

Open
xiumeteo opened this issue Apr 15, 2013 · 2 comments

Comments

@xiumeteo
Copy link

I have this code:

@UsingDataSet( "applications_populate.yml" )
 @Cleanup( phase = TestExecutionPhase.NONE )
    @Test()
    public void testpersistWithaApplyScriptBefore() throws Exception {



        App app = new App();
        app.setAppName("prueba");
        app.setDescription("prueba");
        app.setCreatedAt(new Date());
        app.setModifiedAt(new Date());        


        //transaction.begin();

        manager.persist(app);

        //ansaction.commit();
       // manager.clear();


    }

In this way i used the same transaction used by the extension to insert entities in my db, because if i create another transaction the ARJUNA016051: thread is already associated with a transaction! appears.
So, i was performing some test for a while and discover that everytime i execute any test that use the same transaction that APE( arquillian-persistence-extension ), the entity is persist first and the datasets after. So i'm wonder why this happen and the most importatn how can avoid it?

Greets
César

UPDATE-------------------
Here the trace from server

09:31:42,145 DEBUG [org.jboss.as.jpa] (pool-5-thread-10) pool-5-thread-10:[transaction scoped EntityManager]: created entity manager session TransactionImple < ac, BasicAction: 0:ffffac10441a:-501d5bf2:516ea394:103 status: ActionStatus.RUNNING >
09:31:42,145 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.registerInterposedSynchronization
09:31:42,145 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,145 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.putResource
09:31:42,145 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) BaseTransaction.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [org.jboss.as.jpa] (pool-5-thread-10) persist entityClass 'com.donde.am.entities.App' took 16ms
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) BaseTransaction.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) BaseTransaction.commit
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.commitAndDisassociate
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) SynchronizationImple.beforeCompletion
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) BaseTransaction.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.getTransactionKey
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.getTransactionKey
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.getResource
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.getTransactionKey
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.getResource
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.putResource
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.getResource
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.getTransactionKey
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.getResource
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.getResource
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.putResource
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) BaseTransaction.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,161 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionSynchronizationRegistryImple.registerInterposedSynchronization
09:31:42,177 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,177 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.enlistResource ( LocalXAResourceImpl@13eca4e[connectionListener=140f3b0 connectionManager=1d73a72 warned=false currentXid=null] )
09:31:42,177 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,177 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) StateManager::StateManager( 0:0:0:0:1 )
09:31:42,177 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) AbstractRecord::AbstractRecord (0:0:0:0:1)
09:31:42,177 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) LastResourceRecord()
09:31:42,177 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) RecordList::insert(RecordList: empty) : appending /StateManager/AbstractRecord/LastResourceRecord for 0:0:0:0:1
09:31:42,177 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (pool-5-thread-10) SQL Error: 0, SQLState: 23505
09:31:42,177 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (pool-5-thread-10) ERROR: llave duplicada viola restricción de unicidad «applications_pkey»
  Detail: Ya existe la llave (appname)=(prueba).
09:31:42,177 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) BaseTransaction.setRollbackOnly
09:31:42,177 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.setRollbackOnly
09:31:42,177 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) BasicAction::preventCommit( BasicAction: 0:ffffac10441a:-501d5bf2:516ea394:103 status: ActionStatus.RUNNING)
09:31:42,177 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) BaseTransaction.getStatus
09:31:42,177 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,177 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) BaseTransaction.setRollbackOnly
09:31:42,177 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.setRollbackOnly
09:31:42,177 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) BasicAction::preventCommit( BasicAction: 0:ffffac10441a:-501d5bf2:516ea394:103 status: ActionStatus.ABORT_ONLY)
09:31:42,177 WARN  [com.arjuna.ats.arjuna] (pool-5-thread-10) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffffac10441a:-501d5bf2:516ea394:104, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization@9104b3 >: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: ERROR: llave duplicada viola restricción de unicidad «applications_pkey»
  Detail: Ya existe la llave (appname)=(prueba).
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1361) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1295) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1481) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)
    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
    at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:167)
    at org.jboss.arquillian.persistence.core.transaction.TestTransactionWrapper.afterTest(TestTransactionWrapper.java:70) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) [arquillian-service:]
    at org.jboss.arquillian.persistence.core.lifecycle.TransactionHandler.endTransactionAfterTest(TransactionHandler.java:54) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.persistence.dbunit.DBUnitPersistenceTestLifecycleHandler.closeConnection(DBUnitPersistenceTestLifecycleHandler.java:113) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.persistence.core.lifecycle.ErrorCollectorHandler.collectErrors(ErrorCollectorHandler.java:46) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) [arquillian-service:]
    at org.jboss.arquillian.persistence.core.lifecycle.PersistenceTestTrigger.afterTest(PersistenceTestTrigger.java:113) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
    at org.jboss.arquillian.testenricher.cdi.CreationalContextDestroyer.destory(CreationalContextDestroyer.java:44) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115) [arquillian-service:]
    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.after(EventTestRunnerAdaptor.java:103) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:245) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240) [arquillian-service:]
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) [arquillian-service:]
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) [arquillian-service:]
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) [arquillian-service:]
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) [arquillian-service:]
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) [arquillian-service:]
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199) [arquillian-service:]
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136) [arquillian-service:]
    at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:128) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:107) [arquillian-service:]
    at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:226) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:111) [rt.jar:1.7.0_09]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:45) [rt.jar:1.7.0_09]
    at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:235) [rt.jar:1.7.0_09]
    at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) [rt.jar:1.7.0_09]
    at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:250) [rt.jar:1.7.0_09]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [rt.jar:1.7.0_09]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791) [rt.jar:1.7.0_09]
    at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:498)
    at org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:246)
    at org.jboss.remotingjmx.protocol.v1.ServerProxy$InvokeHandler.handle(ServerProxy.java:1034)
    at org.jboss.remotingjmx.protocol.v1.ServerProxy$MessageReciever$1.run(ServerProxy.java:215)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]
    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]
Caused by: org.hibernate.exception.ConstraintViolationException: ERROR: llave duplicada viola restricción de unicidad «applications_pkey»
  Detail: Ya existe la llave (appname)=(prueba).
    at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:128) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at $Proxy52.executeUpdate(Unknown Source)   at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:56) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2849) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3290) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:80) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:272) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:264) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:186) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1081) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:315) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    ... 168 more
Caused by: org.postgresql.util.PSQLException: ERROR: llave duplicada viola restricción de unicidad «applications_pkey»
  Detail: Ya existe la llave (appname)=(prueba).
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2101)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1834)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:510)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:332)
    at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:115)
    at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
    ... 182 more

09:31:42,286 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) BasicAction::preventCommit( BasicAction: 0:ffffac10441a:-501d5bf2:516ea394:103 status: ActionStatus.ABORT_ONLY)
09:31:42,286 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) BasicAction::Abort() for action-id 0:ffffac10441a:-501d5bf2:516ea394:103
09:31:42,286 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) BasicAction::doAbort (LastResourceRecord(XAOnePhaseResource(LocalXAResourceImpl@13eca4e[connectionListener=140f3b0 connectionManager=1d73a72 warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffac10441a:-501d5bf2:516ea394:103, node_name=1, branch_uid=0:ffffac10441a:-501d5bf2:516ea394:107, subordinatenodename=null, eis_name=unknown eis name >])))
09:31:42,286 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) LastResourceRecord::topLevelAbort() for 0:0:0:0:1
09:31:42,286 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) SynchronizationImple.afterCompletion
09:31:42,286 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) SynchronizationImple.afterCompletion
09:31:42,286 DEBUG [org.jboss.as.jpa] (pool-5-thread-10) pool-5-thread-10:[transaction scoped EntityManager]: closing entity managersession
09:31:42,286 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) BaseTransaction.getStatus
09:31:42,286 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) TransactionImple.getStatus
09:31:42,286 INFO  [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] (pool-5-thread-10) HHH000010: On release of batch it still contained JDBC statements
09:31:42,286 TRACE [com.arjuna.ats.jta] (pool-5-thread-10) SynchronizationImple.afterCompletion
09:31:42,286 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) BasicAction::removeChildThread () action 0:ffffac10441a:-501d5bf2:516ea394:103 removing TSThread:9
09:31:42,286 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) BasicAction::removeChildThread () action 0:ffffac10441a:-501d5bf2:516ea394:103 removing TSThread:9 result = true
09:31:42,286 TRACE [com.arjuna.ats.arjuna] (pool-5-thread-10) TransactionReaper::remove ( BasicAction: 0:ffffac10441a:-501d5bf2:516ea394:103 status: ActionStatus.ABORTED )
09:31:42,286 ERROR [org.jboss.arquillian.protocol.jmx.JMXTestRunner] (pool-5-thread-10) Failed: com.donde.am.entities.AppTestIssue6.testpersistWithaUsingDataSet: java.lang.AssertionError: Expected exception: javax.transaction.RollbackException
    at org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:35) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240) [arquillian-service:]
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) [arquillian-service:]
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) [arquillian-service:]
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) [arquillian-service:]
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) [arquillian-service:]
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) [arquillian-service:]
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199) [arquillian-service:]
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136) [arquillian-service:]
    at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:128) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:107) [arquillian-service:]
    at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:226) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
    at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:111) [rt.jar:1.7.0_09]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:45) [rt.jar:1.7.0_09]
    at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:235) [rt.jar:1.7.0_09]
    at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) [rt.jar:1.7.0_09]
    at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:250) [rt.jar:1.7.0_09]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [rt.jar:1.7.0_09]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791) [rt.jar:1.7.0_09]
    at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:498)
    at org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:246)
    at org.jboss.remotingjmx.protocol.v1.ServerProxy$InvokeHandler.handle(ServerProxy.java:1034)
    at org.jboss.remotingjmx.protocol.v1.ServerProxy$MessageReciever$1.run(ServerProxy.java:215)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]
    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]
@bartoszmajsak
Copy link
Member

Hi, sorry for laaaaaate response. Does it still affect you with the latest version? Can you make a Gist or Github project out of it and report in JIRA?

@bartoszmajsak
Copy link
Member

Are you still facing the problem? Otherwise I would like to close this issue if the new version is not having mentioned problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants