2 Replies Latest reply on Nov 16, 2015 1:18 PM by Bartosz Majsak

    Arquillian persistence extension seed database using custom script error with StatementSplitter for specified dialect oracle

    Zafiu Andrei Newbie

      Hello and thank you for your time in reading this question.

       

      I have tried arquillian with some data seeding using yml files and the tests work. However, when trying to seed the database with a custom sql script I get the following error stacktrace:

       

      ERROR [org.jboss.arquillian.protocol.jmx.JMXTestRunner] (pool-4-thread-15) Failed: testGetAllClients_shouldReturnMoreThanOne: java.lang.IllegalStateException: Unresolvable implementation of org.jboss.arquillian.persistence.spi.script.StatementSplitter for specified dialect oracle

        at org.jboss.arquillian.persistence.script.splitter.StatementSplitterResolver.resolve(StatementSplitterResolver.java:57) [arquillian-service:]

        at org.jboss.arquillian.persistence.dbunit.DBUnitDataHandler.executeScript(DBUnitDataHandler.java:147) [arquillian-service:]

        at org.jboss.arquillian.persistence.dbunit.DBUnitDataHandler.executeScripts(DBUnitDataHandler.java:137) [arquillian-service:]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [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.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.DataScriptsHandler.executeCustomScriptsBefore(DataScriptsHandler.java:66) [arquillian-service:]

        at org.jboss.arquillian.persistence.core.lifecycle.DataScriptsHandler.executeBeforeTest(DataScriptsHandler.java:47) [arquillian-service:]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [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.persistence.dbunit.DBUnitDataStateLogger.beforePersistenceTest(DBUnitDataStateLogger.java:98) [arquillian-service:]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [arquillian-service:]

        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]

        at org.jboss.arquillian.persistence.core.lifecycle.SchemaCreationScriptsExecutor.createSchema(SchemaCreationScriptsExecutor.java:68) [arquillian-service:]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [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:102) [arquillian-service:]

        at sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source) [:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [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:84) [arquillian-service:]

        at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source) [:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [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:65) [arquillian-service:]

        at sun.reflect.GeneratedMethodAccessor174.invoke(Unknown Source) [:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [arquillian-service:]

        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]

        at org.jboss.arquillian.persistence.dbunit.DBUnitPersistenceTestLifecycleHandler.createDatasets(DBUnitPersistenceTestLifecycleHandler.java:116) [arquillian-service:]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [arquillian-service:]

        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]

        at org.jboss.arquillian.persistence.core.lifecycle.ErrorCollectorHandler.createErrorCollector(ErrorCollectorHandler.java:38) [arquillian-service:]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [arquillian-service:]

        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]

        at org.jboss.arquillian.persistence.dbunit.DBUnitPersistenceTestLifecycleHandler.provideDatabaseConnectionAroundBeforePersistenceTest(DBUnitPersistenceTestLifecycleHandler.java:85) [arquillian-service:]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [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.beforeTest(PersistenceTestTrigger.java:113) [arquillian-service:]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [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:102) [arquillian-service:]

        at sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source) [:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [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:84) [arquillian-service:]

        at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source) [:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [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:65) [arquillian-service:]

        at sun.reflect.GeneratedMethodAccessor174.invoke(Unknown Source) [:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) [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.before(EventTestRunnerAdaptor.java:95) [arquillian-service:]

        at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:222) [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:271) [arquillian-service:]

        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) [arquillian-service:]

        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) [arquillian-service:]

        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) [arquillian-service:]

        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) [arquillian-service:]

        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) [arquillian-service:]

        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) [arquillian-service:]

        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) [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:309) [arquillian-service:]

        at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147) [arquillian-service:]

        at org.junit.runner.JUnitCore.run(JUnitCore.java:160) [arquillian-service:]

        at org.junit.runner.JUnitCore.run(JUnitCore.java:138) [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_45]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75) [rt.jar:1.7.0_45]

        at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source) [:1.7.0_45]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]

        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]

        at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279) [rt.jar:1.7.0_45]

        at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) [rt.jar:1.7.0_45]

        at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) [rt.jar:1.7.0_45]

        at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) [rt.jar:1.7.0_45]

        at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) [rt.jar:1.7.0_45]

        at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) [rt.jar:1.7.0_45]

        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [rt.jar:1.7.0_45]

        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [rt.jar:1.7.0_45]

        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:1145) [rt.jar:1.7.0_45]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

       

      The setup on which I am working is the following: JBoss AS 7.1.1 server, Arquillian 1.1.3 Final, Arquillian-persistence version 1.0.0Alpha7.

       

      My arquillian.xml file is this:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <arquillian xmlns="http://jboss.org/schema/arquillian"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
      
          <extension qualifier="persistence">  
         <property name="defaultCleanupPhase">BEFORE</property>  
         <property name="defaultCleanupStrategy">USED_TABLES_ONLY</property>  
        </extension> 
         
        <extension qualifier="persistence-dbunit">       
           <property name="excludeTablesFromCleanup">hibernate_sequence</property>
           <property name="excludeTablesFromComparisonWhenEmptyExpected">hibernate_sequence</property>       
         </extension>
      
        <extension qualifier="persistence-script">
           <property name="sqlDialect">oracle</property>     
         </extension>
      </arquillian>
      

       

      The following test fails with the error specified in the begining of this post:

       

          @Test
        @ApplyScriptBefore("db_all.sql")
        public void testGetAllClients_shouldReturnMoreThanOne() {
        
        }
      

       

      The "db_all.sql" script is an export of an oracle database with instructions delimited by ";".

       

      If you need more information regarding the setup i will be happy to provide you the additional information. Thank you.