Uploaded image for project: 'DdlUtils'
  1. DdlUtils
  2. DDLUTILS-238

java.sql.SQLException: ORA-01424 missing or illegal character following the escape character

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.0
    • None
    • Core - Oracle
    • None
    • Client: win xp, Apache-ant-1.7.1, jdk 1.6.0, DdlUtils-1.0, ojdbc14.jar for oracle 10.2.0.4 | Server: Sun 15k, Solaris, Oracle 10.2.0.4

    Description

      The schema.xml was written completely and correctly but when it comes to extracting the data, this error occures:

      java.sql.SQLException: ORA-01424 missing or illegal character following the escape character

      If you have a where clause with the like operator and use the ESCAPE expression for example like
      >where owner LIKE 'SOME-OWNER-SUBSTRING' ESCAPE '/'<
      the character after the escape character in SOME-OWNER-SUBSTRING MUST be one of % or _ to evaluate % or _ literally.

      I've tried different task-parameters like with/without modelname, usedelimitedsqlidentifiers true or without,only certain tabletypes but all with the same result.

      This is my ant file:

      <project name="MyProject" default="database-dump" basedir=".">
      <description>
      Oracle to DDL
      </description>
      <property name="database-dump" location="database-dump"/>
      <path id="runtime-classpath">
      <fileset dir="lib">
      <include name="*/.jar"/>
      <include name="*/.zip"/>
      </fileset>
      </path>

      <target name="database-dump" description="Oracle10-SCHEMA-Dump">
      <taskdef name="databaseToDdl"
      classname="org.apache.ddlutils.task.DatabaseToDdlTask">
      <classpath refid="runtime-classpath"/>

      </taskdef>
      <databaseToDdl modelname="SCHEMA" schemapattern="SCHEMA" databasetype="oracle10" verbosity="DEBUG">
      <database url="jdbc:oracle:thin:@HOSTIP:1521:SID"
      driverClassName="oracle.jdbc.driver.OracleDriver"
      username="SCHEMA"
      password="PASS"/>

      <writeSchemaToFile outputFile="schema.xml"/>
      <writeDataToFile outputFile="data.xml"/>
      </databaseToDdl>

      </target>
      </project>

      Thanks in advance
      Markus

      Attachments

        1. log.txt
          236 kB
          Markus Böing

        Activity

          People

            tomdz Thomas Dudziak
            mb101 Markus Böing
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: