Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Collection of Oracle objects ORA-06531

Collection of Oracle objects ORA-06531

From: Chuck Clifford <ccliffor_at_ix.netcom.com>
Date: Wed, 13 Dec 2000 19:33:36 -0500
Message-ID: <919479$vjo$1@slb6.atl.mindspring.net>

I used JDeveloper to generate custom classes for an Oracle package. In that package, a function returns an array (of Oracle objects). JDeveloper created the custom class for the package(sitepkg.sqlj), and 3 additional custom classes to support the referenced Oracle object collections(Physicallocobj.sqlj - this is the Oracle object; PhysicallocobjRef.java; Physicallocobjtbl.java - this is the collection of the Oracle object).
I import the files into my program:

import DBAInfo1.sitepkg;
import DBAInfo1.Physicallocobj;
import DBAInfo1.PhysicallocobjRef;
import DBAInfo1.Physicallocobjtbl;

I declare the corresponding variables:
public static sitepkg SiteDBI = null;
public static Physicallocobjtbl SiteList = null;

I initialize the variables:
SiteDBI = new sitepkg();
SiteList = new Physicallocobjtbl();

And when I invoke a method of the SiteDBI object, the ORA-06531 error is raised
SiteList = SiteDBI.ListSites();

The error message is as follows:

)RA-06531: Reference to uninitialized collection
ORA-06512: at "WEBDEVADMIN.SITEPKG", line 81
ORA-06512: at line 1

The method definition for ListSites is as follows:

public Physicallocobjtbl ListSites ()
throws SQLException
{
Physicallocobjtbl __jPt_result;
#sql [_ctx] __jPt_result = { VALUES(SITEPKG.FLISTSITES()) }; return __jPt_result;
}

How does one correctly initialize the collection? Received on Wed Dec 13 2000 - 18:33:36 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US