[JBoss JIRA] (ARQ-1883) Arquillian Persistence Extension: Cucumber integration
by Rafael Pestano (JIRA)
[ https://issues.jboss.org/browse/ARQ-1883?page=com.atlassian.jira.plugin.s... ]
Rafael Pestano commented on ARQ-1883:
-------------------------------------
ok, fixed the "Can't find a persistence unit" problem.
Now the first step runs ok but i receive the error below on the [second step|https://github.com/rmpestano/arquillian-extension-persistence/blob/m...] is faling the error below:
{noformat}
org.jboss.arquillian.persistence.dbunit.exception.DBUnitDataSetHandlingException: Unable to clean database.
at org.jboss.arquillian.persistence.dbunit.cleanup.StrictCleanupStrategyExecutor.cleanupDatabase(StrictCleanupStrategyExecutor.java:60)
at org.jboss.arquillian.persistence.dbunit.DBUnitDataHandler.cleanDatabase(DBUnitDataHandler.java:184)
at org.jboss.arquillian.persistence.dbunit.DBUnitDataHandler.cleanup(DBUnitDataHandler.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at org.jboss.arquillian.persistence.dbunit.DBUnitDataStateLogger.aroundCleanup(DBUnitDataStateLogger.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
...
...
Caused by: java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.jca.adapters.jdbc.jdk7.WrappedConnectionJDK7@1bc5bf4a
at org.jboss.jca.adapters.jdbc.WrappedConnection.lock(WrappedConnection.java:155)
at org.jboss.jca.adapters.jdbc.WrappedConnection.createStatement(WrappedConnection.java:296)
at org.dbunit.database.statement.AbstractBatchStatement.<init>(AbstractBatchStatement.java:50)
at org.dbunit.database.statement.SimpleStatement.<init>(SimpleStatement.java:49)
at org.dbunit.database.statement.PreparedStatementFactory.createBatchStatement(PreparedStatementFactory.java:57)
at org.dbunit.operation.DeleteAllOperation.execute(DeleteAllOperation.java:85)
at org.jboss.arquillian.persistence.dbunit.cleanup.StrictCleanupStrategyExecutor.cleanupDatabase(StrictCleanupStrategyExecutor.java:56)
... 218 more
{noformat}
> Arquillian Persistence Extension: Cucumber integration
> ------------------------------------------------------
>
> Key: ARQ-1883
> URL: https://issues.jboss.org/browse/ARQ-1883
> Project: Arquillian
> Issue Type: Feature Request
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha7
> Reporter: Rafael Pestano
> Assignee: Bartosz Majsak
>
> Currently we cannot use persistence extension in a Cucumber test.
> Cukespace extension added events that other extensions can observe in order to e.g.: do something before a step.
> see this issue for more details: https://github.com/cukespace/cukespace/issues/37
> Also there this blog post which details the limitations of using both extensions: http://rpestano.wordpress.com/2014/11/08/arquillian-cucumber-dbunit/
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 8 months
[JBoss JIRA] (ARQ-1883) Arquillian Persistence Extension: Cucumber integration
by Rafael Pestano (JIRA)
[ https://issues.jboss.org/browse/ARQ-1883?page=com.atlassian.jira.plugin.s... ]
Rafael Pestano commented on ARQ-1883:
-------------------------------------
I've also tried to setup an example in persistense-extension project ([see here|https://github.com/rmpestano/arquillian-extension-persistence/blob/m...]) but its failing (i think its a detail) because persistence unit is not found.
I've changed the deployment from *jar* to *war* cause i think cukespace doesn't work in jar project (in fact I didnt tried to flat the jar so changed to war) but the [@PersistenceContext inside test|https://github.com/rmpestano/arquillian-extension-persistence/blob/m...] isn't working, here is test output:
{noformat}
org.jboss.arquillian.container.spi.client.container.DeploymentException: Cannot deploy: test.war
at org.jboss.as.arquillian.container.ArchiveDeployer.deployInternal(ArchiveDeployer.java:83)
at org.jboss.as.arquillian.container.ArchiveDeployer.deployInternal(ArchiveDeployer.java:64)
at org.jboss.as.arquillian.container.ArchiveDeployer.deploy(ArchiveDeployer.java:46)
at org.jboss.as.arquillian.container.CommonDeployableContainer.deploy(CommonDeployableContainer.java:146)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:86)
at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:199)
at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:377)
at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:52)
at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:216)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:164)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
Caused by: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"test.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"test.war\".WeldStartService: Failed to start service
Caused by: java.lang.IllegalArgumentException: JBAS016069: Error injecting persistence unit into CDI managed bean. Can't find a persistence unit named test in deployment test.war"}}
at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getActionResult(ServerDeploymentPlanResultFuture.java:134)
at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getResultFromNode(ServerDeploymentPlanResultFuture.java:123)
at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:85)
at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:42)
at org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper.deploy(ServerDeploymentHelper.java:55)
at org.jboss.as.arquillian.container.ArchiveDeployer.deployInternal(ArchiveDeployer.java:77)
... 88 more
{noformat}
I think it would be nice to have this test inside persistence-extension project to assure the integration will work with the project evolution
> Arquillian Persistence Extension: Cucumber integration
> ------------------------------------------------------
>
> Key: ARQ-1883
> URL: https://issues.jboss.org/browse/ARQ-1883
> Project: Arquillian
> Issue Type: Feature Request
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha7
> Reporter: Rafael Pestano
> Assignee: Bartosz Majsak
>
> Currently we cannot use persistence extension in a Cucumber test.
> Cukespace extension added events that other extensions can observe in order to e.g.: do something before a step.
> see this issue for more details: https://github.com/cukespace/cukespace/issues/37
> Also there this blog post which details the limitations of using both extensions: http://rpestano.wordpress.com/2014/11/08/arquillian-cucumber-dbunit/
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
9 years, 8 months