1 Reply Latest reply on Aug 10, 2012 9:23 AM by Bartosz Majsak

    Cannot configure dataSeedStrategy through arquillian.xml

    Bernard Labno Master

      {code:xml}

      <?xml version="1.0" encoding="UTF-8"?>

      <arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/schema/arquillian" xsi:schemaLocation="http://jboss.org/schema/arquillian

                               http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

       

          <defaultProtocol type="Servlet 3.0"/>

       

          <engine>

              <property name="deploymentExportPath">target/</property>

              <property name="maxTestClassesBeforeRestart">1</property>

          </engine>

       

          <extension qualifier="persistence">

              <property name="defaultDataSource">${pu.jta.data.source}</property>

              <property name="initStatement">scripts/disableConstraints.sql</property>

              <property name="cleanupStatement">scripts/enableConstraints.sql</property>

              <property name="dumpData">true</property>

              <property name="userTransactionJndi">java:jboss/UserTransaction</property>

              <property name="alwaysExcludeFromDataSetsComparision">id</property>

          </extension>

       

          <extension qualifier="persistence-dbunit">

              <property name="dataSeedStrategy">CLEAN_INSERT</property>

          </extension>

       

      </arquillian>{code:xml}

      org.jboss.arquillian.persistence.exception.PersistenceExtensionInitializationException: Unable to create persistence configuration.

          at org.jboss.arquillian.persistence.configuration.ConfigurationImporter.createConfiguration(ConfigurationImporter.java:144)

          at org.jboss.arquillian.persistence.configuration.ConfigurationImporter.loadFrom(ConfigurationImporter.java:66)

          at org.jboss.arquillian.persistence.configuration.ConfigurationProducer.configureFromArquillianDescriptor(ConfigurationProducer.java:39)

          at org.jboss.arquillian.persistence.data.dbunit.configuration.DBUnitConfigurationClientSideProducer.observe(DBUnitConfigurationClientSideProducer.java:49)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          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.createSuiteContext(TestContextHandler.java:60)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at 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:135)

          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

          at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)

          at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:97)

          at org.junit.runners.Suite.runChild(Suite.java:128)

          at org.junit.runners.Suite.runChild(Suite.java:24)

          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.junit.runners.ParentRunner.run(ParentRunner.java:236)

          at org.junit.runner.JUnitCore.run(JUnitCore.java:157)

          at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)

      Caused by: java.lang.IllegalArgumentException: Unable to convert value [CLEAN_INSERT] to a class [org.jboss.arquillian.persistence.data.dbunit.configuration.DataSeedStrategy].

          at org.jboss.arquillian.persistence.configuration.ConfigurationTypeConverter.convert(ConfigurationTypeConverter.java:187)

          at org.jboss.arquillian.persistence.configuration.ConfigurationImporter.createConfiguration(ConfigurationImporter.java:135)

          ... 33 more

      Caused by: java.lang.ClassNotFoundException: CLEAN_INSERT

          at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

          at java.security.AccessController.doPrivileged(Native Method)

          at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

          at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

          at java.lang.Class.forName0(Native Method)

          at java.lang.Class.forName(Class.java:169)

          at org.jboss.arquillian.persistence.configuration.ConfigurationTypeConverter.convert(ConfigurationTypeConverter.java:182)

          ... 34 more