Oracle Message SQL-02143 - Target object has not been properly allocated

ERRORTarget object has not been properly allocated
CAUSEAn attempt was made to retrieve elements from a collection into an unallocated object pointer.
ACTIONAllocate the object pointer with the EXEC SQL ALLOCATE statement.