[arquillian-issues] [JBoss JIRA] (ARQ-1883) Arquillian Persistence Extension: Cucumber integration
Rafael Pestano (JIRA)
issues at jboss.org
Fri May 1 11:29:46 EDT 2015
[ https://issues.jboss.org/browse/ARQ-1883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064694#comment-13064694 ]
Rafael Pestano edited comment on ARQ-1883 at 5/1/15 11:29 AM:
--------------------------------------------------------------
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/master/int-tests/src/test/java/org/jboss/arquillian/integration/persistence/cucumber/SeedingStrategyTest.java#L68] is failing 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 at 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}
was (Author: kwintesencja):
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/master/int-tests/src/test/java/org/jboss/arquillian/integration/persistence/cucumber/SeedingStrategyTest.java#L68] 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 at 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)
More information about the arquillian-issues
mailing list