[JBoss JIRA] (ARQ-1378) Inserts from test method are performed before the inserts of any data from persistence-extension
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1378?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak commented on ARQ-1378:
-------------------------------------
Is it the same with Alpha6? We extracted transaction management to dedicated extension and did quite a lot of improvements.
> Inserts from test method are performed before the inserts of any data from persistence-extension
> ------------------------------------------------------------------------------------------------
>
> Key: ARQ-1378
> URL: https://issues.jboss.org/browse/ARQ-1378
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha5
> Environment: Windows XP, JBOSS AS 7.1.1, PostgresSQL v9.2.3, using Hibernate provided as JPA and JTA
> Reporter: Cesar Ricardez
> Assignee: Bartosz Majsak
> Priority: Critical
>
> I have this code:
> ```java
> @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
> ```java
> 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]
> ```
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 9 months
[JBoss JIRA] (ARQ-1378) Inserts from test method are performed before the inserts of any data from persistence-extension
by Cesar Ricardez (JIRA)
Cesar Ricardez created ARQ-1378:
-----------------------------------
Summary: Inserts from test method are performed before the inserts of any data from persistence-extension
Key: ARQ-1378
URL: https://issues.jboss.org/browse/ARQ-1378
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Extension - Persistence
Affects Versions: persistence_1.0.0.Alpha5
Environment: Windows XP, JBOSS AS 7.1.1, PostgresSQL v9.2.3, using Hibernate provided as JPA and JTA
Reporter: Cesar Ricardez
Assignee: Bartosz Majsak
Priority: Critical
I have this code:
```java
@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
```java
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]
```
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 9 months
[JBoss JIRA] (ARQ-1376) Couldn't resolve @ArquillianResource URL with Tomcat 7 Embedded container
by Anthony O. (JIRA)
[ https://issues.jboss.org/browse/ARQ-1376?page=com.atlassian.jira.plugin.s... ]
Anthony O. updated ARQ-1376:
----------------------------
Attachment: test-project.zip
Attaching the projects to reproduce the bug.
> Couldn't resolve @ArquillianResource URL with Tomcat 7 Embedded container
> -------------------------------------------------------------------------
>
> Key: ARQ-1376
> URL: https://issues.jboss.org/browse/ARQ-1376
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Tomcat Containers
> Affects Versions: tomcat_1.0.0.CR4
> Environment: Ubuntu 12.04.2 LTS
> Reporter: Anthony O.
> Labels: ArquillianResource, URL, tomcat7
> Attachments: test-project.zip
>
>
> I'm trying to test a simple JAX-RS service (resteasy) with Tomcat 7 embedded container, and Arquillian throws me an exception when trying to resolve my {{@ArquillianResource URL}} :
> {noformat}
> java.lang.RuntimeException: Could not lookup value for field private java.net.URL com.mycompany.myapp.ws.WebServiceTest.deploymentUrl
> at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.enrich(ArquillianResourceTestEnricher.java:61)
> at org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:52)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> 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:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> 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:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> 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:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> 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.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.runChild(BlockJUnit4ClassRunner.java:76)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> 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:668)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:679)
> Caused by: java.lang.RuntimeException: Provider for type class java.net.URL returned a null value: org.jboss.arquillian.container.test.impl.enricher.resource.URLResourceProvider@56bebb88
> at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.lookup(ArquillianResourceTestEnricher.java:115)
> at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.enrich(ArquillianResourceTestEnricher.java:57)
> ... 72 more
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 9 months
[JBoss JIRA] (ARQ-1376) Couldn't resolve @ArquillianResource URL with Tomcat 7 Embedded container
by Anthony O. (JIRA)
Anthony O. created ARQ-1376:
-------------------------------
Summary: Couldn't resolve @ArquillianResource URL with Tomcat 7 Embedded container
Key: ARQ-1376
URL: https://issues.jboss.org/browse/ARQ-1376
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Tomcat Containers
Affects Versions: tomcat_1.0.0.CR4
Environment: Ubuntu 12.04.2 LTS
Reporter: Anthony O.
I'm trying to test a simple JAX-RS service (resteasy) with Tomcat 7 embedded container, and Arquillian throws me an exception when trying to resolve my {{@ArquillianResource URL}} :
{noformat}
java.lang.RuntimeException: Could not lookup value for field private java.net.URL com.mycompany.myapp.ws.WebServiceTest.deploymentUrl
at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.enrich(ArquillianResourceTestEnricher.java:61)
at org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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.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.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
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:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.RuntimeException: Provider for type class java.net.URL returned a null value: org.jboss.arquillian.container.test.impl.enricher.resource.URLResourceProvider@56bebb88
at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.lookup(ArquillianResourceTestEnricher.java:115)
at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.enrich(ArquillianResourceTestEnricher.java:57)
... 72 more
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 9 months
[JBoss JIRA] (ARQ-567) Supporting Test Suites (@ArquillianSuite)
by Bernard Labno (JIRA)
[ https://issues.jboss.org/browse/ARQ-567?page=com.atlassian.jira.plugin.sy... ]
Bernard Labno commented on ARQ-567:
-----------------------------------
Gentlemen, we've got some good news. Aslak prototyped brute force extension so that we could run all tests within single deployment.
I've polished it a bit to make it work with Drone, Graphene, JSFUnit and mock-contexts-extension.
Here is Aslak's gist: https://gist.github.com/aslakknutsen/3975179
Here is my gist: https://gist.github.com/blabno/5387599
If enough people gives their feedback we could create a regular extension out of it.
Any way, this issue is the main target of Arquillian 2.x scheduled for 2013.
> Supporting Test Suites (@ArquillianSuite)
> -----------------------------------------
>
> Key: ARQ-567
> URL: https://issues.jboss.org/browse/ARQ-567
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: Mousavi Jahan Abadi S. M.
>
> Currently, it is supported that JUnit test cases being run by Arquillian. This feature request is request for supporting test suites too to be run by Arquillian too. Idea is like:
> @RunWith(ArquillianSuite.class)
> @Suite.SuiteClasses( { TestCase1.class, TestCase2.class, .... } )
> public class AllTests{
> @Deployment
> public static JavaArchive createTestArchive(){
> return ShrinkWrap.create(JavaArchive.class,"test.jar");
> }
> }
> The advantages of above approach for users of Arquillian framework are:
> - Test cases don't needed to be modified to have: "@RunWith(Arquillian.class)" annotation. In other words, test cases will be pure JUnit code, and no Arquillian code (results in less coding for end users).
> - It is not necessary to include the static "@Deployment" methods in all test cases any more, and only Test Suite need to define the archieving/deployment related setting/definitions.
> The advantage of above approach for framework itself is:
> - From performance point-of-view, it becomes possible for Arquillian to deploy all test cases in the Test Suite into J2EE container in one action (one deploy/undeploy for one test suite, instead of mulitple deploy/undeploy for each test case).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 9 months
[JBoss JIRA] (ARQ-567) Supporting Test Suites (@ArquillianSuite)
by SBS JIRA Integration (JIRA)
[ https://issues.jboss.org/browse/ARQ-567?page=com.atlassian.jira.plugin.sy... ]
SBS JIRA Integration updated ARQ-567:
-------------------------------------
Forum Reference: https://community.jboss.org/message/623066#623066, http://community.jboss.org/message/623066#623066 (was: http://community.jboss.org/message/623066#623066)
> Supporting Test Suites (@ArquillianSuite)
> -----------------------------------------
>
> Key: ARQ-567
> URL: https://issues.jboss.org/browse/ARQ-567
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: Mousavi Jahan Abadi S. M.
>
> Currently, it is supported that JUnit test cases being run by Arquillian. This feature request is request for supporting test suites too to be run by Arquillian too. Idea is like:
> @RunWith(ArquillianSuite.class)
> @Suite.SuiteClasses( { TestCase1.class, TestCase2.class, .... } )
> public class AllTests{
> @Deployment
> public static JavaArchive createTestArchive(){
> return ShrinkWrap.create(JavaArchive.class,"test.jar");
> }
> }
> The advantages of above approach for users of Arquillian framework are:
> - Test cases don't needed to be modified to have: "@RunWith(Arquillian.class)" annotation. In other words, test cases will be pure JUnit code, and no Arquillian code (results in less coding for end users).
> - It is not necessary to include the static "@Deployment" methods in all test cases any more, and only Test Suite need to define the archieving/deployment related setting/definitions.
> The advantage of above approach for framework itself is:
> - From performance point-of-view, it becomes possible for Arquillian to deploy all test cases in the Test Suite into J2EE container in one action (one deploy/undeploy for one test suite, instead of mulitple deploy/undeploy for each test case).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 9 months