PLS-00801: internal error [1401] while compiling Package body
I am getting the error PLS-00801: internal error [1401] while compiling the package.
recently upgraded to version 11.1.0.7 database .
Any pointer to this ..
935026 wrote:
I am also getting the same error while compiling a procedure which use a remote object over db_link.
Let me know if this needs to be run on source db or destination db
1. RUN as SYS
$ORACLE_HOME/rdbms/admin/utlirp.sql
$ORACLE_HOME/rdbms/admin/utlrp.sql
RegardsYES
post results from SQL below from both DBs
SELECT * FROM V$VERSION;
Similar Messages
-
PLS-00801: Internal Error - Compiling Package in JDeveloper
I am trying to compile a package in JDeveloper so that I will be able to debug it. The issue is that the whenever I compile it I get a back an PLS-00801: Internal Error.
What is really strange is that when I compile it using sqlplus - the package comes back fine without any problems.
The package is approximately 5400 lines, contains UTF8 characters (I turned on UTF8 encoding in order to get the package to show correctly [found that one on this site - thank you]). It contains approx 15 methods, lost of cursors, ...
I am using the following version of JDeveloper.
Version 9.0.4.0 (Build 1419)
Oracle IDE: 9.0.4.13.2
UML Modelers Vers: 9.0.4.12.69
JMIG Framework: 9.0.4.3.75
SCM Support Version: 9.0.4.12.69
Business Components: 9.0.4.13.79
Java Version: 1.4.2_03
Java Home: c:\Programs\JDev9i\jdk\jre
Any help would be greatly appreciated - even pointing me in the direction of the logs to see if I can track down why I am getting this error.
Thank you
Marc PadbergOkay -
I broke down the PL/SQL package and figured out what was causing the internal error - it was a parameter that was based on ROWTYPE of a cursor.
Whenever I have a CURSOR%ROWTYPE as a parameter I get an internal error in JDeveloper.
Any help to resolve this would be greatly appreciated.
I wrote a small sample package using dual that simulates this.
CREATE OR REPLACE PACKAGE sample_problem IS
PROCEDURE call_internal_method;
END sample_problem;
CREATE OR REPLACE PACKAGE BODY sample_problem IS
CURSOR get_data IS
SELECT 'Test' as NAME FROM dual;
-- I have to comment this method out
-- in order to compile in JDeveloper
PROCEDURE internal_method_with(p_rec get_data%ROWTYPE)
IS
BEGIN
DBMS_OUTPUT.put_line(p_rec.NAME);
END internal_method_with;
PROCEDURE internal_method_without
IS
BEGIN
DBMS_OUTPUT.put_line('No Rowtype Passed');
END internal_method_without;
PROCEDURE call_internal_method
IS
lrec_get_data get_data%ROWTYPE;
BEGIN
OPEN get_data;
FETCH get_data INTO lrec_get_data;
CLOSE get_data;
-- I have to comment this method out
-- in order to compile in JDeveloper
internal_method_with(lrec_get_data);
internal_method_without;
END call_internal_method;
END sample_problem;
/ -
I wrote a trigger with a cursor but it generate following msg and focused on FOR EACH ROW line while compiling any help
PLS-00801: internal error [ph2csql_strdef_to_diana:bind]
CREATE OR REPLACE TRIGGER ERPTRAIN.TRG_ADM_USER_UPDATE
AFTER INSERT OR UPDATE OR DELETE
ON ERPTRAIN.ADM_USER REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
CURSOR C1(vUserId VARCHAR2)
IS
SELECT EMP_CODE FROM DOTCOM.SM_EMPLOYEE
WHERE EMP_CODE = vUserId;
C1_REC C1%ROWTYPE;
BEGIN
IF C1%ISOPEN THEN
CLOSE C1;
END IF;
IF INSERTING OR UPDATING THEN
OPEN C1(:NEW.USER_ID);
FETCH C1 INTO C1_REC;
IF C1%NOTFOUND THEN
INSERT INTO DOTCOM.SM_EMPLOYEE
EMP_CODE, EMP_NAME, EMP_CR_DT,
EMP_CR_UID, EMP_LST_MOD_DT, EMP_FREEZE_FLAG,
EMP_APPROVED)
VALUES
:NEW.USER_ID, :NEW.USER_DESC, :NEW.USER_CR_DT,
:NEW.USER_CR_UID, :NEW.USER_UPD_DT,:NEW.USER_FRZ_FLAG,'N');
ELSE
UPDATE DOTCOM.SM_EMPLOYEE
SET EMP_CODE =: NEW.USER_ID,
EMP_NAME =: NEW.USER_DESC,
EMP_CR_DT =: NEW.USER_CR_DT,
EMP_CR_UID =: NEW.USER_CR_UID,
EMP_LST_MOD_DT =: NEW.USER_UPD_DT,
EMP_FREEZE_FLAG=: NEW.USER_FRZ_FLAG
WHERE EMP_CODE =:NEW.USER_ID;
END IF;
CLOSE C1;
END IF;
IF DELETING THEN
OPEN C1(:OLD.USER_ID);
FETCH C1 INTO C1_REC;
IF C1%FOUND THEN
DELETE FROM DOTCOM.SM_EMPLOYEE WHERE EMP_CODE = :OLD.USER_ID;
END IF;
CLOSE C1;
END IF;
END;Your trigger is way too complicated: you don't need the extra cursor, which just seems there to control whether a row exists or not - just run the statements without extra checking.
A somewhat simplified version would be:
create or replace trigger erptrain.trg_adm_user_update
after insert or update or delete
on erptrain.adm_user
for each row
declare
begin
if inserting
or updating
then
update dotcom.sm_employee
set emp_code = :new.user_id,
emp_name = :new.user_desc,
emp_cr_dt = :new.user_cr_dt,
emp_cr_uid = :new.user_cr_uid,
emp_lst_mod_dt = :new.user_upd_dt,
emp_freeze_flag = :new.user_frz_flag
where emp_code = :new.user_id;
if sql%rowcount = 0
then
insert
into dotcom.sm_employee (emp_code,
emp_name,
emp_cr_dt,
emp_cr_uid,
emp_lst_mod_dt,
emp_freeze_flag,
emp_approved
values (
:new.user_id,
:new.user_desc,
:new.user_cr_dt,
:new.user_cr_uid,
:new.user_upd_dt,
:new.user_frz_flag,
'N');
end if;
end if;
if deleting
then
delete from dotcom.sm_employee
where emp_code = :old.user_id;
end if;
end trg_adm_user_update;Actually it looks you need a unique constraint on dotcom.sm_employee.emp_code which probably s missing? -
PLS-00801: internal error [23411]
After having imported an export dmp-file from a 8.17 DB on Win2k into a 10g (10.1.0) db on linux one package does not compile and stops with the error message:
PLS-00801: internal error [23411]
Nothing else.
(I am using TOAD 8.5.1)
Any ideas for the reason? Where to look at?
WolframBug No. 3917581 : PLS-00801 INTERNAL ERROR [23411] DOING IMPLICIT CONVERSION FROM NUMBER TO LONG
Workaround :
1- Change the data type from Long to varchar2
or
2- Do an explicit conversion. -
PLS-00801: internal error [74301]
Hi!
I've written one general procedure to recompile all the objects, but i've received this error. Can anyone tell me what went wrong in my code?
satyaki>ed
Wrote file afiedt.buf
1 create or replace procedure compile_all(object_tp in varchar2,ot out varchar2)
2 is
3 cursor c1
4 is
5 select distinct object_name
6 from user_objects
7 where object_type = upper(object_tp)
8 and status = upper('invalid');
9 r1 c1%rowtype;
10 type obj_rec is table of user_objects.object_name%type;
11 obj_tab obj_rec;
12 cnt number(5);
13 begin
14 open c1;
15 loop
16 fetch c1 bulk collect into obj_tab;
17 forall i in 1..obj_tab.count save exceptions
18 execute immediate(' ALTER '||upper(object_tp)||' '||obj_tab(i)||' COMPILE ');
19 exit when c1%notfound;
20 end loop;
21 close c1;
22 ot := 'SUCCESSFULL';
23 exception
24 when others then
25 ot := sqlerrm;
26* end;
satyaki>/
Warning: Procedure created with compilation errors.
satyaki>
satyaki>
satyaki>sho errors;
Errors for PROCEDURE COMPILE_ALL:
LINE/COL ERROR
0/0 PLS-00801: internal error [74301]
satyaki>Regards.
Satyaki De.But, michael it is not solving the purpose for me -
satyaki>
satyaki>CREATE OR REPLACE PROCEDURE compile_all (object_tp IN VARCHAR2, ot OUT VARCHAR2)
2 IS
3 CURSOR c1
4 IS
5 SELECT DISTINCT object_name
6 FROM user_objects
7 WHERE object_type = UPPER (object_tp)
8 AND status = UPPER ('invalid');
9
10 r1 c1%ROWTYPE;
11
12 TYPE obj_rec IS TABLE OF user_objects.object_name%TYPE;
13
14 obj_tab obj_rec;
15 cnt NUMBER (5);
16 BEGIN
17 OPEN c1;
18
19 LOOP
20 FETCH c1
21 BULK COLLECT INTO obj_tab;
22
23 FORALL i IN 1 .. obj_tab.COUNT SAVE EXCEPTIONS
24 EXECUTE IMMEDIATE 'BEGIN EXECUTE IMMEDIATE ''ALTER '' || :object_tp || '' '' || :obj_tab || '' COMPILE''; END;'
25 USING object_tp, obj_tab (i);
26 EXIT WHEN c1%NOTFOUND;
27 END LOOP;
28
29 CLOSE c1;
30
31 ot := 'SUCCESSFULL';
32 EXCEPTION
33 WHEN OTHERS
34 THEN
35 ot := SQLERRM;
36 END compile_all;
37 /
Procedure created.
satyaki>
satyaki>
satyaki>drop table e_emk;
Table dropped.
satyaki>
satyaki>
satyaki>select test_sat_d('SMITH') from dual;
select test_sat_d('SMITH') from dual
ERROR at line 1:
ORA-06575: Package or function TEST_SAT_D is in an invalid state
satyaki>
satyaki>
satyaki>select object_name
2 from user_objects
3 where object_type = upper('function')
4 and status = upper('invalid');
OBJECT_NAME
ABC
SP_GET_STOCKS
TEST_SAT_D
satyaki>
satyaki>
satyaki>create table e_emk
2 as
3 select empno,ename
4 from emp;
Table created.
satyaki>
satyaki>
satyaki>select object_name
2 from user_objects
3 where object_type = upper('function')
4 and status = upper('invalid');
OBJECT_NAME
ABC
SP_GET_STOCKS
TEST_SAT_D
satyaki>
satyaki>
satyaki>declare
2 rm varchar2(30000);
3 begin
4 compile_all('function',rm);
5 dbms_output.put_line('Status - '||rm);
6 end;
7 /
Status - ORA-24344: success with compilation error
PL/SQL procedure successfully completed.
satyaki>
satyaki>
satyaki>set serveroutput on
satyaki>
satyaki>
satyaki>select object_name
2 from user_objects
3 where object_type = upper('function')
4 and status = upper('invalid');
OBJECT_NAME
ABC
SP_GET_STOCKS
TEST_SAT_D
satyaki>As you can see after dropping the table i've executed the function and quite naturally it throws error. Now, after creation of the same table with same structure when i ran the compile all it should successfully compile the last function. But, it is not able to perform this, the reason it throws error after compilation of first function which is ABC and returns to exception section. But, i want to compile all the function even if it throws the error. Now, what should be my next step?
Regards
Satyaki De. -
PLS-00801: internal error [string]
Hi,
We recently converted from Oracle 9i to 10g. Few of our packages could not compile. with this PLS-00801 error.
Well I noticed that in the constructor we were not doing anything so we just had null;
This was causing the problem.
Instead I put
Select 'null' into vcnull from dual;
and the packages compiled.
I am posting this here, so that anyone facing this problem knows what to do. Because this is the first place I looked for solution.
Bye..
ShilpaShilpa,
You didnt mention which oracle 10g version you are using at the moment.Also you didnt mention what string you are getting in the PLS error.
What's given for this error code in Oracle docs(only in 9R2 and 817) is,
PLS-00801 internal error [string]
Cause: This is a generic internal error that might occur during compilation or execution. The first parameter is the internal error number.
Action: Report this error as a bug to Oracle Support Services.
You need to contact Support for it.Can you explain what exactly you were doing?Why did you use NULL in the select clause?
Aman.... -
PLS-00801: internal error with FORALL
I have the following procedure that I am trying to compile but I am getting an error:
<pre>
PROCEDURE procedure_1 AS
cursor cur_1 is
select column1 || column2 || column3 || column4 || column5 ||
column6 || column7 || column8 as concat_column
from table_1
for update wait 5;
type type_table_1 is table of varchar2(100);
tab_1 type_table_1;
bulk_error EXCEPTION;
PRAGMA EXCEPTION_INIT(bulk_error, -24381);
BEGIN
open cur_1;
loop
fetch cur_1 bulk collect into tab_1 limit 100;
exit when tab_1.COUNT = 0;
forall ctr in 1 .. tab_1.COUNT save exceptions
update table_1
set column_20 = array_line(tab_1(ctr).concat_column);
end loop;
close cur_1;
EXCEPTION
when bulk_error then
for i in 1 .. sql%bulk_exceptions.count loop
NULL;
end loop;
END procedure_1;
Error(622,21): PLS-00801: internal error [*** ASSERT at file pdw4.c, line 3572; Can't handle Object = -2147476152 in D_S_ED -2147476153.;
The offending line seems to be the update statement inside the forall loop. I cannot tell why I am getting this error though as everything seems ok to me.
Please help.
ThanksAnd what are you trying to do? You are updating column20 in all rows in table_1 over and over. And what is array_line? Type type_table_1 is not a table of objects, so what is tab_1(ctr).concat_column? Without questioning code logic (although I already did :) ), remove that ".concat_column":
set column_20 = array_line(tab_1(ctr));SY. -
PLS-00801: internal error [74306] Help me!
Hi,
I have written some PL/SQL Application using Bulk Binding and PL/SQL Collection at Oracle 9.2.0.8 AIX
But, I met the strange error message during compilation.
PLS-00801: internal error [74306|http://forums.oracle.com/forums/]
I tried to search Google and Metalink, I could not find the answer about the error. ?:|
## sample code raising PLS-00801
declare
TYPE term IS RECORD (
dt1 PLS_INTEGER,
dt2 PLS_INTEGER
TYPE term_arr IS TABLE OF term INDEX BY BINARY_INTEGER;
TYPE term_group IS TABLE OF term_arr INDEX BY BINARY_INTEGER;
v_term_group term_group;
BEGIN
SELECT
20080101 as dt,
20081231 as dt2
BULK COLLECT INTO v_term_group(1)
FROM DUAL;
END;
as i think, this code has no problem, but at compile time, it shows ORA-00801 error.
can anybody tell me about this error or problem in that code?Probably a bug in 9i, it works in 10g:
SQL> select * from v$version
2 /
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> declare
2 TYPE term IS RECORD (
3 dt1 PLS_INTEGER,
4 dt2 PLS_INTEGER
5 );
6 TYPE term_arr IS TABLE OF term INDEX BY BINARY_INTEGER;
7 TYPE term_group IS TABLE OF term_arr INDEX BY BINARY_INTEGER;
8 v_term_group term_group;
9 BEGIN
10 SELECT
11 20080101 as dt,
12 20081231 as dt2
13 BULK COLLECT INTO v_term_group(1)
14 FROM DUAL;
15 END;
16 /
PL/SQL procedure successfully completed.
SQL> SY. -
PLS-00801: internal error [76091]
While creating g SDO_GEOMETRY object and asigning an extralarge value I get the following error:
ORA-06550: line 0, column 0: PLS-00801: internal error [76091]
snipp__________
DECLARE
GEOM MDSYS.SDO_GEOMETRY;
BEGIN
GEOM := mdsys.sdo_geometry(3,null,null,mdsys.sdo_elem_info_Array(1,3,1),mdsys.sdo_ordinate_array
(41.06219,9.99904,39.92099,10.00000,
_______snipp_______ e.t.c.
up to ca. 20,500 points
for a poligon with only about 10,000 points it works fine. Does somebody knows if this is an known bug at 8.1.5 ? or does it worth to call the hotline?
Regards
UweYou can do this with stored procedures, you do not have to use OCI. I can send procedures that we have used at TDOT (they are for loading LRS data, but you can strip out the measure dimension). If you still need them, just let me know.
Dave
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Uwe Baier ([email protected]):
While creating g SDO_GEOMETRY object and asigning an extralarge value I get the following error:
ORA-06550: line 0, column 0: PLS-00801: internal error [76091]
snipp__________
DECLARE
GEOM MDSYS.SDO_GEOMETRY;
BEGIN
GEOM := mdsys.sdo_geometry(3,null,null,mdsys.sdo_elem_info_Array(1,3,1),mdsys.sdo_ordinate_array
(41.06219,9.99904,39.92099,10.00000,
_______snipp_______ e.t.c.
up to ca. 20,500 points
for a poligon with only about 10,000 points it works fine. Does somebody knows if this is an known bug at 8.1.5 ? or does it worth to call the hotline?
Regards
Uwe<HR></BLOCKQUOTE>
null -
PLS-00801: internal error [79704] Error
Hello,
I am using Oracle 92 on Windows Platform.
I am trying to change Interpreter to NATIVE mode.
I changed parameters as needed. Below are the parameters I have after change.
SQL> show parameter plsql_compiler_flags
NAME TYPE VALUE
plsql_compiler_flags string NATIVE
SQL> show parameter native
NAME TYPE VALUE
plsql_native_c_compiler string D:\Borland\BCC55\Bin\BCC32.EXE
plsql_native_library_dir string D:\oracle\ora92\plsql\Lib
plsql_native_library_subdir_count integer 500
plsql_native_linker string D:\Borland\BCC55\Bin\ilink32.exe
plsql_native_make_file_name string D:\oracle\ora92\plsql\spnc_makefile.mk
plsql_native_make_utility string make
Also In mk file I did below changes:
PLSQLHOME=$(ORACLE_HOME)/plsql/
ORACLELIB=$(ORACLE_HOME)/plsql/lib/
# PLSQL include
PLSQLINCLUDE=$(PLSQLHOME)include/
PLSQLINCLUDEH=$(I_SYM)$(PLSQLINCLUDE)
# PLSQL public
PLSQLPUBLIC=$(PLSQLHOME)public/
PLSQLPUBLICH=$(I_SYM)$(PLSQLPUBLIC)
#Visual C++ include path
VCINCLUDE=D:\Borland\BCC55\Include
VCINCLUDEH=$(I_SYM)$(VCINCLUDE)
VCLIB=D:\Borland\BCC55\Lib
CC=D:\Borland\BCC55\Bin\BCC32.EXE
LD=D:\Borland\BCC55\Bin\ilink32.exe
By the way I have Borland C in the specified filder and it's working well, when I use it individually.
When create a SP Ex:
CREATE OR REPLACE PROCEDURE testc
AS
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello world');
END;
I am getting below error
PLS-00801: internal error [79704]
Could any one has any Idea on this, as I know, I have set the correct path in all the places and the compiler is there in right place.
Any help is appriciated!!!Hi
I have Oracle 9i installed on AIX platform and iam trying to do native compilation on the same ,there is c compiler installed on the same .I have taken the reference from one of the fix given by oracle itself
http://www.oracle.com/technology//tech/pl_sql/htdocs/README_2188517.htm
I have made the following changes
ALTER SYSTEM SET PLSQL_COMPILER_FLAGS='NATIVE';
ALTER SYSTEM SET PLSQL_NATIVE_LIBRARY_DIR='/home/ora9i/libdir';
ALTER SYSTEM SET PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT=1000;
ALTER SYSTEM SET PLSQL_NATIVE_MAKE_FILE_NAME='/appl/oracle/product/9.2.0/plsql/spnc_makefile.mk';
ALTER SYSTEM SET PLSQL_NATIVE_MAKE_UTILITY='/usr/bin/make';
and executed the script given in the Fix .But after doing all these if i compile i am facing the following error
PLS-00923: native compilation failed: make:spdtexmk:?
Can anyone faced or tell me whether i have to make changes to overcome this error ,please throw some light .
My work is greatly affected because of this problem ,please help me.
thanks in advance for your help
Hoping for a response
Regards
Sampath Kumar -
PLS-00801: internal error [1407]" this errors
HI all ,
I wrote the following trriger
create or replace trigger interdata_after_insert
after insert
on interdata
for each row
declare
vsessionid filter.sessionid%type;
cursor c1 is
select sessionid
from filter;
begin
for vsessionid in c1 loop
begin
if :new.sessionid <> vsessionid then
insert into filter(FILTERID,SESSIONID,CLIENTIP,BROWSERTYPE,USERID,LOGINDATE,CREATEDDATE)
values (filter_seq.nextval,:new.sessionid,:new.clientip,:new.browsertype,:new.userid,:new.logindate,:new.createddate);
insert into filterdetail (FILTERDETAILID,FILTERID,SOURCEURL,DESTINATIONURL,CREATEDDATE)
values (filterdetail_seq.nextval,filter_seq.currval,:new.sourceurl,:new.destinationurl,:new.createddate);
else
insert into filterdetail (FILTERDETAILID,FILTERID,SOURCEURL,DESTINATIONURL,CREATEDDATE)
values (filterdetail_seq.nextval,filter_seq.currval,:new.sourceurl,:new.destinationurl,:new.createddate);
end if;
end;
end loop;
--commit;
end;
but it gives "0/0 PLS-00801: internal error [1407]" this errors.
Please help me.hi,
this error means that the
"plsql_native_library_dir" - value is not set
(or that the directory it points to doesnt exist).
do u use pl/sql native compilation? plsql_compiler_flags = 'native' ?
greetings, fh. -
PLS 00801 internal error [74402]
I 've a PL/SQL compilation error, which I couldn't explain or resolve.
The error-message : PLS 00801 internal error [74402]. Each separated block of the PL/SQL-script is running well and debugging gives no information, because it's an compilation error.
Thanks for responding.<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Dirk Glind van de ([email protected]):
I 've a PL/SQL compilation error, which I couldn't explain or resolve.
The error-message : PLS 00801 internal error [74402]. Each separated block of the PL/SQL-script is running well and debugging gives no information, because it's an compilation error.
Thanks for responding.<HR></BLOCKQUOTE>
The problem seems to be a wrong declaration of a parameter in a cursor (it misses the type of the parameter (stupid))
null -
Any ideas why this would generate an internal error - referring to a static class function in that class constructor's parameter signature?
Test case (on 11.2.0.2) as follows:
SQL> create or replace type TMyObject is object(
2 id integer,
3 name varchar2(30),
4
5 static function DefaultID return integer,
6 static function DefaultName return varchar2,
7
8 constructor function TMyObject(
9 objID integer default TMyObject.DefaultID(), objName varchar2 default TMyObject.DefaultName()
10 )return self as result
11 );
12 /
Type created.
SQL>
SQL> create or replace type body TMyObject is
2
3 static function DefaultID return integer is
4 begin
5 return( 0 );
6 end;
7
8 static function DefaultName return varchar2 is
9 begin
10 return( 'foo' );
11 end;
12
13 constructor function TMyObject(
14 objID integer default TMyObject.DefaultID(), objName varchar2 default TMyObject.DefaultName()
15 )return self as result is
16 begin
17 self.id := objId;
18 self.name := objName;
19 return;
20 end;
21
22 end;
23 /
Type body created.
SQL>
SQL> declare
2 obj TMyObject;
3 begin
4 obj := new TMyObject();
5 end;
6 /
declare
ERROR at line 1:
ORA-06550: line 0, column 0:
PLS-00801: internal error [phd_get_defn:D_S_ED:LHS]If the static class functions are removed from the constructor and applied instead inside the constructor body, it works without error. Likewise you can call the constructor with the static class functions as parameters, without an internal error resulting.
SQL> create or replace type TMyObject is object(
2 id integer,
3 name varchar2(30),
4
5 static function DefaultID return integer,
6 static function DefaultName return varchar2,
7
8 constructor function TMyObject(
9 objID integer default null, objName varchar2 default null
10 )return self as result
11 );
12 /
Type created.
SQL>
SQL> create or replace type body TMyObject is
2
3 static function DefaultID return integer is
4 begin
5 return( 0 );
6 end;
7
8 static function DefaultName return varchar2 is
9 begin
10 return( 'foo' );
11 end;
12
13 constructor function TMyObject(
14 objID integer default null, objName varchar2 default null
15 )return self as result is
16 begin
17 self.id := nvl( objId, TMyObject.DefaultID() );
18 self.name := nvl( objName, TMyObject.DefaultName() );
19 return;
20 end;
21
22 end;
23 /
Type body created.
SQL>
SQL> declare
2 obj TMyObject;
3 begin
4 obj := new TMyObject();
5 end;
6 /
PL/SQL procedure successfully completed.
SQL>
SQL> declare
2 obj TMyObject;
3 begin
4 obj := new TMyObject(
5 objID => TMyObject.DefaultID(),
6 objName => TMyObject.DefaultName()
7 );
8 end;
9 /
PL/SQL procedure successfully completed.
SQL> Had a quick look on support.oracle.com and did not turn up any specific notes dealing with the use of static class functions in the parameter signature of the constructor. Known issue? Any other workaround besides the one above?Hi,
there is a bug: "Bug 8470406: OBJECT INSTANCE CREATION FAILS WITH ERROR PLS-00801 IN 11GR1", it shows the behaviour in 11g but not in 10.2. It gives exactly the symptoms you also see, move it to the body and it works. But there is no solution/patch given.
Herald ten Dam
http://htendam.wordpress.com -
PLS-00801: internal error
Does any one one know what this error is?
LINE/COL ERROR
68/6 PLS-00801: internal error [*** ASSERT at f
Cannot coerce between type 49 and type 31;
USER_TESTXML__ADAM_DDL__P__61118[68, 6]]
Regards,
alwark.What version of the DB are you using and what were you attempting to do at the time the error occurred...
There are metalink entries about this error and even this forum has addressed PLS-00801: PLS-00801: internal error [79704] Error
Greg -
PLS-00801: internal error [74303]
Below is the cursor, i am geting error as
PLS-00801: internal error [74303]
help me please
CURSOR c_account_payee_n IS
SELECT /*+all_rows*/ RA.royaltor_account_id, AP.payee_id, NVL(AP.statement_pc,0), NVL(AP.statement_qt,1),
NVL(RA.statement_print_group_id,0) print_group_id, NVL(RA.approval_state_cd,0), RA.print_statement_in,
NVL(RA.crossing_group_id,0), NVL(AP.hold_reason_cd,' '), NVL(P.hold_reason_cd,' '),
NVL(P.currency_cd,' '), NVL(P.threshold_payable_am,0),
NVL(P.approval_state_cd,0), P.bad_address_in, RA.royaltor_category_cd, NVL(RA.producer_project_id,0),
sp.statement_frequency_in,sp.royaltor_category_type_in,nvl(PA.periods_balance_am,0),
nvl(PB.periods_summary_am,0),nvl(NED.recoupable_am,0),nvl(PS.periods_summary_am,0),nvl(NED1.recoupable_am,0)
FROM account_payee AP, payee P, royaltor_account RA,
(SELECT statement_print_group_id,statement_frequency_in,royaltor_category_type_in
FROM statement_print_group SP) sp,
--SF_CURRENT_RESERVE_BALANCE
(select /*index(PB index1)*/ /*index(PB index2)*/ royaltor_account_id,
NVL(sum(PB.periods_balance_am),0) periods_balance_am
FROM periods_balance PB, statement_group SG
WHERE PB.group_sequence_id = SG.group_sequence_id
AND PB.group_id = SG.group_id
AND PB.payee_id IS NULL
AND PB.process_period_dt = TO_DATE('30-APR-06','RRRR-MM-DD')
AND PB.statement_in = 'Y'
AND SG.transaction_type_cd = 'RSV'
group by royaltor_account_id) PA,
---SF_RECOUPED_ADVANCE_CREDIT_AM
(select /*index(PS index3)*/ /*index(PS index4)*/ /*+index(PS index5)*/ royaltor_account_id,
NVL(sum(PS.periods_summary_am),0) periods_summary_am
FROM periods_summary PS, statement_group SG
WHERE PS.group_id = SG.group_id
AND PS.group_sequence_id = SG.group_sequence_id
AND PS.payee_id IS NULL
AND PS.process_period_dt = TO_DATE('30-APR-06','RRRR-MM-DD')
AND PS.statement_in = 'Y'
AND SG.transaction_type_cd = 'RAD'
group by royaltor_account_id) PB,
---GET PRIOR CROSSING AMOUNT FOR THE ROYALTOR
(SELECT /*index(NED index6)*/ /*index (NED index7)*/ royaltor_account_id,
NVL(SUM(NED.recoupable_am),0) recoupable_am
FROM non_earnings_detail NED, statement_group SG
WHERE NED.royaltor_account_id = v_royaltor_account_id
AND NED.payee_id IS NULL
AND (NED.statement_dt = TO_DATE('30-APR-06','RRRR-MM-DD') OR NED.statement_dt IS NULL)
AND NED.group_id = SG.group_id
AND NED.group_sequence_id = SG.group_sequence_id
AND SG.transaction_category_cd = 'RNE'
AND SG.transaction_type_cd = 'CRS'
AND NED.approval_state_cd IS NULL
AND NED.publisher_advance_transfer_in = 'X'
AND (NED.source_feed_cd <> 'W' OR NED.source_feed_cd IS NULL)
group by royaltor_account_id) NED,
---GET EARNINGS AMOUNT FOR THE ROYALTOR
(SELECT /*index(PS index4)*/ /*index (PS index5)*/ royaltor_account_id,
NVL(SUM(PS.periods_summary_am),0) periods_summary_am
FROM periods_summary PS, statement_group SG
WHERE PS.royaltor_account_id = v_royaltor_account_id
AND PS.payee_id IS NULL
AND PS.process_period_dt = TO_DATE('30-APR-06','RRRR-MM-DD')
AND PS.statement_in = 'Y'
AND PS.group_id = SG.group_id
AND PS.group_sequence_id = SG.group_sequence_id
AND SG.transaction_category_cd IN ('DOE','FOE','TPE')
group by royaltor_account_id) PS,
-- GET NON EARNINGS AMOUNT FOR THE ACCOUNT PAYEE
(SELECT /*index(NED index6)*/ /*index (NED index7)*/ royaltor_account_id,
NVL(SUM(NED.recoupable_am),0) recoupable_am
FROM non_earnings_detail NED, statement_group SG
WHERE NED.royaltor_account_id = v_royaltor_account_id
AND NED.payee_id = v_payee_id
AND (NED.statement_dt = TO_DATE('30-APR-06','RRRR-MM-DD') OR NED.statement_dt IS NULL)
AND NED.group_id = SG.group_id
AND NED.group_sequence_id = SG.group_sequence_id
AND SG.transaction_category_cd = 'RNE'
AND NED.publisher_advance_transfer_in = 'X'
AND NED.approval_state_cd IS NULL
AND (NED.source_feed_cd <> 'W' OR NED.source_feed_cd IS NULL)
group by royaltor_account_id) NED1
WHERE RA.royaltor_account_id = AP.royaltor_account_id
and ra.statement_print_group_id = sp.statement_print_group_id
and PA.royaltor_account_id(+)=RA.royaltor_account_id
and PB.royaltor_account_id(+)=RA.royaltor_account_id
and NED.royaltor_account_id(+)=RA.royaltor_account_id
and NED1.royaltor_account_id(+)=RA.royaltor_account_id
and PS.royaltor_account_id(+) =RA.royaltor_account_id
AND AP.payee_id = P.payee_id
ORDER BY RA.royaltor_account_id ASC;According to Metalink note :1012357.6, if you have declared a cursor type, check that your cursor variable is not the same name as the cursor type.
Maybe you are looking for
-
How to install and configure RSYNC on Solaris 10 SPARC
I am trying to setup two Solaris boxes to sync their two mount points in real time using RSYNC. If any update happens on Server A it should reflect on server B automatically. Use CRON or as system SERVICE, which is best? Servers are on WAN link and a
-
Reconfigured itself, now stuck on test page, please help
I went to go listen to my ipod on my way home from work this morning. When I turned it on, it went to a weird screen and said it was reconfiguring. I followed all the prompts it told me to. However, it came to a to a certain screen and it wont let me
-
Home screen icons bouncing and jittering.
After installing the 7.0.6 update, my home screen is bouncing and jittering. I've restored the phone from backup with no resolve. HELP! I'm getting sea sick viewing my screen
-
[CS3 / VBS] Groups in CS3
I've converted over a few scripts that used to work fine in both CS and CS2. One particular scripts extracts text from tables on multiple textframes that include tables. After changing over to CS3 with this script, it does not extract any of the text
-
Creation date used during ingest File Rename incorrect
Hi System: Windows 7 64-bit SP1 Prelude CC v2.0.1 (118) I've been using Prelude about 9 months now and have got used to it's foibles. Hopefully some of these are being addressed for future releases. But the recent update seems to have introduced som