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 "Mike Perham (JIRA)" <ji...@apache.org> on 2007/02/07 00:26:05 UTC

[jira] Created: (DDLUTILS-154) Autoincrementing columns broken on Oracle10?

Autoincrementing columns broken on Oracle10?
--------------------------------------------

                 Key: DDLUTILS-154
                 URL: https://issues.apache.org/jira/browse/DDLUTILS-154
             Project: DdlUtils
          Issue Type: Bug
          Components: Core - Oracle
         Environment: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
            Reporter: Mike Perham
         Assigned To: Thomas Dudziak


java.lang.RuntimeException: Unable to execute SQL with message 'Missing IN or OUT parameter at index:: 1' and code 17041/null:

CREATE OR REPLACE TRIGGER trg_w_inboxmsg_id BEFORE INSERT ON w_inboxmsg FOR EACH ROW WHEN (new.id IS NULL)
BEGIN SELECT seq_w_inboxmsg_id.nextval INTO :new.id FROM dual; END;;


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


[jira] Resolved: (DDLUTILS-154) Autoincrementing columns broken on Oracle10?

Posted by "Mike Perham (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DDLUTILS-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Perham resolved DDLUTILS-154.
----------------------------------

    Resolution: Invalid

> Autoincrementing columns broken on Oracle10?
> --------------------------------------------
>
>                 Key: DDLUTILS-154
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-154
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - Oracle
>    Affects Versions: 1.0
>         Environment: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
>            Reporter: Mike Perham
>         Assigned To: Thomas Dudziak
>
> java.lang.RuntimeException: Unable to execute SQL with message 'Missing IN or OUT parameter at index:: 1' and code 17041/null:
> CREATE OR REPLACE TRIGGER trg_w_inboxmsg_id BEFORE INSERT ON w_inboxmsg FOR EACH ROW WHEN (new.id IS NULL)
> BEGIN SELECT seq_w_inboxmsg_id.nextval INTO :new.id FROM dual; END;;

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


[jira] Updated: (DDLUTILS-154) Autoincrementing columns broken on Oracle10?

Posted by "Mike Perham (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DDLUTILS-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Perham updated DDLUTILS-154:
---------------------------------

    Affects Version/s: 1.0

> Autoincrementing columns broken on Oracle10?
> --------------------------------------------
>
>                 Key: DDLUTILS-154
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-154
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - Oracle
>    Affects Versions: 1.0
>         Environment: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
>            Reporter: Mike Perham
>         Assigned To: Thomas Dudziak
>
> java.lang.RuntimeException: Unable to execute SQL with message 'Missing IN or OUT parameter at index:: 1' and code 17041/null:
> CREATE OR REPLACE TRIGGER trg_w_inboxmsg_id BEFORE INSERT ON w_inboxmsg FOR EACH ROW WHEN (new.id IS NULL)
> BEGIN SELECT seq_w_inboxmsg_id.nextval INTO :new.id FROM dual; END;;

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


[jira] Commented: (DDLUTILS-154) Autoincrementing columns broken on Oracle10?

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DDLUTILS-154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470826 ] 

Thomas Dudziak commented on DDLUTILS-154:
-----------------------------------------

Are you sure that this happens while DdlUtils runs ? This error is usually caused by issuing an insert/update where one of the input parameter wasn't set, or by a call to a stored procedure where an out parameter was not registered. E.g. 

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=55&t=000681
http://www.dbmotive.com/oracle_error_codes.php?errcode=17041

AFAIK under certain circumstances, this can confuse the oracle driver so that the error is finally reported during a totally unrelated statement execution.

Please try to execute the DdlUtils statements on their own (e.g. via the Ant tasks) and see whether the error still happens. It would also be helpful if you could supply a XML schema that produces this problem and some info about how you use DdlUtils (e.g. a build file snippet or some code using the DdlUtils API).

> Autoincrementing columns broken on Oracle10?
> --------------------------------------------
>
>                 Key: DDLUTILS-154
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-154
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - Oracle
>    Affects Versions: 1.0
>         Environment: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
>            Reporter: Mike Perham
>         Assigned To: Thomas Dudziak
>
> java.lang.RuntimeException: Unable to execute SQL with message 'Missing IN or OUT parameter at index:: 1' and code 17041/null:
> CREATE OR REPLACE TRIGGER trg_w_inboxmsg_id BEFORE INSERT ON w_inboxmsg FOR EACH ROW WHEN (new.id IS NULL)
> BEGIN SELECT seq_w_inboxmsg_id.nextval INTO :new.id FROM dual; END;;

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


[jira] Commented: (DDLUTILS-154) Autoincrementing columns broken on Oracle10?

Posted by "Mike Perham (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DDLUTILS-154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470981 ] 

Mike Perham commented on DDLUTILS-154:
--------------------------------------

We are using DdlUtils to generate sql at build time for a number of different database platforms we support (mysql, db2, etc).  This sql is loaded at runtime if the database is detected to be empty in order to create the tables.  We are testing oracle for the first time and running into this issue.

>From your dbmotive link:
bq. Alternatively, there is a problem with the Oracle 10g JDBC driver when trying to use the :NEW or :OLD Oracle keywords in a PreparedStatement.

Ok, this looks like an Oracle bug/feature.  I should be able to work around it in our SqlLoader class.  Issue (hopefully) resolved.

> Autoincrementing columns broken on Oracle10?
> --------------------------------------------
>
>                 Key: DDLUTILS-154
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-154
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - Oracle
>    Affects Versions: 1.0
>         Environment: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
>            Reporter: Mike Perham
>         Assigned To: Thomas Dudziak
>
> java.lang.RuntimeException: Unable to execute SQL with message 'Missing IN or OUT parameter at index:: 1' and code 17041/null:
> CREATE OR REPLACE TRIGGER trg_w_inboxmsg_id BEFORE INSERT ON w_inboxmsg FOR EACH ROW WHEN (new.id IS NULL)
> BEGIN SELECT seq_w_inboxmsg_id.nextval INTO :new.id FROM dual; END;;

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