Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-23985

Error in SQL syntax when running tests with mariadb

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 8.0.0.Beta-DR3
    • EJB
    • None
    • False
    • None
    • False
    • Hide

      Prepare server with these commands

      bin/jboss-cli.sh -c --command="/subsystem=ejb3/service=timer-service/database-data-store=database:add(datasource-jndi-name=\"java:jboss/datasources/ExampleDS\")"
      
      bin/jboss-cli.sh -c --command='/subsystem=ejb3/service=timer-service:write-attribute(name=default-data-store,value=database)' 

      Add profile from pom-extension.pom (attachment of the issue) at the end of testsuite/pom.xml 

      Download mariadb-java-client-2.7.2.jar and ds.xml from this issue.

      Change directory to testsuite and run 

      mvn install -B -Dmaven.exec.skip -Dexec.skip -Dmaven.repo.local=<path to local repo> -fae -Dmaven.test.failure.ignore=true \
      -Djboss.dist=<path to jboss server dir> -Ddisable.microprofile.tests -Dts.basic -pl integration/basic -am \
      -Dds.replace.driver.dir=<path where driver jar is located> -Dds.replace.driver.jar=mariadb-java-client-2.7.2.jar -Dds.replace.datasource.file=<path to ds.xml> -Dds.replace \
      -Dtest=org/jboss/as/test/integration/ejb/timerservice/**/*.java

      In maven command is need to adjust -Dmaven.repo.local , -Djboss.dist , -Dds.replace.driver.dir , -Dds.replace.datasource.file

      Whit this the test are some test expected to fail (in ejb/timerservice/database and ejb/timerservice/persistence/legacy). For delete them use this:

      rm -rvf testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/timerservice/database
      
      rm -rvf testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/timerservice/persistence/legacy/ 
      Show
      Prepare server with these commands bin/jboss-cli.sh -c --command= "/subsystem=ejb3/service=timer-service/database-data-store=database:add(datasource-jndi-name=\" java:jboss/datasources/ExampleDS\ ")" bin/jboss-cli.sh -c --command= '/subsystem=ejb3/service=timer-service:write-attribute(name= default -data-store,value=database)' Add profile from pom-extension.pom (attachment of the issue) at the end of testsuite/pom.xml  Download mariadb-java-client-2.7.2.jar and ds.xml from this issue. Change directory to testsuite and run  mvn install -B -Dmaven.exec.skip -Dexec.skip -Dmaven.repo.local=<path to local repo> -fae -Dmaven.test.failure.ignore= true \ -Djboss.dist=<path to jboss server dir> -Ddisable.microprofile.tests -Dts.basic -pl integration/basic -am \ -Dds.replace.driver.dir=<path where driver jar is located> -Dds.replace.driver.jar=mariadb-java-client-2.7.2.jar -Dds.replace.datasource.file=<path to ds.xml> -Dds.replace \ -Dtest=org/jboss/as/test/integration/ejb/timerservice /**/ *.java In maven command is need to adjust -Dmaven.repo.local , -Djboss.dist , -Dds.replace.driver.dir , -Dds.replace.datasource.file Whit this the test are some test expected to fail (in ejb/timerservice/database and ejb/timerservice/persistence/legacy). For delete them use this: rm -rvf testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/timerservice/database rm -rvf testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/ejb/timerservice/persistence/legacy/

    Description

      When running basic integration tests for ejb timeservice with mariadb, three test fail with this error:

      Cannot deploy testSchedule.war: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"testSchedule.war\".component.SimpleSchedulesBean.START" => "java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: (conn=658153) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE NOT EXISTS (SELECT 1 FROM JBOSS_EJB_TIMER WHERE TIMED_OBJECT_ID='testSc...' at line 1 

      Tried run it with other supported database and there was no problem. 
      These three tests are 

      • ActiveTimerServiceCountTestCase
      • SimpleScheduleFirstTestCase
      • SimpleScheduleSecondTestCase

      Steps to reproduce it is in reproducer.

      Attachments

        1. ds.xml
          0.4 kB
        2. mariadb-java-client-2.7.2.jar
          618 kB
        3. pom-extension.xml
          4 kB

        Activity

          People

            mpetrov@redhat.com Michal Petrov
            jjedlick@redhat.com Jakub Jedlicka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: