Forum Stats

  • 3,724,106 Users
  • 2,244,688 Discussions


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Rare IR error ORA-06502: associative array shape is not consistent with session

Gerard Otin
Gerard Otin Member Posts: 15 Blue Ribbon
edited March 1 in APEX Discussions


I'm getting this strange error when loading a page for the first time. The rare thing, is that when the region (IR) is refreshed, the error disappears and data loads succesfully.

This error happens after modifying Globalization settings in Application Properties (NLS_SORT and NLS_COMP).

The error is: ORA-06502: PL/SQL: numeric or value error: associative array shape is not consistent with session parameters

But, as I say, when I refresh the report (but not the whole page), the data loads succesfully.

Trying things, I found out that what is producing the error is the funcion APEX_UTIL.PREPARE_URL. If I comment this part in the function, the error does not appear (but I need it for loading a checksum-protected page).

Also, I've noticed that adding any item on "Items to Submit" field in the region make the error appears always, even whenrefresh is triggered.

I don't really understand what is happening here, and debugging does not give me any hints. Anyone can explain?

The funcion APEX_UTIL.PREPARE_URL returns HTML escaped characters (because the link it produces opens a modal, and generates the javascripts code).

I show you the query:

-- The function (in a PKG)
function get_fotos_art_listagg(p_app_id in number, p_session in number, p_id_art in number) return clob is
  v_ret clob := '';
  for f in (
    select id_foto, nom_foto, nom_fichero_actual, orden
      from ...
     where id_art = p_id_art
     order by orden asc 
  ) loop
    v_ret := v_ret || '<a href="'||apex_util.prepare_url('f?p='||p_app_id||':7:'||p_session||'::NO::P7_ID_FOTO,P7_ID_ART:'||f.id_foto||','||p_id_art)||'"><img src="'||apex_app_setting.get_value('URL_FOTOS')||f.nom_fichero_actual||'" title="'||f.nom_foto||' ('||f.orden||')" height="64"/></a><span aria-hidden="true" class="fa fa-times-square c_rem_foto" data-id="'||p_id_art||':'||f.id_foto||'" title="Quitar foto del artículo"></span>';
  end loop;
  return v_ret||'<div style="display: inline;"><a href="'||apex_util.prepare_url('f?p='||p_app_id||':8:'||p_session||'::NO::P8_ID_ART:'||p_id_art)||'"><span aria-hidden="true" class="fa fa-plus-circle-o c_add_foto" data-id="'||p_id_art||'" style="'||case when length(v_ret) > 0 then 'top: 26px;' end ||'" title="Añadir foto"></span></a></div>';
end get_fotos_art_listagg;

-- The IR query
select ID_ART,
       PKG.get_fotos_art_listagg(p_app_id => :APP_ID, p_session => :APP_SESSION, p_id_art => id_art) fotos
  from XXMAX_ART_V   

Error full stack trace is:

Error Stack: ORA-06502: PL/SQL: error : la forma de la matriz asociativa no es consistente con los parámetros de la sesión numérico o de valor
Backtrace: ORA-06512: en "APEX_190200.WWV_FLOW_DYNAMIC_EXEC", línea 1222
ORA-06512: en "APEX_190200.WWV_FLOW_EXEC_LOCAL", línea 403
ORA-06512: en "APEX_190200.WWV_FLOW_EXEC_LOCAL", línea 617
ORA-06512: en "APEX_190200.WWV_FLOW_EXEC_LOCAL", línea 747
ORA-06512: en "APEX_190200.WWV_FLOW_EXEC_LOCAL", línea 792
ORA-06512: en "APEX_190200.WWV_FLOW_EXEC_LOCAL", línea 1335
ORA-06512: en "APEX_190200.WWV_FLOW_EXEC", línea 2478
ORA-06512: en "APEX_190200.WWV_FLOW_EXEC", línea 2171
ORA-06512: en "APEX_190200.WWV_FLOW_IR_RENDER", línea 6703
ORA-06512: en "APEX_190200.WWV_FLOW_IR_RENDER", línea 12908

Any comment will be appreciated,


Sign In or Register to comment.