当前位置: 代码迷 >> Oracle开发 >> 奇怪的触发器有关问题,总提示编译出错
  详细解决方案

奇怪的触发器有关问题,总提示编译出错

热度:65   发布时间:2016-04-24 07:38:15.0
奇怪的触发器问题,总提示编译出错!
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.
  相关解决方案