Menu

#1 Exception "ORA-29261: bad argument" in base64_decode

open
nobody
None
5
2012-03-05
2012-03-05
psylem
No

This error occurred when attempting to unwrap one package in particular...
ORA-29261: bad argument
ORA-06512: at "SYS.UTL_ENCODE", line 29
ORA-06512: at "SYS.UTL_ENCODE", line 251
ORA-06512: at "SYS.KT_UNWRAP", line 125
ORA-06512: at "SYS.KT_UNWRAP", line 174
ORA-06512: at "SYS.KT_UNWRAP", line 225
ORA-06512: at "SYS.KT_UNWRAP", line 237
ORA-06512: at line 1
29261. 00000 - "bad argument"
*Cause: A bad argument was passed to the PL/SQL API.
*Action: Check the arguments passed to the PL/SQL API and retry the call.

Looks like it's possible for x(i) to be null in base64_decode function, and this was causing utl_encode.base64_decode to throw this exception. As a workaround I just wrapped the call to utl_encode.base64_decode with "if x(i) is not null then" and kt_unwrap appears to unwrap the package fine.

Discussion


Log in to post a comment.