Oracle Error 21560
CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in XML DB All PlacesDatabasePerformance & AvailabilityXML DB This discussion is archived 8 Replies Latest reply on Sep 16, 2010 3:32 PM by FlorianW. ORA-21560: argument is null, invalid, or out of range vikram byali Jun 25, 2009 9:27 AM Hi All. I am getting the error followed by the code below. I am trying to generate the XML file using DBMS_XMLDOM Package. ********************************************************* DECLARE v_DOMDoc DBMS_XMLDOM.DOMDocument; v_MainNode DBMS_XMLDOM.DOMNode; v_RootElem DBMS_XMLDOM.DOMElement; v_RootNode DBMS_XMLDOM.DOMNode; counter INTEGER; total_size INTEGER; v_id table.ID%TYPE; v_temp_id table.TEMP_ID%TYPE; v_created_by table.CREATED_BY%TYPE; CURSOR class_cur IS SELECT ID,TEMP_ID,CREATED_BY FROM table WHERE column like 'Post%'; BEGIN counter := 0; SELECT COUNT(1) INTO total_size FROM table WHERE custom2 like 'Post%'; v_DOMDoc := DBMS_XMLDOM.newDOMDocument(); v_MainNode := DBMS_XMLDOM.makeNode(v_DOMDoc); v_RootElem := DBMS_XMLDOM.createElement(v_DOMDoc, 'classes'); v_RootNode := DBMS_XMLDOM.appendChild(v_MainNode, DBMS_XMLDOM.makeNode(v_RootElem) ); OPEN class_cur; LOOP FETCH class_cur INTO v_id, v_offerng_temp_id, v_created_by; counter := counter + 1; v_CustElem := DBMS_XMLDOM.createElement(v_DOMDoc, 'class'); v_CustNode := DBMS_XMLDOM.appendChild(v_RootNode, DBMS_XMLDOM.makeNode(v_CustElem)); DBMS_XMLDOM.setAttribute(v_CustElem, 'xid', v_id); DBMS_XMLDOM.setAttribute(v_CustElem, 'sd', v_temp_id); DBMS_XMLDOM.setAttribute(v_CustElem, 'xloc', v_created_by); DBMS_XMLDOM.writeToFile(v_DOMDoc, '/xxx/yyy/zzz/test.xml'); IF counter = total_size THEN EXIT; END IF; END LOOP; CLOSE C1; END; / ********************************************************* ORA-21560: argument is null, invalid, or out of range ORA-06512: at "SYS.DBMS_LOB", line 715 ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 64 ORA-06512: at "XDB.DBMS_XMLDOM", line 4306 ORA-06512: at line 35 Is there any alternative to writetofile() method (to get the data from DBMS_XMLDOM.DomDocument object to a file)? I thin
Navigator E-mail to friend CLOB Error ORA-21560: argument 2 is null, invalid, or out of range [message #591748] Wed, 31 July 2013 08:13 oraclesqluser Messages: 17Registered: June 2013 Junior Member Hi Champs I am receiving following error in the below provided procedure Oracle Verion details: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production PL/SQL Release 11.2.0.3.0 - Production CORE 11.2.0.3.0 Production TNS for HPUX: Version 11.2.0.3.0 - Production NLSRTL Version 11.2.0.3.0 - Production Error:ORA-21560: https://community.oracle.com/thread/922064 argument 2 is null, invalid, or out of range Anaysis :As per my analysis the procedure fetches a clob attachement as input while processing it using dbms_lob.read (inside this procedure) some intermediate buffer value has gone out of range and error is being thrown.As per me it is n_clob_pos vraiable value .Could you please let me whether http://www.orafaq.com/forum/t/188873/ it is right or help in detecting the correct variable causing this error .Please provide your valuable comments for resolving it PROCEDURE add_attachment_contents_test( p_in_smtp_connection IN UTL_SMTP.CONNECTION, p_in_clob_attach IN CLOB, p_out_status OUT NUMBER, p_out_err_desc OUT VARCHAR2 ) IS C_CR CONSTANT VARCHAR2(1) := CHR(13); n_clob_len NUMBER := 0; n_cr_pos NUMBER := 0; n_clob_pos NUMBER := 1; n_clob_line NUMBER := 0; vc_clob_line VARCHAR2(32767) := NULL; vc_err_reas VARCHAR2(100) := NULL; b_content_to_process BOOLEAN := TRUE; smtp_connection UTL_SMTP.CONNECTION; C_MODULE_NAME CONSTANT VARCHAR2(50) := 'add_attachment_contents'; null_value_exp EXCEPTION; BEGIN faa_smtp_mail_pkg.debug( '<< INTO ' || C_MODULE_NAME || ' >>' ); IF p_in_clob_attach IS NULL THEN vc_err_reas := 'p_in_clob_attach is NULL'; RAISE null_value_exp; END IF; smtp_connection := p_in_smtp_connection; /* Determine the length of the CLOB */ n_clob_len := DBMS_LOB.GETLENGTH( p_in_clob_attach ); /* If the clob length is zero, nothing to process */ IF n_clob_len = 0 THEN b_content_to_process := FALSE; END IF; <
OF CHARS: ORA-21560: ARGUMENT 2 IS NULL, INVALID, OR OUT OF RANGE Subscribe You can track all active APARs http://www.ibm.com/support/docview.wss?uid=swg1IZ04968 for this component. APAR status Closed as program error. Error description Impact 4.0 Unable insert large string into oracle datatype that has a field CLOB type has a field CLOB type. Customer would like to be an to exceed the current value of 4000 characters during updates and 32000 character during inserts. Local fix There is no work oracle error around at this time. Problem summary **************************************************************** * USERS AFFECTED: All Impact Users who are using Oracle DSA * * with CLOB field * **************************************************************** * PROBLEM DESCRIPTION: ORACLE ERROR WHEN INSERTING CLOB FIELD * * WITH LARGE NUMBER OF CHARS: ORA-21560: * * ARGUMENT 2 IS NULL, INVALID, OR OUT OF * * RANGE * **************************************************************** * RECOMMENDATION: oracle error 21560 * * * **************************************************************** Steps to replicate: 1) Configure Impact Server and create Oracle DSA 2) Create Data Type for table that contains CLOB Field 3) Insert large string (>32000 chars) into clob field 4) View the Data item in Impact 5) Create a policy to query the current data including the CLOB field, and then insert it into the table nodes=GetByFilter('DataType_Name','filter',false); oldValue=nodes 0 .CLOB_FIELD_NAME; item=NewObject(); item.CLOB_FIELD_NAME=oldValue + ANY OTHER STRING; item.KeyField=