title: ORA-06531 after Oracle upgrade
body: <p>I upgraded my database from <strong>Oracle 10</strong> to <strong>11.2</strong>. The problem I face is that my geometry in tables don't work any more. My SQL is: </p>
  
  <pre><code>Select 
     GEOMETRYID, COORDCOUNT, CREATIONDATE, QUALITYID,       
    SDO_UTIL.TO_WKTGEOMETRY(SDO_CS.TRANSFORM(SDO_UTIL.SIMPLIFY(GEOMETRY, 1, 0.0000005), 27700)) as "WKT" 
  FROM 
     NWKGEOMETRY 
  WHERE 
     DELETIONDATE IS NULL;  
     AND SDO_GEOMETRY.GET_GTYPE(GEOMETRY)=2 AND SDO_UTIL.GETNUMVERTICES(GEOMETRY)&gt;2;
  </code></pre>
  
  <p>and I get an error:</p>
  
  <blockquote>
    <p>ORA-06531: Reference to uninitialized collection</p>
  </blockquote>
  
  <p>If I remove <code>TRANSFORM</code> function then all works fine. What could be wrong?</p>