2 Replies Latest reply on Aug 29, 2013 6:56 AM by Bartosz Majsak

    sql import script executes incorrectly between '/' characters

    Akshay Viswanathan Newbie


      I'm using Arquillian with JBOSS AS7, and I am performing datasbase tests.

      Before the test class, I have added the annotation: @ApplyScriptBefore to run my custom SQL script


      I am using a local MySQL instance as a database, and have included the relevant driver.


      Everything works fine until I try to insert values into one of the tables from the sql script.

      If i try to insert a URLs, eg:

      insert into DocumentURL (id,documentUrl) values (1,'http://www.mysql.com/yyy');

      insert into DocumentURL (id,documentUrl) values (2,'http://www.mysql.com/zzz');

      insert into DocumentURL (id,documentUrl) values (3,'http://www.mysql.com/aaa');

      insert into DocumentURL (id,documentUrl) values (4,'http://www.mysql.com/bbb');


      all data between two consecutive '/' signs is lost.

      So if I check in the database, I get:

      select * from DocumentURL;


      | id | documentUrl               |


      |  1 | http:www.mysql.comzzz |

      |  3 | http:www.mysql.combbb |



      Is this a problem with my arquillian.xml configuration?

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

      <arquillian xmlns="http://jboss.org/schema/arquillian"






          <container qualifier="jboss" default="true">




                  <property name="jbossHome">/path/to/jboss</property>



          <extension qualifier="persistence">

              <property name="scriptsToExecuteBeforeTest">SET FOREIGN_KEY_CHECKS=0;</property>

              <property name="scriptsToExecuteAfterTest">SET FOREIGN_KEY_CHECKS=1;</property>

              <property name="sqlStatementDelimiter">;</property>







      I'm using arquillian-persistence-api version 1.0.0.Alpha6