Plsql Procedures Fail with Error ORA-06502/ORA-06512 When htp.init Is Included (Doc ID 604999.1)

Last updated on NOVEMBER 04, 2016

Applies to:

Oracle HTTP Server - Version 10.1.2.0.0 to 10.1.3.4 [Release AS10gR2 to AS10gR3]
Information in this document applies to any platform.
This problem can occur on any platform.

Symptoms

With plsql toolkit version 10.1.2.0.5 and 10.1.2.0.6, the following procedure fails with htp.init included:

SQL> CREATE or REPLACE procedure helloworld
is BEGIN
htp.init;
htp.htmlOpen;
htp.headOpen;
htp.title('Hello ');
htp.headClose;
htp.bodyOpen;
htp.print('Hello World');
htp.bodyClose;
htp.htmlClose;
end;
/

Procedure created.

SQL>
SQL> execute helloworld
BEGIN helloworld; END;

*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.OWA_UTIL", line 354
ORA-06512: at "SYS.HTP", line 1368
ORA-06512: at "SYS.HTP", line 1443
ORA-06512: at "SYS.HTP", line 1735
ORA-06512: at "SYS.HTP", line 72
ORA-06512: at "SYS.HELLOWORLD", line 4
ORA-06512: at line 1


The error only happens when htp.init is added to the procedure.
Executing htp.init alone is error free.

.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms