db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Böing (JIRA) <j...@apache.org>
Subject [jira] Commented: (DDLUTILS-238) java.sql.SQLException: ORA-01424 missing or illegal character following the escape character
Date Thu, 29 Jan 2009 12:14:59 GMT

    [ https://issues.apache.org/jira/browse/DDLUTILS-238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12668455#action_12668455
] 

Markus Böing commented on DDLUTILS-238:
---------------------------------------

Thanks for the reply.

At first, here is the console output related to the task's verbosity level "DEBUG" (running
ant without -debug)

<stdout-task-verbosity>
D:\Apache-ant-1.7.1\bin>ant.bat -buildfile D:\Entwicklung\apache-ddlutils\DatabaseToDdl\Oracle\OracleDbToDdl.xml
Buildfile: D:\Entwicklung\apache-ddlutils\DatabaseToDdl\Oracle\OracleDbToDdl.xml

database-dump:
[databaseToDdl] Borrowed connection org.apache.commons.dbcp.PoolableConnection@1d80e6d from
data source
[databaseToDdl] Returning connection org.apache.commons.dbcp.PoolableConnection@1d80e6d to
data source.
[databaseToDdl] Remaining connections: None
[databaseToDdl] Written schema to D:\Entwicklung\apache-ddlutils\DatabaseToDdl\Oracle\kampdwh3-schema.xml
[databaseToDdl] Borrowed connection org.apache.commons.dbcp.PoolableConnection@1d80e6d from
data source
[databaseToDdl] Returning connection org.apache.commons.dbcp.PoolableConnection@1d80e6d to
data source.
[databaseToDdl] Remaining connections: None

BUILD FAILED
D:\Entwicklung\apache-ddlutils\DatabaseToDdl\Oracle\OracleDbToDdl.xml:25: java.sql.SQLException:
ORA-01424: missing or illegal character following the
 escape character


Total time: 2 minutes 41 seconds
D:\Apache-ant-1.7.1\bin>
</stdout-task-verbosity>

Obviously the schema file was written succesfully which I can confirm as the kampdwh3-schema.xml
has all the metadata.


Here comes the stacktrace-part of the debug-output (running the project again with ant -debug).
The whole debug output is in the attached file.

<log-stacktrace-part>
...
[databaseToDdl] Returning connection org.apache.commons.dbcp.PoolableConnection@11a64ed to
data source.
[databaseToDdl] Remaining connections: None
Finding class org.apache.commons.lang.exception.ExceptionUtils
Loaded from D:\Entwicklung\apache-ddlutils\DatabaseToDdl\Oracle\lib\lib\commons-lang-2.1.jar
org/apache/commons/lang/exception/ExceptionUtils.class
Class org.apache.commons.lang.exception.ExceptionUtils loaded from ant loader (parentFirst)
Class java.lang.NoSuchFieldException loaded from parent loader (parentFirst)

BUILD FAILED
D:\Entwicklung\apache-ddlutils\DatabaseToDdl\Oracle\OracleDbToDdl.xml:26: java.sql.SQLException:
ORA-01424: missing or illegal character following the escape character

        at org.apache.ddlutils.task.Command.handleException(Command.java:81)
        at org.apache.ddlutils.task.WriteDataToFileCommand.execute(WriteDataToFileCommand.java:94)
        at org.apache.ddlutils.task.DatabaseTaskBase.executeCommands(DatabaseTaskBase.java:337)
        at org.apache.ddlutils.task.DatabaseTaskBase.execute(DatabaseTaskBase.java:365)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: org.apache.ddlutils.DatabaseOperationException: java.sql.SQLException: ORA-01424:
missing or illegal character following the escape character

        at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1891)
        at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1869)
        at org.apache.ddlutils.io.DatabaseDataIO.writeDataToXML(DatabaseDataIO.java:359)
        at org.apache.ddlutils.io.DatabaseDataIO.writeDataToXML(DatabaseDataIO.java:306)
        at org.apache.ddlutils.task.WriteDataToFileCommand.execute(WriteDataToFileCommand.java:88)
        ... 19 more
Caused by: java.sql.SQLException: ORA-01424: missing or illegal character following the escape
character

        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
        at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970)
        at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1072)
        at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:854)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1154)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3415)
        at oracle.jdbc.driver.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:273)
        at org.apache.ddlutils.platform.DatabaseMetaDataWrapper.getColumns(DatabaseMetaDataWrapper.java:148)
        at org.apache.ddlutils.platform.JdbcModelReader.readColumns(JdbcModelReader.java:747)
        at org.apache.ddlutils.platform.JdbcModelReader.readTable(JdbcModelReader.java:565)
        at org.apache.ddlutils.platform.oracle.Oracle8ModelReader.readTable(Oracle8ModelReader.java:102)
        at org.apache.ddlutils.platform.oracle.Oracle10ModelReader.readTable(Oracle10ModelReader.java:80)
        at org.apache.ddlutils.platform.JdbcModelReader.readTables(JdbcModelReader.java:516)
        at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:472)
        at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:432)
        at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1884)
        ... 23 more
--- Nested Exception ---
org.apache.ddlutils.DatabaseOperationException: java.sql.SQLException: ORA-01424: missing
or illegal character following the escape character

        at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1891)
        at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1869)
        at org.apache.ddlutils.io.DatabaseDataIO.writeDataToXML(DatabaseDataIO.java:359)
        at org.apache.ddlutils.io.DatabaseDataIO.writeDataToXML(DatabaseDataIO.java:306)
        at org.apache.ddlutils.task.WriteDataToFileCommand.execute(WriteDataToFileCommand.java:88)
        at org.apache.ddlutils.task.DatabaseTaskBase.executeCommands(DatabaseTaskBase.java:337)
        at org.apache.ddlutils.task.DatabaseTaskBase.execute(DatabaseTaskBase.java:365)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.sql.SQLException: ORA-01424: missing or illegal character following the escape
character

        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
        at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970)
        at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1072)
        at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:854)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1154)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3415)
        at oracle.jdbc.driver.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:273)
        at org.apache.ddlutils.platform.DatabaseMetaDataWrapper.getColumns(DatabaseMetaDataWrapper.java:148)
        at org.apache.ddlutils.platform.JdbcModelReader.readColumns(JdbcModelReader.java:747)
        at org.apache.ddlutils.platform.JdbcModelReader.readTable(JdbcModelReader.java:565)
        at org.apache.ddlutils.platform.oracle.Oracle8ModelReader.readTable(Oracle8ModelReader.java:102)
        at org.apache.ddlutils.platform.oracle.Oracle10ModelReader.readTable(Oracle10ModelReader.java:80)
        at org.apache.ddlutils.platform.JdbcModelReader.readTables(JdbcModelReader.java:516)
        at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:472)
        at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:432)
        at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1884)
        ... 23 more

Total time: 2 minutes 46 seconds
</log-stacktrace-part>

I don't know if got you right. Did you expect the relavant DDL/DML in the stacktrace? If not,
how/where can I get it?

Any ideas?

Kind regards and thanks in advance
Markus

> java.sql.SQLException: ORA-01424 missing or illegal character following the escape character
> --------------------------------------------------------------------------------------------
>
>                 Key: DDLUTILS-238
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-238
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - Oracle
>    Affects Versions: 1.0
>         Environment: 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
>            Reporter: Markus Böing
>            Assignee: Thomas Dudziak
>         Attachments: log.txt
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message