日期:2014-05-17  浏览次数:20799 次

奇怪的触发器问题,总提示编译出错!
CREATE   OR   REPLACE   TRIGGER   SCOTT.TRG_TEST   BEFORE
INSERT   ON   "SCOTT ". "EMP "   FOR   EACH   ROW  
declare
        v_no   emp.empno%type;
begin
        v_no:=:new.empno;
end;

错误提示:
Failed   to   commit:   Missing   IN   or   OUT   parameter   at   index::   1

请问如何解决??????


------解决方案--------------------
There might be a problem in the Oracle?? JDBC?? driver code.

When the executeBatch is called, a large number of statements (as many as 4000) succeed. However, during the close of the statement, the connection manager calls the clearParameters() method on the statement, and gets an Oracle SQLException: Internal Error. This statement is then thrown away and not cached.

Subsequent prepares of this SQL string result in a new prepare call to the JDBC driver, and all should continue normally. However, the second time executeBatch is called, Oracle throws the above exception. While these two errors might not be related, it seems very coincidental. This behavior can happen if Oracle statement caching is enabled and the internal error somehow corrupted these Oracle statements.