ORA-22275: invalid LOB locator specified

Posted on 2006-04-24
Last Modified: 2011-10-03
Hi All,

I am a newbie to the PL/SQL area. I am trying to generate the XML for a record to insert the data into an audit trail for the table. To do so, I declared a string for VARCHAR2(4000) and it was working fine until the data increased the limit due to a field comments (which itself is VARCHAR2(4000)).

To increase the limit, I changed the type to CLOB and ever since my code has stopped working,

The following is a section of the code that I am using to get the data:

GET_CHANGE_LOG_USERS :=  '<Transaction type="insert">'  || CHR(10) ||
                                                  '<Field value="LOGON_ID">'  || CHR(10) ||
                                                  '<OldValue/>'  || CHR(10) ||
                                                  '<NewValue>'  ||
                                             GET_Record.LOGONID ||
                                                  '</NewValue>'  || CHR(10) ||
                                                  '</Field>'  || CHR(10) ||
                                                  '<Field value="ROLE">'  || CHR(10) ||
                                                  '<OldValue/>'  || CHR(10) ||
                                                  '<NewValue>' ||   GET_ROLE_CD  ||
                                                  '</NewValue>'  || CHR(10) ||
                                                  '</Field>'  || CHR(10) ||

There are a copule of more fields..
         '<Field value="COMMENTS">'  || CHR(10) ||
                                                  '<OldValue/>'  || CHR(10) ||
                                                  '<NewValue>'  ||
                                                  '</NewValue>'  || CHR(10) ||


I have been bugging my head around for last 4 days trying to get a solution to this by myself and copule of other collegues of mine, but no success........

Your help will be very much appricaited...
Rohit Arora
Question by:RohitArora
    LVL 4

    Accepted Solution

    Cause: There are several causes:

    The LOB locator was never initialized

    The locator is for a BFILE and the routine expects a BLOB/CLOB/NCLOB locator

    The locator is for a BLOB/CLOB/NCLOB and the routine expects a BFILE locator

    Trying to update the LOB in a trigger body -- LOBs in trigger bodies are read-only

    The locator is for a BFILE/BLOB and the routine expects a CLOB/NCLOB locator

    The locator is for a CLOB/NCLOB and the routine expects a BFILE/BLOB locator

      Action: For (1), initialize the LOB locator by selecting into the locator variable or by setting the LOB locator to empty. For (2),(3), (5), and (6),pass the correct type of locator into the routine. For (4), remove the trigger body code that updates the LOB value.  

    Author Comment


    Thanks for comments.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Introduction After workin in a plethora of programming languages like C, Pro*C, ESQL/C, C++, VC++, VB, Java, HTML,JavaScipt etc, technologies and frameworks like JSP, Servlets, Struts, Spring, IBatis etc and databases like MS Access, SQLServer, Inf…
    I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now