Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Listener Error - character string buffer too small (ORA-06502)

632624May 11 2011 — edited Sep 15 2011
I am running into a very strange problem with the APEX listener on seemingly random pages. I can hit every page in my application just fine, but as soon as I hit this specific one, Glassfish throws an HTTP 500 error. If I click Debug, the page seems to load fine with no indications of trouble, but as soon as I turn debug back off, it goes back to the HTTP 500 error. I don't see anything special about the page that makes this happen. It is pretty simple and has 4 regions. I have noticed that if I set any 1 of the 4 regions to "Never display", the page loads fine. It's like having all 4 of them enabled at once are causing some overload, even though it's actually a smaller amount of data than most of my other pages.

**Update: I just discovered this only happens if I'm logged into the workspace first and then try to run the page! If I log out of APEX and then hit the application as a normal user, page loads error-free. This is still an annoying problem, but at least it seems I have a decent workaround since regular users never see it.

After a couple days, I noticed the exact same problem on a second APEX application I'm using. Again, it is on some random page whereas all the other pages work fine.

Both applications and pages in question worked without issue in APEX 3.x. I am trying to get an APEX application up and running on the latest version.

I have tried both Glassfish server and simply downloading the latest listener (version 1.1.1) and running it in standalone mode. I get the problem both ways, which is why it seems it's a listener issue.

I have seen a few other threads of people having this problem, but I never did find anyone with a solution, and most of the posts stopped back in December.

Some details on my environment:
Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
APEX version: 4.0.2
Webserver: Glassfish 3.1



Here is the log entry from Glassfish when the HTTP 500 error displays as I try to load one of the bugged pages.


[#|2011-05-10T21:14:22.967-0500|INFO|oracle-glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=111;_ThreadName=Thread-1;|MaxConnectionReuseCount=50000|#]

[#|2011-05-10T21:14:46.431-0500|SEVERE|oracle-glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=112;_ThreadName=Thread-1;|
***********ERROR***********
init: # headers=46
declare nm owa.vc_arr := ?;
vl owa.vc_arr := ?;
begin
owa.init_cgi_env( ?, nm, vl );
htp.init; htp.HTBUF_LEN := 63;
? := sys_context('USERENV','SID');
end;
SID:1242
CALL:
begin
f(p=>?);
commit;
end;
BINDS

p:100:2:220529248574492::NOPAGE CALL:
declare
nlns number := 999999;
l_clob CLOB;
lines htp.htbuf_arr;
l_buff varchar2(32767);
l_clob_init boolean:= false;
l_file varchar2(5);
l_doc_info varchar2(1000);
begin
OWA.GET_PAGE(lines, nlns);
if (nlns > 1) then
for i in 1..nlns loop
if ( length(lines(i)) > 0 ) then
if ( ( lengthb(l_buff) + lengthb(lines(i))) > 32767) then
if (NOT l_clob_init) then
dbms_lob.createtemporary(l_clob, TRUE);
dbms_lob.open(l_clob, dbms_lob.lob_readwrite);
l_clob_init:=true;
end if;
dbms_lob.writeappend(l_clob,length(l_buff),l_buff);
l_buff := lines(i);
else
l_buff := l_buff || lines(i);
end if;
end if;
end loop;
end if;
if (l_clob_init) then
dbms_lob.writeappend(l_clob,length(l_buff),l_buff);
l_buff := '';
end if;
? := l_clob;
? := l_buff;
if (wpg_docload.is_file_download) then l_file:='TRUE'; wpg_docload.get_download_file(l_doc_info); else l_file := 'FALSE'; end if; ? := l_file;
? := l_doc_info;
end;
get_page FAILED:ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 33

Edited by: BrianB on May 11, 2011 7:50 AM

Edited by: BrianB on May 11, 2011 8:01 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2011
Added on May 11 2011
40 comments
3,212 views