You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by David Sean Taylor <da...@bluesunrise.com> on 2007/01/03 02:28:24 UTC

readModelFromDatabase failure Oracle ORA-01424: missing or illegal character following the escape

I am experiencing a problem running with oracle(10)
When calling platform.readModelFromDatabase(databaseName);
I get the error described here:

http://mail-archives.apache.org/mod_mbox/db-ddlutils-dev/200512.mbox/%3C200512080904.AFX76995@persistent.co.in%3E

Exception in thread "main" org.apache.ddlutils.DynaSqlException:
java.sql.SQLExc
eption: ORA-01424: missing or illegal character following the escape
character
     at
org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(Platform
ImplBase.java:1075)

Took the advise in the response to that question, installed P6SPY and 
here is snippet of what the spy is logging, there are lots more of these 
selects from user_triggers. Seems like the select from RECYCLEBIN.

Could someone tell me exactly is going on here with all these select 
statements from user_triggers and RECYCLEBIN, and why is the last select 
failing


1167783281219|0|1|statement|SELECT * FROM user_triggers WHERE 
trigger_name = ?|SELECT * FROM user_triggers WHERE trigger_name = 
'trg_WWV_FLOW_FI_CTS$_FILE_TYPE'
1167783281229|0|1|statement|SELECT * FROM user_triggers WHERE 
trigger_name = ?|SELECT * FROM user_triggers WHERE trigger_name = 
'trg_WWV_FLOW_FI_$_FILE_CHARSET'
1167783281239|10|1|statement|SELECT * FROM RECYCLEBIN WHERE 
OBJECT_NAME=?|SELECT * FROM RECYCLEBIN WHERE 
OBJECT_NAME='BIN$+TErOhpGR5mp9OdJ/LDNFw==$0'

Re: readModelFromDatabase failure Oracle ORA-01424: missing or illegal character following the escape

Posted by Thomas Dudziak <to...@gmail.com>.
On 1/3/07, David Sean Taylor <da...@bluesunrise.com> wrote:

<snip>

>      [java] reading model...
>      [java] Failed to initialize Utility!!!!!
>      [java] java.lang.NullPointerException
>      [java]      at
> org.apache.ddlutils.platform.JdbcModelReader.readTable(JdbcMo
> delReader.java:574)
>      [java]      at
> org.apache.ddlutils.platform.oracle.Oracle8ModelReader.readTa
> ble(Oracle8ModelReader.java:94)
>      [java]      at
> org.apache.ddlutils.platform.oracle.Oracle10ModelReader.readT
> able(Oracle10ModelReader.java:80)

<snip>

This is not the standard DdlUtils Ant task, right, but the
JetspeedDDLUtil class from Jetspeed ?
First thing, you should update DdlUtils (on line 574 in
JdbcModelReader, a NullPointerException cannot happen as in trunk it
only contains a closing brace).
If that doesn't help, please post the new stacktrace again.

Tom

Re: readModelFromDatabase failure Oracle ORA-01424: missing or illegal character following the escape

Posted by David Sean Taylor <da...@bluesunrise.com>.
Thomas Dudziak wrote:
> Please use the databasetype at the Ant task
> (http://db.apache.org/ddlutils/ant/org.apache.ddlutils.task.DatabaseToDdlTask.html#parameter-databasetype) 
> 
> to explicitly use the Oracle10 platform (DdlUtils currently won't
> detect the database version automatically).
> 
yes, i did know about that setting, thanks for pointing me in the right 
direction again
seems a $(property) was not being set correctly in the program 
bootstrap, and defaulted back to oracle8

so i fixed that, and now

     [java] reading model...
     [java] Failed to initialize Utility!!!!!
     [java] java.lang.NullPointerException
     [java]      at 
org.apache.ddlutils.platform.JdbcModelReader.readTable(JdbcMo
delReader.java:574)
     [java]      at 
org.apache.ddlutils.platform.oracle.Oracle8ModelReader.readTa
ble(Oracle8ModelReader.java:94)
     [java]      at 
org.apache.ddlutils.platform.oracle.Oracle10ModelReader.readT
able(Oracle10ModelReader.java:80)
     [java]      at 
org.apache.ddlutils.platform.JdbcModelReader.readTables(JdbcM
odelReader.java:517)
     [java]      at 
org.apache.ddlutils.platform.JdbcModelReader.getDatabase(Jdbc
ModelReader.java:474)
     [java]      at 
org.apache.ddlutils.platform.JdbcModelReader.getDatabase(Jdbc
ModelReader.java:434)
     [java]      at 
org.apache.ddlutils.platform.PlatformImplBase.readModelFromDa
tabase(PlatformImplBase.java:1732)
     [java]      at 
org.apache.ddlutils.platform.PlatformImplBase.readModelFromDa
tabase(PlatformImplBase.java:1717)


Looking at the spy's output,

1167813838338|10|1|statement|SELECT * FROM RECYCLEBIN WHERE 
OBJECT_NAME=?|SELECT * FROM RECYCLEBIN WHERE OBJECT_NAME='XDB$STATS'
1167813838338|0|1|statement|SELECT a.INDEX_NAME, a.INDEX_TYPE, 
a.UNIQUENESS, b.COLUMN_NAME, b.COLUMN_POSITION FROM USER_INDEXES a, 
USER_IND_COLUMNS b WHERE a.TABLE_NAME=? AND a.GENERATED=? AND 
a.TABLE_TYPE=? AND a.TABLE_NAME=b.TABLE_NAME AND 
a.INDEX_NAME=b.INDEX_NAME AND a.INDEX_NAME NOT IN (SELECT DISTINCT 
c.CONSTRAINT_NAME FROM USER_CONSTRAINTS c WHERE c.CONSTRAINT_TYPE=? AND 
c.TABLE_NAME=a.TABLE_NAME)|SELECT a.INDEX_NAME, a.INDEX_TYPE, 
a.UNIQUENESS, b.COLUMN_NAME, b.COLUMN_POSITION FROM USER_INDEXES a, 
USER_IND_COLUMNS b WHERE a.TABLE_NAME='XDB$STATS' AND a.GENERATED='N' 
AND a.TABLE_TYPE='TABLE' AND a.TABLE_NAME=b.TABLE_NAME AND 
a.INDEX_NAME=b.INDEX_NAME AND a.INDEX_NAME NOT IN (SELECT DISTINCT 
c.CONSTRAINT_NAME FROM USER_CONSTRAINTS c WHERE c.CONSTRAINT_TYPE='P' 
AND c.TABLE_NAME=a.TABLE_NAME)


Re: readModelFromDatabase failure Oracle ORA-01424: missing or illegal character following the escape

Posted by Thomas Dudziak <to...@gmail.com>.
On 1/2/07, David Sean Taylor <da...@bluesunrise.com> wrote:

> I am experiencing a problem running with oracle(10)
> When calling platform.readModelFromDatabase(databaseName);
> I get the error described here:
>
> http://mail-archives.apache.org/mod_mbox/db-ddlutils-dev/200512.mbox/%3C200512080904.AFX76995@persistent.co.in%3E
>
> Exception in thread "main" org.apache.ddlutils.DynaSqlException:
> java.sql.SQLExc
> eption: ORA-01424: missing or illegal character following the escape
> character
>      at
> org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(Platform
> ImplBase.java:1075)
>
> Took the advise in the response to that question, installed P6SPY and
> here is snippet of what the spy is logging, there are lots more of these
> selects from user_triggers. Seems like the select from RECYCLEBIN.
>
> Could someone tell me exactly is going on here with all these select
> statements from user_triggers and RECYCLEBIN, and why is the last select
> failing
>
>
> 1167783281219|0|1|statement|SELECT * FROM user_triggers WHERE
> trigger_name = ?|SELECT * FROM user_triggers WHERE trigger_name =
> 'trg_WWV_FLOW_FI_CTS$_FILE_TYPE'
> 1167783281229|0|1|statement|SELECT * FROM user_triggers WHERE
> trigger_name = ?|SELECT * FROM user_triggers WHERE trigger_name =
> 'trg_WWV_FLOW_FI_$_FILE_CHARSET'
> 1167783281239|10|1|statement|SELECT * FROM RECYCLEBIN WHERE
> OBJECT_NAME=?|SELECT * FROM RECYCLEBIN WHERE
> OBJECT_NAME='BIN$+TErOhpGR5mp9OdJ/LDNFw==$0'

P6Spy prints out each prepared statement twice - once with the
placeholders (the ?) and once with the actual values. So these are
really only three SELECT statements.
The Recyclebin was an addition in Oracle 10g that basically takes
deleted things (rows, tables, etc.) in pretty much the same way that
the recycle bin on a, say, Windows desktop works.
Since you're seeing it here, this means that you don't use the
Oracle10 platform (which is aware of the recyclebin) but instead the
standard Oracle8 one. Please use the databasetype at the Ant task
(http://db.apache.org/ddlutils/ant/org.apache.ddlutils.task.DatabaseToDdlTask.html#parameter-databasetype)
to explicitly use the Oracle10 platform (DdlUtils currently won't
detect the database version automatically).

Tom