Sdo_geor.mosaic ends with ORA-06531
I'm using Oracle 11g R1, and try the enhanced mosaic function, but i always get this error.
ORA-06531: Reference to uninitialized collection
The SQL:
DECLARE
gr sdo_georaster;
BEGIN
INSERT INTO LGVHH05 (id, georaster) VALUES (1, sdo_geor.init('LGVHH05_RDT')) RETURNING georaster INTO gr;
sdo_geor.mosaic('LGVHH05_TILE', 'GEORASTER', gr, 'blocksize=(1024,1024,3)');
UPDATE LGVHH05 SET georaster=gr WHERE id=1;
END;
I'm wondering what collection this could be?
The GeoRaster objects are valid and have the same SRID.
thanks so far, here is the metadata:
GEORASTER.METADATA
<georasterMetadata xmlns="http://xmlns.oracle.com/spatial/georaster">
<objectInfo>
<rasterType>21001</rasterType>
<isBlank>false</isBlank>
<defaultRed>1</defaultRed>
<defaultGreen>2</defaultGreen>
<defaultBlue>3</defaultBlue>
</objectInfo>
<rasterInfo>
<cellRepresentation>UNDEFINED</cellRepresentation>
<cellDepth>8BIT_U</cellDepth>
<totalDimensions>3</totalDimensions>
<dimensionSize type="ROW">
<size>4001</size>
</dimensionSize>
<dimensionSize type="COLUMN">
<size>4001</size>
</dimensionSize>
<dimensionSize type="BAND">
<size>3</size>
</dimensionSize>
<ULTCoordinate>
<row>0</row>
<column>0</column>
<band>0</band>
</ULTCoordinate>
<blocking>
<type>REGULAR</type>
<totalRowBlocks>16</totalRowBlocks>
<totalColumnBlocks>16</totalColumnBlocks>
<rowBlockSize>256</rowBlockSize>
<columnBlockSize>256</columnBlockSize>
</blocking>
<interleaving>BIP</interleaving>
<pyramid>
<type>NONE</type>
</pyramid>
<compression>
<type>NONE</type>
</compression>
</rasterInfo>
<spatialReferenceInfo>
<isReferenced>true</isReferenced>
<isRectified>true</isRectified>
<SRID>31467</SRID>
<spatialResolution dimensionType="X">
<resolution>0.5</resolution>
</spatialResolution>
<spatialResolution dimensionType="Y">
<resolution>0.5</resolution>
</spatialResolution>
<modelCoordinateLocation>CENTER</modelCoordinateLocation>
<modelType>FunctionalFitting</modelType>
<polynomialModel rowOff="0.0" columnOff="0.0" xOff="0.0" yOff="0.0" zOff="0" rowScale="1.0" columnScale="1.0" xScale="1.0" yScale="1.0" zScale="1.0">
<pPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
<polynomialCoefficients>1.1852E7 0.0 -2.0</polynomialCoefficients>
</pPolynomial>
<qPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
<polynomialCoefficients>1.0</polynomialCoefficients>
</qPolynomial>
<rPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
<polynomialCoefficients>-7104000.0 2.0 0.0</polynomialCoefficients>
</rPolynomial>
<sPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
<polynomialCoefficients>1.0</polynomialCoefficients>
</sPolynomial>
</polynomialModel>
</spatialReferenceInfo>
<layerInfo>
<layerDimension>BAND</layerDimension>
</layerInfo>
</georasterMetadata>
Similar Messages
-
OWB Repository creation failed at the end with ORA-01403 & ORA-06512
I got the below error during the OWB Repository Creation on RAC Database which is newly created(11.2.0.3)
=========================================
java.lang.Exception: The workspace user installation failed on user(s):
owb_cdr:
java.lang.Exception: ORA-01403: no data found
ORA-06512: at "OWBSYS.GETROLESTARTED", line 31
ORA-06512: at line 1
=========================================
I was checking this MOM: OWB Design Client Fails to Connect to Repository With ORA-06512: at "OWBSYS.GETROLESTARTED" (Doc ID 1355764.1)
But why this is happening for first time as this is a Fresh database.
Can anyone help on this??? Any workaround for this issue?I got the below error during the OWB Repository Creation on RAC Database which is newly created(11.2.0.3)
=========================================
java.lang.Exception: The workspace user installation failed on user(s):
owb_cdr:
java.lang.Exception: ORA-01403: no data found
ORA-06512: at "OWBSYS.GETROLESTARTED", line 31
ORA-06512: at line 1
=========================================
I was checking this MOM: OWB Design Client Fails to Connect to Repository With ORA-06512: at "OWBSYS.GETROLESTARTED" (Doc ID 1355764.1)
But why this is happening for first time as this is a Fresh database.
Can anyone help on this??? Any workaround for this issue? -
EA3 Why does unit test end with ORA-00904
Database version
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL Developer version
Oracle IDE 4.0.0.12.27
Java(TM) Platform 1.7.0_25
Error message:
An error was encountered performing the requested operation:
ORA-00904: : ugyldig identifikator
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Vendor code 904
Whenever I go into the "Unit Test" modules, create a "Suite," and then click on that Suite, I get the error message.
I get that same error when pulling up a unit test. I am able to run the unit test, it completes successfully, but I also get that same error mentioned above.
The test is calling a simple pl/sql function (returning Hello World). The finction is in the same schema as the user running the test.
Is this is a known bug?
Message was edited by: dori The following message appears in the console: Exception while performing action Run Test java.lang.NullPointerException at oracle.dbtools.unit_test.locking.LockManager.lock(LockManager.java:64) at oracle.dbtools.unit_test.editor.UtEditor.obtainEditLock(UtEditor.java:429) at oracle.dbtools.unit_test.editor.UtTestEditor.updateContent(UtTestEditor.java:135) at oracle.dbtools.unit_test.navigator.UtNavigatorContextMenu.showEditor(UtNavigatorContextMenu.java:2711) at oracle.dbtools.unit_test.navigator.UtNavigatorContextMenu.openElement(UtNavigatorContextMenu.java:2638) at oracle.dbtools.unit_test.navigator.UtNavigatorContextMenu.run(UtNavigatorContextMenu.java:616) at oracle.dbtools.unit_test.navigator.UtNavigatorContextMenu.runTest(UtNavigatorContextMenu.java:577) at oracle.dbtools.unit_test.navigator.UtNavigatorContextMenu.handleEvent(UtNavigatorContextMenu.java:2374) at oracle.ideimpl.controller.MetaClassController.handleEvent(MetaClassController.java:53) at oracle.ide.controller.IdeAction$ControllerDelegatingController.handleEvent(IdeAction.java:1482) at oracle.ide.controller.IdeAction.performAction(IdeAction.java:663) at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:1153) at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:618) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.AbstractButton.doClick(AbstractButton.java:376) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:708) at java.awt.EventQueue$4.run(EventQueue.java:706) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:705) at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169) at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)I'm experiencing the same problem. I've called AppleCare repeatedly for a solutiuon, but I haven't gotten an answer yet and like you above I removed just about anything I could think of. I'd like to start considering third party apps we might have installed that maybe to blame.
Why? Because I installed a fresh copy of Lion onto a Class 10 SD card and then later I turned on full disk encryption there. I no longer experienced the problem after I booted from that card.
I also experienced a problem with full disk encryption with my 2010 MacBook Air sitting doing nothing at the encryption login screen. It spontaneously restarted three times before I turned it off. Later I moved to a 2011 model and did not see the spontaneously restarts again.
Now I'm stuck with this annoying double login. -
I have 105 SDO_GEORASTER (1 band) and want to make a mosaic.
On sdo_geor.mosaic(..., I get an ORA-13497: error with no message.
create or replace view mosaic_create_helper as select * from georaster_1423400 r where prin_id = 8859075304;
DECLARE
gr sdo_georaster;
BEGIN
--init mosaic
INSERT INTO MOSAIC_1423400 (id,prin_id,georaster)
VALUES (-15, -15, sdo_geor.init('MOSAIC_DATA_1423400'))
RETURNING georaster INTO gr;
--create mosaic
sdo_geor.mosaic('mosaic_create_helper', 'GEORASTER', gr, 'blocking=TRUE');
--store mosaic
UPDATE MOSAIC_1423400 SET georaster=gr WHERE id=-15;
commit;
END;
On validating the 105 source SDO_GEORASTER
begin
sdo_geor.validateforMosaic('mosaic_create_helper', 'GEORASTER', 'wma_mosaic_validation_result');
end;
I get:
105 rows processed
TRUEAs suggested I modified the type to: 21001
Then I could create a mosaic without errors.
SDO_GEOR.validateGeoRaster -> TRUE
viewing in mapbuilder: does NOT work (with neither type 21001 nor resetted to 20001):
12.03.2010 17:04:56 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
WARNUNG: JGeoRaster.getRasterImage returned null image.
12.03.2010 17:04:56 oracle.sdovis.MapMaker buildDataMBR
WARNUNG: null MBR resulted from buildDataMBR.
<georasterMetadata xmlns="http://xmlns.oracle.com/spatial/georaster">
<objectInfo>
<rasterType>20001</rasterType>
<isBlank>false</isBlank>
<defaultRed>1</defaultRed>
<defaultGreen>1</defaultGreen>
<defaultBlue>1</defaultBlue>
</objectInfo>
<rasterInfo>
<cellRepresentation>UNDEFINED</cellRepresentation>
<cellDepth>8BIT_U</cellDepth>
<totalDimensions>2</totalDimensions>
<dimensionSize type="ROW">
<size>125000</size>
</dimensionSize>
<dimensionSize type="COLUMN">
<size>187500</size>
</dimensionSize>
<ULTCoordinate>
<row>0</row>
<column>-62500</column>
<band>0</band>
</ULTCoordinate>
<blocking>
<type>REGULAR</type>
<totalRowBlocks>245</totalRowBlocks>
<totalColumnBlocks>367</totalColumnBlocks>
<rowBlockSize>512</rowBlockSize>
<columnBlockSize>512</columnBlockSize>
</blocking>
<interleaving>BIP</interleaving>
<pyramid>
<type>DECREASE</type>
<resampling>BILINEAR</resampling>
<maxLevel>10</maxLevel>
</pyramid>
<compression>
<type>NONE</type>
</compression>
</rasterInfo>
<spatialReferenceInfo>
<isReferenced>true</isReferenced>
<SRID>1423400</SRID>
<modelCoordinateLocation>UPPERLEFT</modelCoordinateLocation>
<modelType>FunctionalFitting</modelType>
<polynomialModel rowOff="0" columnOff="0" xOff="0" yOff="0" zOff="0" rowScale="1" columnScale="1" xScale="1" yScale="1" zScale="1">
<pPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
<polynomialCoefficients>1775000 0 -5</polynomialCoefficients>
</pPolynomial>
<qPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
<polynomialCoefficients>1</polynomialCoefficients>
</qPolynomial>
<rPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
<polynomialCoefficients>-0 5 0</polynomialCoefficients>
</rPolynomial>
<sPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
<polynomialCoefficients>1</polynomialCoefficients>
</sPolynomial>
</polynomialModel>
</spatialReferenceInfo>
<layerInfo>
<layerDimension>BAND</layerDimension>
<subLayer>
<layerNumber>1</layerNumber>
<layerDimensionOrdinate>0</layerDimensionOrdinate>
<layerID>1</layerID>
<colorMap>
<colors>
<cell value="0" blue="255" red="255" green="255" alpha="255"/>
<cell value="1" blue="0" red="0" green="0" alpha="255"/>
<cell value="2" blue="0" red="255" green="0" alpha="255"/>
<cell value="3" blue="0" red="0" green="255" alpha="255"/>
<cell value="4" blue="255" red="255" green="255" alpha="255"/>
<cell value="5" blue="0" red="0" green="0" alpha="255"/>
<cell value="6" blue="0" red="255" green="0" alpha="255"/>
<cell value="7" blue="0" red="0" green="255" alpha="255"/>
<cell value="8" blue="255" red="255" green="255" alpha="255"/>
<cell value="9" blue="0" red="0" green="0" alpha="255"/>
<cell value="10" blue="0" red="255" green="0" alpha="255"/>
<cell value="11" blue="0" red="0" green="255" alpha="255"/>
<cell value="12" blue="255" red="255" green="255" alpha="255"/>
<cell value="13" blue="0" red="0" green="0" alpha="255"/>
<cell value="14" blue="0" red="255" green="0" alpha="255"/>
<cell value="15" blue="0" red="0" green="255" alpha="255"/>
<cell value="16" blue="255" red="255" green="255" alpha="255"/>
<cell value="17" blue="0" red="0" green="0" alpha="255"/>
<cell value="18" blue="0" red="255" green="0" alpha="255"/>
<cell value="19" blue="0" red="0" green="255" alpha="255"/>
<cell value="20" blue="255" red="255" green="255" alpha="255"/>
<cell value="21" blue="0" red="0" green="0" alpha="255"/>
<cell value="22" blue="0" red="255" green="0" alpha="255"/>
<cell value="23" blue="0" red="0" green="255" alpha="255"/>
<cell value="24" blue="255" red="255" green="255" alpha="255"/>
<cell value="25" blue="0" red="0" green="0" alpha="255"/>
<cell value="26" blue="0" red="255" green="0" alpha="255"/>
<cell value="27" blue="0" red="0" green="255" alpha="255"/>
<cell value="28" blue="255" red="255" green="255" alpha="255"/>
<cell value="29" blue="0" red="0" green="0" alpha="255"/>
<cell value="30" blue="0" red="255" green="0" alpha="255"/>
<cell value="31" blue="0" red="0" green="255" alpha="255"/>
<cell value="32" blue="255" red="255" green="255" alpha="255"/>
<cell value="33" blue="0" red="0" green="0" alpha="255"/>
<cell value="34" blue="0" red="255" green="0" alpha="255"/>
<cell value="35" blue="0" red="0" green="255" alpha="255"/>
<cell value="36" blue="255" red="255" green="255" alpha="255"/>
<cell value="37" blue="0" red="0" green="0" alpha="255"/>
<cell value="38" blue="0" red="255" green="0" alpha="255"/>
<cell value="39" blue="0" red="0" green="255" alpha="255"/>
<cell value="40" blue="255" red="255" green="255" alpha="255"/>
<cell value="41" blue="0" red="0" green="0" alpha="255"/>
<cell value="42" blue="0" red="255" green="0" alpha="255"/>
<cell value="43" blue="0" red="0" green="255" alpha="255"/>
<cell value="44" blue="255" red="255" green="255" alpha="255"/>
<cell value="45" blue="0" red="0" green="0" alpha="255"/>
<cell value="46" blue="0" red="255" green="0" alpha="255"/>
<cell value="47" blue="0" red="0" green="255" alpha="255"/>
<cell value="48" blue="255" red="255" green="255" alpha="255"/>
<cell value="49" blue="0" red="0" green="0" alpha="255"/>
<cell value="50" blue="0" red="255" green="0" alpha="255"/>
<cell value="51" blue="0" red="0" green="255" alpha="255"/>
<cell value="52" blue="255" red="255" green="255" alpha="255"/>
<cell value="53" blue="0" red="0" green="0" alpha="255"/>
<cell value="54" blue="0" red="255" green="0" alpha="255"/>
<cell value="55" blue="0" red="0" green="255" alpha="255"/>
<cell value="56" blue="255" red="255" green="255" alpha="255"/>
<cell value="57" blue="0" red="0" green="0" alpha="255"/>
<cell value="58" blue="0" red="255" green="0" alpha="255"/>
<cell value="59" blue="0" red="0" green="255" alpha="255"/>
<cell value="60" blue="255" red="255" green="255" alpha="255"/>
<cell value="61" blue="0" red="0" green="0" alpha="255"/>
<cell value="62" blue="0" red="255" green="0" alpha="255"/>
<cell value="63" blue="0" red="0" green="255" alpha="255"/>
<cell value="64" blue="255" red="255" green="255" alpha="255"/>
<cell value="65" blue="0" red="0" green="0" alpha="255"/>
<cell value="66" blue="0" red="255" green="0" alpha="255"/>
<cell value="67" blue="0" red="0" green="255" alpha="255"/>
<cell value="68" blue="255" red="255" green="255" alpha="255"/>
<cell value="69" blue="0" red="0" green="0" alpha="255"/>
<cell value="70" blue="0" red="255" green="0" alpha="255"/>
<cell value="71" blue="0" red="0" green="255" alpha="255"/>
<cell value="72" blue="255" red="255" green="255" alpha="255"/>
<cell value="73" blue="0" red="0" green="0" alpha="255"/>
<cell value="74" blue="0" red="255" green="0" alpha="255"/>
<cell value="75" blue="0" red="0" green="255" alpha="255"/>
<cell value="76" blue="255" red="255" green="255" alpha="255"/>
<cell value="77" blue="0" red="0" green="0" alpha="255"/>
<cell value="78" blue="0" red="255" green="0" alpha="255"/>
<cell value="79" blue="0" red="0" green="255" alpha="255"/>
<cell value="80" blue="255" red="255" green="255" alpha="255"/>
<cell value="81" blue="0" red="0" green="0" alpha="255"/>
<cell value="82" blue="0" red="255" green="0" alpha="255"/>
<cell value="83" blue="0" red="0" green="255" alpha="255"/>
<cell value="84" blue="255" red="255" green="255" alpha="255"/>
<cell value="85" blue="0" red="0" green="0" alpha="255"/>
<cell value="86" blue="0" red="255" green="0" alpha="255"/>
<cell value="87" blue="0" red="0" green="255" alpha="255"/>
<cell value="88" blue="255" red="255" green="255" alpha="255"/>
<cell value="89" blue="0" red="0" green="0" alpha="255"/>
<cell value="90" blue="0" red="255" green="0" alpha="255"/>
<cell value="91" blue="0" red="0" green="255" alpha="255"/>
<cell value="92" blue="255" red="255" green="255" alpha="255"/>
<cell value="93" blue="0" red="0" green="0" alpha="255"/>
<cell value="94" blue="0" red="255" green="0" alpha="255"/>
<cell value="95" blue="0" red="0" green="255" alpha="255"/>
<cell value="96" blue="255" red="255" green="255" alpha="255"/>
<cell value="97" blue="0" red="0" green="0" alpha="255"/>
<cell value="98" blue="0" red="255" green="0" alpha="255"/>
<cell value="99" blue="0" red="0" green="255" alpha="255"/>
<cell value="100" blue="255" red="255" green="255" alpha="255"/>
<cell value="101" blue="0" red="0" green="0" alpha="255"/>
<cell value="102" blue="0" red="255" green="0" alpha="255"/>
<cell value="103" blue="0" red="0" green="255" alpha="255"/>
<cell value="104" blue="255" red="255" green="255" alpha="255"/>
<cell value="105" blue="0" red="0" green="0" alpha="255"/>
<cell value="106" blue="0" red="255" green="0" alpha="255"/>
<cell value="107" blue="0" red="0" green="255" alpha="255"/>
<cell value="108" blue="255" red="255" green="255" alpha="255"/>
<cell value="109" blue="0" red="0" green="0" alpha="255"/>
<cell value="110" blue="0" red="255" green="0" alpha="255"/>
<cell value="111" blue="0" red="0" green="255" alpha="255"/>
<cell value="112" blue="255" red="255" green="255" alpha="255"/>
<cell value="113" blue="0" red="0" green="0" alpha="255"/>
<cell value="114" blue="0" red="255" green="0" alpha="255"/>
<cell value="115" blue="0" red="0" green="255" alpha="255"/>
<cell value="116" blue="255" red="255" green="255" alpha="255"/>
<cell value="117" blue="0" red="0" green="0" alpha="255"/>
<cell value="118" blue="0" red="255" green="0" alpha="255"/>
<cell value="119" blue="0" red="0" green="255" alpha="255"/>
<cell value="120" blue="255" red="255" green="255" alpha="255"/>
<cell value="121" blue="0" red="0" green="0" alpha="255"/>
<cell value="122" blue="0" red="255" green="0" alpha="255"/>
<cell value="123" blue="0" red="0" green="255" alpha="255"/>
<cell value="124" blue="255" red="255" green="255" alpha="255"/>
<cell value="125" blue="0" red="0" green="0" alpha="255"/>
<cell value="126" blue="0" red="255" green="0" alpha="255"/>
<cell value="127" blue="0" red="0" green="255" alpha="255"/>
<cell value="128" blue="255" red="255" green="255" alpha="255"/>
<cell value="129" blue="0" red="0" green="0" alpha="255"/>
<cell value="130" blue="0" red="255" green="0" alpha="255"/>
<cell value="131" blue="0" red="0" green="255" alpha="255"/>
<cell value="132" blue="255" red="255" green="255" alpha="255"/>
<cell value="133" blue="0" red="0" green="0" alpha="255"/>
<cell value="134" blue="0" red="255" green="0" alpha="255"/>
<cell value="135" blue="0" red="0" green="255" alpha="255"/>
<cell value="136" blue="255" red="255" green="255" alpha="255"/>
<cell value="137" blue="0" red="0" green="0" alpha="255"/>
<cell value="138" blue="0" red="255" green="0" alpha="255"/>
<cell value="139" blue="0" red="0" green="255" alpha="255"/>
<cell value="140" blue="255" red="255" green="255" alpha="255"/>
<cell value="141" blue="0" red="0" green="0" alpha="255"/>
<cell value="142" blue="0" red="255" green="0" alpha="255"/>
<cell value="143" blue="0" red="0" green="255" alpha="255"/>
<cell value="144" blue="255" red="255" green="255" alpha="255"/>
<cell value="145" blue="0" red="0" green="0" alpha="255"/>
<cell value="146" blue="0" red="255" green="0" alpha="255"/>
<cell value="147" blue="0" red="0" green="255" alpha="255"/>
<cell value="148" blue="255" red="255" green="255" alpha="255"/>
<cell value="149" blue="0" red="0" green="0" alpha="255"/>
<cell value="150" blue="0" red="255" green="0" alpha="255"/>
<cell value="151" blue="0" red="0" green="255" alpha="255"/>
<cell value="152" blue="255" red="255" green="255" alpha="255"/>
<cell value="153" blue="0" red="0" green="0" alpha="255"/>
<cell value="154" blue="0" red="255" green="0" alpha="255"/>
<cell value="155" blue="0" red="0" green="255" alpha="255"/>
<cell value="156" blue="255" red="255" green="255" alpha="255"/>
<cell value="157" blue="0" red="0" green="0" alpha="255"/>
<cell value="158" blue="0" red="255" green="0" alpha="255"/>
<cell value="159" blue="0" red="0" green="255" alpha="255"/>
<cell value="160" blue="255" red="255" green="255" alpha="255"/>
<cell value="161" blue="0" red="0" green="0" alpha="255"/>
<cell value="162" blue="0" red="255" green="0" alpha="255"/>
<cell value="163" blue="0" red="0" green="255" alpha="255"/>
<cell value="164" blue="255" red="255" green="255" alpha="255"/>
<cell value="165" blue="0" red="0" green="0" alpha="255"/>
<cell value="166" blue="0" red="255" green="0" alpha="255"/>
<cell value="167" blue="0" red="0" green="255" alpha="255"/>
<cell value="168" blue="255" red="255" green="255" alpha="255"/>
<cell value="169" blue="0" red="0" green="0" alpha="255"/>
<cell value="170" blue="0" red="255" green="0" alpha="255"/>
<cell value="171" blue="0" red="0" green="255" alpha="255"/>
<cell value="172" blue="255" red="255" green="255" alpha="255"/>
<cell value="173" blue="0" red="0" green="0" alpha="255"/>
<cell value="174" blue="0" red="255" green="0" alpha="255"/>
<cell value="175" blue="0" red="0" green="255" alpha="255"/>
<cell value="176" blue="255" red="255" green="255" alpha="255"/>
<cell value="177" blue="0" red="0" green="0" alpha="255"/>
<cell value="178" blue="0" red="255" green="0" alpha="255"/>
<cell value="179" blue="0" red="0" green="255" alpha="255"/>
<cell value="180" blue="255" red="255" green="255" alpha="255"/>
<cell value="181" blue="0" red="0" green="0" alpha="255"/>
<cell value="182" blue="0" red="255" green="0" alpha="255"/>
<cell value="183" blue="0" red="0" green="255" alpha="255"/>
<cell value="184" blue="255" red="255" green="255" alpha="255"/>
<cell value="185" blue="0" red="0" green="0" alpha="255"/>
<cell value="186" blue="0" red="255" green="0" alpha="255"/>
<cell value="187" blue="0" red="0" green="255" alpha="255"/>
<cell value="188" blue="255" red="255" green="255" alpha="255"/>
<cell value="189" blue="0" red="0" green="0" alpha="255"/>
<cell value="190" blue="0" red="255" green="0" alpha="255"/>
<cell value="191" blue="0" red="0" green="255" alpha="255"/>
<cell value="192" blue="255" red="255" green="255" alpha="255"/>
<cell value="193" blue="0" red="0" green="0" alpha="255"/>
<cell value="194" blue="0" red="255" green="0" alpha="255"/>
<cell value="195" blue="0" red="0" green="255" alpha="255"/>
<cell value="196" blue="255" red="255" green="255" alpha="255"/>
<cell value="197" blue="0" red="0" green="0" alpha="255"/>
<cell value="198" blue="0" red="255" green="0" alpha="255"/>
<cell value="199" blue="0" red="0" green="255" alpha="255"/>
<cell value="200" blue="255" red="255" green="255" alpha="255"/>
<cell value="201" blue="0" red="0" green="0" alpha="255"/>
<cell value="202" blue="0" red="255" green="0" alpha="255"/>
<cell value="203" blue="0" red="0" green="255" alpha="255"/>
<cell value="204" blue="255" red="255" green="255" alpha="255"/>
<cell value="205" blue="0" red="0" green="0" alpha="255"/>
<cell value="206" blue="0" red="255" green="0" alpha="255"/>
<cell value="207" blue="0" red="0" green="255" alpha="255"/>
<cell value="208" blue="255" red="255" green="255" alpha="255"/>
<cell value="209" blue="0" red="0" green="0" alpha="255"/>
<cell value="210" blue="0" red="255" green="0" alpha="255"/>
<cell value="211" blue="0" red="0" green="255" alpha="255"/>
<cell value="212" blue="255" red="255" green="255" alpha="255"/>
<cell value="213" blue="0" red="0" green="0" alpha="255"/>
<cell value="214" blue="0" red="255" green="0" alpha="255"/>
<cell value="215" blue="0" red="0" green="255" alpha="255"/>
<cell value="216" blue="255" red="255" green="255" alpha="255"/>
<cell value="217" blue="0" red="0" green="0" alpha="255"/>
<cell value="218" blue="0" red="255" green="0" alpha="255"/>
<cell value="219" blue="0" red="0" green="255" alpha="255"/>
<cell value="220" blue="255" red="255" green="255" alpha="255"/>
<cell value="221" blue="0" red="0" green="0" alpha="255"/>
<cell value="222" blue="0" red="255" green="0" alpha="255"/>
<cell value="223" blue="0" red="0" green="255" alpha="255"/>
<cell value="224" blue="255" red="255" green="255" alpha="255"/>
<cell value="225" blue="0" red="0" green="0" alpha="255"/>
<cell value="226" blue="0" red="255" green="0" alpha="255"/>
<cell value="227" blue="0" red="0" green="255" alpha="255"/>
<cell value="228" blue="255" red="255" green="255" alpha="255"/>
<cell value="229" blue="0" red="0" green="0" alpha="255"/>
<cell value="230" blue="0" red="255" green="0" alpha="255"/>
<cell value="231" blue="0" red="0" green="255" alpha="255"/>
<cell value="232" blue="255" red="255" green="255" alpha="255"/>
<cell value="233" blue="0" red="0" green="0" alpha="255"/>
<cell value="234" blue="0" red="255" green="0" alpha="255"/>
<cell value="235" blue="0" red="0" green="255" alpha="255"/>
<cell value="236" blue="255" red="255" green="255" alpha="255"/>
<cell value="237" blue="0" red="0" green="0" alpha="255"/>
<cell value="238" blue="0" red="255" green="0" alpha="255"/>
<cell value="239" blue="0" red="0" green="255" alpha="255"/>
<cell value="240" blue="255" red="255" green="255" alpha="255"/>
<cell value="241" blue="0" red="0" green="0" alpha="255"/>
<cell value="242" blue="0" red="255" green="0" alpha="255"/>
<cell value="243" blue="0" red="0" green="255" alpha="255"/>
<cell value="244" blue="255" red="255" green="255" alpha="255"/>
<cell value="245" blue="0" red="0" green="0" alpha="255"/>
<cell value="246" blue="0" red="255" green="0" alpha="255"/>
<cell value="247" blue="0" red="0" green="255" alpha="255"/>
<cell value="248" blue="255" red="255" green="255" alpha="255"/>
<cell value="249" blue="0" red="0" green="0" alpha="255"/>
<cell value="250" blue="0" red="255" green="0" alpha="255"/>
<cell value="251" blue="0" red="0" green="255" alpha="255"/>
<cell value="252" blue="255" red="255" green="255" alpha="255"/>
<cell value="253" blue="0" red="0" green="0" alpha="255"/>
<cell value="254" blue="0" red="255" green="0" alpha="255"/>
<cell value="255" blue="0" red="0" green="255" alpha="255"/>
</colors>
</colorMap>
</subLayer>
</layerInfo>
</georasterMetadata> -
How to deal with error ORA-06531 for collection
All,
Can anybody see anything wrong with my code below. As far as I can see everything is in order but I am getting the ORA-06531 error.
Thanks in advance
CREATE OR REPLACE
Type T_PREO_PRIV is Object
PRIVILEGE_ID NUMBER(10),
PRIVILEGE_NAME VARCHAR2(20),
PRIVILEGE_TYPE CHAR(1))
CREATE OR REPLACE
TYPE T_PRIVInfo IS TABLE OF PREORDER.
T_PREO_PRIV
SQL> CREATE OR REPLACE Procedure PREORDER.P_GetUserPrivlegetest(Userid in number, UserPriv out T_PRI
VInfo, status out number)
2 as
3 V_UserPriv T_PRIVInfo;
4 begin
5 select T_PREO_PRIV(preo_priv.privilege_id, PRIVILEGE_NAME, PRIVILEGE_TYPE)
6 BULK COLLECT INTO V_UserPriv
7 from preo_user_role, preo_role_priv, preo_priv
8 where preo_user_role.role_id = preo_role_priv.role_id
9 and preo_role_priv.privilege_id = preo_priv.privilege_id
10 and user_id = Userid;
11
12 V_UserPriv := UserPriv;
13
14 status := 0;
15
16 EXCEPTION
17 WHEN OTHERS THEN
18
19 Status := -1;
20 end;
21 /
Procedure created.
SQL>
SQL> DECLARE
2 profile_info T_PRIVInfo;
3 Status smallint;
4 BEGIN
5
6 --preo_security.P_GetUserPrivlege(42, profile_info, status);
7 P_GetUserPrivlegeTest(42, profile_info, status);
8 dbms_output.put_line('P_GetUserPrivlege '||Status);
9 For i in profile_info.FIRST..profile_info.LAST loop
10
11 dbms_output.put_line('******************************* ');
12 -- dbms_output.put_line('privilege_id '||UserPriv(i).privilege_id);
13 -- dbms_output.put_line('privilege_name '||UserPriv(i).privilege_name);
14 -- dbms_output.put_line('privilege_type '||UserPriv(i).privilege_type);
15 end loop;
16
17 END;
18 /
P_GetUserPrivlege -1
DECLARE
ERROR at line 1:
ORA-06531: Reference to uninitialized collection
ORA-06512: at line 9As in your other post, you have these reversed. The line that says
V_UserPriv := UserPriv;
should be
UserPriv := V_UserPriv;
There may also be other errors; I didn't check. -
Ora-13497 during SDO_GEOR.MOSAIC
we are testing sdo_geor.mosaic on 2 georasters but we get this error:
SQL> DECLARE
2 GR SDO_GEORASTER;
3 BEGIN
4 GR := SDO_GEOR.INIT('MO');
5 SDO_GEOR.MOSAIC('GEORASTER_TABLE', 'GEORASTER', GR, NULL);
6 INSERT INTO MO (GEORASTER) VALUES (GR);
7 COMMIT;
8 END;
9 /
DECLARE
ERROR at line 1:
ORA-13497: unable to determine the owner of MO
ORA-06512: at "MDSYS.SDO_GEOR_INT", line 511
ORA-06512: at "MDSYS.SDO_GEOR_INT", line 1225
ORA-06512: at "MDSYS.SDO_GEOR", line 966
ORA-06512: at line 5
The georasters are valid, the metadata of 1 of them:
<georasterMetadata xmlns="http://xmlns.oracle.com/spatial/georaster">
<objectInfo>
<rasterType>21001</rasterType>
<isBlank>false</isBlank>
<defaultRed>1</defaultRed>
<defaultGreen>2</defaultGreen>
<defaultBlue>3</defaultBlue>
</objectInfo>
<rasterInfo>
<cellRepresentation>UNDEFINED</cellRepresentation>
<cellDepth>8BIT_U</cellDepth>
<totalDimensions>3</totalDimensions>
<dimensionSize type="ROW">
<size>5000</size>
</dimensionSize>
<dimensionSize type="COLUMN">
<size>5000</size>
</dimensionSize>
<dimensionSize type="BAND">
<size>3</size>
</dimensionSize>
<ULTCoordinate>
<row>0</row>
<column>0</column>
</ULTCoordinate>
<blocking>
<type>REGULAR</type>
<totalRowBlocks>20</totalRowBlocks>
<totalColumnBlocks>20</totalColumnBlocks>
<rowBlockSize>256</rowBlockSize>
<columnBlockSize>256</columnBlockSize>
</blocking>
<interleaving>BIP</interleaving>
<pyramid>
<type>NONE</type>
</pyramid>
<compression>
<type>NONE</type>
</compression>
</rasterInfo>
<spatialReferenceInfo>
<isReferenced>true</isReferenced>
<isRectified>true</isRectified>
<SRID>262148</SRID>
<spatialResolution dimensionType="X">
<resolution>0.2</resolution>
</spatialResolution>
<spatialResolution dimensionType="Y">
<resolution>0.2</resolution>
</spatialResolution>
<modelCoordinateLocation>CENTER</modelCoordinateLocation>
<modelType>FunctionalFitting</modelType>
<polynomialModel rowOff="0" columnOff="0" xOff="0" yOff="0" zOff="0" rowScale="1" columnScale="1" xScale="1" yScale="1" zScale="1">
<pPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
<polynomialCoefficients>1469999.5 0 -4.999999999999999</polynomialCoefficients>
</pPolynomial>
<qPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
<polynomialCoefficients>1</polynomialCoefficients>
</qPolynomial>
<rPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
<polynomialCoefficients>-805000.5 4.999999999999999 0</polynomialCoefficients>
</rPolynomial>
<sPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
<polynomialCoefficients>1</polynomialCoefficients>
</sPolynomial>
</polynomialModel>
</spatialReferenceInfo>
<layerInfo>
<layerDimension>BAND</layerDimension>
</layerInfo>
</georasterMetadata>
we are using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
So, is there any solution?
Thanks in advance,
Michael.
Edited by: user9529492 on Oct 8, 2008 5:26 PMMichael,
1. have you properly created the RDT table, called "MO"? if not yet, please follow section 3.1 of the GeoRaster guide to do it first.
2. In section 3.2 of the GeoRaster guide, "you must register an initialized GeoRaster object in the GeoRaster system views by inserting the GeoRaster object into a GeoRaster table, and do this before you perform any other operations on the GeoRaster object. Any GeoRaster operations that need to manipulate the raster data table raise an exception if the source or target GeoRaster object is not registered." In other words, you need to INSERT your GR into a physical georaster table FIRST, then retrieve it back into your plsql block, then do sdo_geor.mosaic, then update that GR object in the table. For this, please follow the sample code in the sdo_geor.mosaic in chapter 4.
hope this helps,
Jeffrey -
ORA-06533 during sdo_geor.Mosaic in 11g
I'm trying to mosaic four rasters together. I'm using this call:
sdo_geor.mosaic('MOSAICSOURCE', 'GEORASTER', geor, NULL);
The 4 source rasters are georeferenced, rectified, have the same spatial resolutions and number of bands, and are valid:
SQL> select sdo_geor.getSpatialResolutions(georaster),sdo_geor.getModelSRID(georaster),sdo_geor.isRectified(georaster),sdo_geor.getB
andDimSize(georaster),sdo_geor.validateGeoRaster(georaster) from MOSAICSOURCE;
SDO_GEOR.GETSPATIALRESOLUTIONS(GEORASTER)
SDO_GEOR.GETMODELSRID(GEORASTER)
SDO_GEOR.ISRECTIFIED(GEORASTER)
SDO_GEOR.GETBANDDIMSIZE(GEORASTER)
SDO_GEOR.VALIDATEGEORASTER(GEORASTER)
SDO_NUMBER_ARRAY(.000833333, .000833333)
8192
TRUE
1
TRUE
SDO_NUMBER_ARRAY(.000833333, .000833333)
8192
TRUE
1
TRUE
SDO_NUMBER_ARRAY(.000833333, .000833333)
8192
TRUE
1
TRUE
SDO_NUMBER_ARRAY(.000833333, .000833333)
8192
TRUE
1
TRUE
When displayed in PCI's FreeView app the 4 georasters abutt each other in a square.
The exact error is:
13:30:45 [SELECT - 0 row(s), 0.000 secs] [Error Code: 6533, SQL State: 65000] ORA-06533: Subscript beyond count
ORA-06512: at "MDSYS.SDO_GEOR_INT", line 1082
ORA-06512: at "MDSYS.SDO_GEOR_INT", line 1440
ORA-06512: at "MDSYS.SDO_GEOR", line 1105
ORA-06512: at "GRIM.MOSAIC", line 32 (this is my line of code, above)
I'm using "Oracle Database 11g Release 11.1.0.0.0 - Production".
The metadata for one of the rasters is (the others are similar):
GEORASTER(RASTERTYPE, SPATIALEXTENT(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO
SDO_GEORASTER(20001, SDO_GEOMETRY(2003, 8192, NULL, SDO_ELEM_INFO_ARRAY(1, 1003,
1), SDO_ORDINATE_ARRAY(-104.00042, 40.0004167, -104.00042, 38.9995833, -102.999
58, 38.9995833, -102.99958, 40.0004167, -104.00042, 40.0004167)), 'MOSAICSOURCE_
RDT', 118, XMLTYPE(<georasterMetadata xmlns="http://xmlns.oracle.com/spatial/geo
raster">
<objectInfo>
<rasterType>20001</rasterType>
<isBlank>false</isBlank>
<defaultRed>1</defaultRed>
<defaultGreen>1</defaultGreen>
<defaultBlue>1</defaultBlue>
</objectInfo>
<rasterInfo>
<cellRepresentation>UNDEFINED</cellRepresentation>
<cellDepth>16BIT_S</cellDepth>
<NODATA>-32767</NODATA>
<totalDimensions>2</totalDimensions>
<dimensionSize type="ROW">
<size>1201</size>
</dimensionSize>
<dimensionSize type="COLUMN">
<size>1201</size>
</dimensionSize>
<ULTCoordinate>
<row>0</row>
<column>0</column>
</ULTCoordinate>
<blocking>
<type>NONE</type>
<totalRowBlocks>1</totalRowBlocks>
<totalColumnBlocks>1</totalColumnBlocks>
<rowBlockSize>1201</rowBlockSize>
<columnBlockSize>1201</columnBlockSize>
</blocking>
<interleaving>BIL</interleaving>
<pyramid>
<type>NONE</type>
</pyramid>
<compression>
<type>NONE</type>
</compression>
</rasterInfo>
<spatialReferenceInfo>
<isReferenced>true</isReferenced>
<isRectified>true</isRectified>
<SRID>8192</SRID>
<spatialResolution dimensionType="X">
<resolution>0.000833333333333333</resolution>
</spatialResolution>
<spatialResolution dimensionType="Y">
<resolution>0.000833333333333333</resolution>
</spatialResolution>
<modelCoordinateLocation>UPPERLEFT</modelCoordinateLocation>
<modelType>FunctionalFitting</modelType>
<polynomialModel rowOff="0" columnOff="0" xOff="0" yOff="0" zOff="0" rowScal
e="1" columnScale="1" xScale="1" yScale="1" zScale="1">
<pPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
<polynomialCoefficients>48000.50000000007 0 -1200.000000000001</polynomi
alCoefficients>
</pPolynomial>
<qPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
<polynomialCoefficients>1</polynomialCoefficients>
</qPolynomial>
<rPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
<polynomialCoefficients>124800.5000000004 1200.000000000001 0</polynomia
lCoefficients>
</rPolynomial>
<sPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
<polynomialCoefficients>1</polynomialCoefficients>
</sPolynomial>
</polynomialModel>
</spatialReferenceInfo>
<layerInfo>
<layerDimension>BAND</layerDimension>
<subLayer>
<layerNumber>1</layerNumber>
<layerDimensionOrdinate>0</layerDimensionOrdinate>
<layerID>Not Specified</layerID>
</subLayer>
</layerInfo>
</georasterMetadata>
Any suggestions of where to go from here?
Thanks!
-Bruce BockiusYou're correct, it is 11.1.0.6.0 as shown in the Oracle Installed Products. For some reason my favorite client displays a different version.
-Bruce -
Import failing with ORA 3113 end of file on communication channel error
While doing a schema level import on oracle 9.2.0.6 enterprise edition db, i get IMP 00003 with ORA 3113 error.
The import job fails particularly at one point where it tries to create a view with around 7000 lines.
Now I tried to create this view manually by executing the sql statement and get the same error.
As an another exercise when i pick up just a few lines say first 10 or 15 of the view definition, the view gets created in no time.
So, is there any limitation with Oracle as to how many lines a view can hold or buffer space or something.
Here is the sample code:
create or replace view uix_kana_kanji_c_evw as
select 'EFBC90' as kana_kanji_char from dual
union select 'EFBC91' as kana_kanji_char from dual
union select 'EFBC92' as kana_kanji_char from dual
union select 'EFBC93' as kana_kanji_char from dual
union select 'EFBC94' as kana_kanji_char from dual
union select 'EFBC95' as kana_kanji_char from dual
union select 'EFBC96' as kana_kanji_char from dual
union select 'EFBC97' as kana_kanji_char from dual
union select 'EFBC98' as kana_kanji_char from dual
union select 'EFBC99' as kana_kanji_char from dual
union select 'EFBCA1' as kana_kanji_char from dual
union select 'EFBCA2' as kana_kanji_char from dual
union select 'EFBCA3' as kana_kanji_char from dual
union select 'EFBCA4' as kana_kanji_char from dual
union select 'EFBCA5' as kana_kanji_char from dual
union select 'EFBCA6' as kana_kanji_char from dual
union select 'EFBCA7' as kana_kanji_char from dualORA-3113 is a generic error. The bad news is there are slightly less than a million combination of OS, platform, versions and events that might cause it to happen.
The good news is there should be a message in the alert log whenever this occurs. If you're lucky there may be .TRC file as well (check udump directory as well as bdump). The contents of the file(s) should give you some guidance about what causes it to happen. If you still need help from us you'll need to post some concrete details for us to ponder.
Good luck, APC -
ORA-06531 reference to uninitialized collection in oracle 6i form
Hello,
I am importing data from excel to database table with column mapping (oracle 6i forms)using ole2 package, then calling package
which is having a procedure. while executing the package procedure,
I am getting error 'ora-06531 reference to uninitialized collection' i.e. before for i in 1..in_lData.count
I am working on it but still not getting any solution. There is no problem in coding my form gets compiled but at run time i am getting this error.
And while debugging, data fetched from ole2 package is not passed to for loop of the procedure.
(first of all i am calling ole 2 package, then from ole2 package i am calling my package. procedure)
please help me. My code is this
------------------------------------------------------Ole 2 Package begins-----------------------------------------------------------------
PROCEDURE get_excel IS
APPLICATION OLE2.OBJ_TYPE;
WORKBOOKS OLE2.OBJ_TYPE;
WORKBOOK OLE2.OBJ_TYPE;
WORKSHEETS OLE2.OBJ_TYPE;
WORKSHEET OLE2.OBJ_TYPE;
CELL OLE2.OBJ_TYPE;
CTR NUMBER(12);
COLS NUMBER(2);
CELLVALUE VARCHAR2(89);
C_ROUTE VARCHAR2(255);
V_ROUTE VARCHAR2(1000);
C_TRNDATE VARCHAR2(255);
V_TRNDATE VARCHAR2(1000);
C_TTIME VARCHAR2(255);
V_TTIME VARCHAR2(1000);
C_TID VARCHAR2(255);
V_TID VARCHAR2(1000);
FILENAME VARCHAR2(500);
v_path varchar2(1000):=:path;
ARGS OLE2.OBJ_TYPE;
tDataList PK_EXCEL_TO_DB.tDataList;
BEGIN
:progress:='Please wait...';
SYNCHRONIZE;
--------------INITIATE EXCEL APPLICATION---------------------------
filename := V_PATH;--GET_FILE_NAME('c:\', File_Filter=>'Excel Files (*.xls)|*.xls|'); -- to pick the file
APPLICATION := OLE2.CREATE_OBJ('EXCEL.APPLICATION');
OLE2.SET_PROPERTY(APPLICATION,'VISIBLE','FALSE');
----------------GET WORKBOOKS FROM EXCEL APPLICATION---------------
WORKBOOKS := OLE2.GET_OBJ_PROPERTY(APPLICATION, 'WORKBOOKS');
----------------OPEN REQUIRED WORKBOOK-----------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS, FILENAME);
WORKBOOK := OLE2.GET_OBJ_PROPERTY(WORKBOOKS,'OPEN',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
----------------OPEN REQUIRED WORKSHEET---------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,'Sheet1');
WORKSHEET := OLE2.GET_OBJ_PROPERTY (WORKBOOK,'WORKSHEETS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
----------------GET CELL VALUE-------------------------------------
ctr := 2; --row number
cols := 1; -- column number
FIRST_RECORD;
LOOP
-----------------------COLUMN1-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS); --COLS
OLE2.ADD_ARG(ARGS,1);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_ROUTE := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,1);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_ROUTE := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
-----------------------COLUMN2-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,2);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TRNDATE:= OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,2);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TRNDATE:= OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
-----------------------COLUMN3-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,3);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TTIME := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,3);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TTIME := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
-----------------------COLUMN4-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,4);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TID := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,4);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TID := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
PK_EXCEL_TO_DB.PR_DO_INSERT(tDataList);
EXIT WHEN length(V_Route) = 0 or length(V_Route) is null;
ctr := ctr + 1;
cols := 1;
i_ldata := PK_EXCEL_TO_DB.tDatalist(); --already define
PK_EXCEL_TO_DB.PR_DO_INSERT(tDataList);
END LOOP;
:progress:='EXCEL READING IS DONE...';
----------------CLOSE THE EXCEL SHEET AFTER READING--------------
OLE2.INVOKE(APPLICATION,'QUIT');
-----------------RELEASE ALL OBJECTS
OLE2.RELEASE_OBJ(CELL);
OLE2.RELEASE_OBJ(WORKSHEET);
OLE2.RELEASE_OBJ(WORKBOOK);
OLE2.RELEASE_OBJ(WORKBOOKS);
OLE2.RELEASE_OBJ(APPLICATION);
:PROGRESS := 'DATA INSERTED INTO THE TABLE '; SYNCHRONIZE;
SYNCHRONIZE;
exception
WHEN OTHERS THEN
MESSAGE(sqlerrm);
END;
----------------------------------------------------------------------------------------OLE2 PACKAGE ENDS-------------------------------------------------
------------------------------------------------------------PK_EXCEL_TO_DB PACKAGE SPECIFICATION---------------------------------------------
PACKAGE PK_EXCEL_TO_DB IS
TYPE tKeyValue IS RECORD (
CROUTE VARCHAR2(255),
VROUTE VARCHAR2(1000),
CTRNDATE VARCHAR2(255),
VTRNDATE VARCHAR2(1000),
CTTIME VARCHAR2(255),
VTTIME VARCHAR2(1000),
CTID VARCHAR2(255),
VTID VARCHAR2(1000));
TYPE tDataList IS TABLE OF tKeyValue;
PROCEDURE PR_DO_INSERT(i_lData IN tDataList);
END;
-----------------------------------------------------------------PK_EXCEL_TO_DB PACKAGE BODY-----------------------------------------------------
PACKAGE BODY PK_EXCEL_TO_DB IS
PROCEDURE PR_DO_INSERT(i_lData IN tDataList) IS
CC_ROUTE VARCHAR2(255);
VV_ROUTE VARCHAR2(1000);
CC_TRNDATE VARCHAR2(255);
VV_TRNDATE VARCHAR2(1000);
CC_TTIME VARCHAR2(255);
VV_TTIME VARCHAR2(1000);
CC_TID VARCHAR2(255);
VV_TID VARCHAR2(1000);
BEGIN
FOR i IN 1..i_lData.count
LOOP
CC_ROUTE:=CC_ROUTE || ',' || i_ldata(i).CROUTE;
VV_ROUTE:=VV_ROUTE|| ',''' || i_ldata(i).VROUTE || '''';
CC_TRNDATE :=CC_TRNDATE || ',' || i_ldata(i).CTRNDATE ;
VV_TRNDATE :=VV_TRNDATE || ',''' || i_ldata(i).VTRNDATE || '''';
CC_TTIME :=CC_TTIME || ',' || i_ldata(i).CTTIME ;
VV_TTIME :=VV_TTIME || ',''' || i_ldata(i).VTTIME || '''';
CC_TID :=CC_TID || ',' || i_ldata(i).CTID ;
VV_TID :=VV_TID || ',''' || i_ldata(i).VTID|| '''';
END LOOP;
--EXECUTE IMMEDIATE
FORMS_DDL('INSERT INTO TEMP2 (' || SUBSTR(CC_ROUTE, 2) || ' ' ||
SUBSTR(CC_TRNDATE, 2) || ' ' ||
SUBSTR(CC_TTIME, 2) || '' ||
SUBSTR(CC_TID, 2) || ')
VALUES (' || SUBSTR(VV_ROUTE,2) || ' ' ||
SUBSTR(VV_TRNDATE,2) || '' ||
SUBSTR(VV_TTIME,2) || ' ' ||
SUBSTR(VV_TID,2)|| ')');
commit;
END;
END;
------------------------------------------------------------------------PK_EXCEL_TO_DB PACKAGE BODY ENDS--------------------------------------
Thank You
Sameer.Hii Andreas Weiden,
Sorry for replying late. I am very thankful to Francois and your for your suggestion. I've gone through the documentation of collection and finally i got the solution.
But I am unable to insert rercord to the table. Values are passed to the procedure, i am able to see the values while debugging and i get the message
'DATA INSERTED INTO THE TABLE' but when i check it with sql, the table is empty. I've tried commit and standard.commit, but it doesn't works. My modified code is given below.
PROCEDURE get_excel IS
APPLICATION OLE2.OBJ_TYPE;
WORKBOOKS OLE2.OBJ_TYPE;
WORKBOOK OLE2.OBJ_TYPE;
WORKSHEETS OLE2.OBJ_TYPE;
WORKSHEET OLE2.OBJ_TYPE;
CELL OLE2.OBJ_TYPE;
CTR NUMBER(12);
COLS NUMBER(2);
CELLVALUE VARCHAR2(89);
C_ROUTE VARCHAR2(255);
V_ROUTE VARCHAR2(1000);
C_TRNDATE VARCHAR2(255);
V_TRNDATE VARCHAR2(1000);
C_TTIME VARCHAR2(255);
V_TTIME VARCHAR2(1000);
C_TID VARCHAR2(255);
V_TID VARCHAR2(1000);
FILENAME VARCHAR2(500);
v_path varchar2(1000):=:path;
ARGS OLE2.OBJ_TYPE;
i_ldata PK_EXCEL_TO_DB.tDataList:=PK_EXCEL_TO_DB.tDataList();
tDataList PK_EXCEL_TO_DB.tDataList;
BEGIN
:progress:='Please wait...';
SYNCHRONIZE;
--------------INITIATE EXCEL APPLICATION---------------------------
filename := V_PATH;--GET_FILE_NAME('c:\', File_Filter=>'Excel Files (*.xls)|*.xls|'); -- to pick the file
APPLICATION := OLE2.CREATE_OBJ('EXCEL.APPLICATION');
OLE2.SET_PROPERTY(APPLICATION,'VISIBLE','FALSE');
----------------GET WORKBOOKS FROM EXCEL APPLICATION---------------
WORKBOOKS := OLE2.GET_OBJ_PROPERTY(APPLICATION, 'WORKBOOKS');
----------------OPEN REQUIRED WORKBOOK-----------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS, FILENAME);
WORKBOOK := OLE2.GET_OBJ_PROPERTY(WORKBOOKS,'OPEN',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
----------------OPEN REQUIRED WORKSHEET---------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,'Sheet1');
WORKSHEET := OLE2.GET_OBJ_PROPERTY (WORKBOOK,'WORKSHEETS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
----------------GET CELL VALUE-------------------------------------
ctr := 2; --row number
cols := 1; -- column number
FIRST_RECORD;
LOOP
i_ldata.extend(ctr);
i_ldata.extend(cols);
--tDataList:=PK_EXCEL_TO_DB.tDataList();
-----------------------COLUMN1-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS); --COLS
OLE2.ADD_ARG(ARGS,1);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_ROUTE := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(cols).CROUTE:=C_ROUTE;
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,1);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_ROUTE := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(ctr).VROUTE:=V_ROUTE;
-----------------------COLUMN2-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,2);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TRNDATE:= OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(cols).CTRNDATE:=C_TRNDATE;
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,2);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TRNDATE:= OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(ctr).vtrndate:=v_trndate;
-----------------------COLUMN3-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,3);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TTIME := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(cols).CTTIME:=C_TTIME;
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,3);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TTIME := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(ctr).vttime:=v_ttime;
-----------------------COLUMN4-------------------------------------
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,COLS);
OLE2.ADD_ARG(ARGS,4);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
C_TID := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(cols).CTID:=C_TID;
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARGS,CTR);
OLE2.ADD_ARG(ARGS,4);
CELL := OLE2.GET_OBJ_PROPERTY(WORKSHEET,'CELLS',ARGS);
OLE2.DESTROY_ARGLIST(ARGS);
ARGS := OLE2.CREATE_ARGLIST;
V_TID := OLE2.GET_CHAR_PROPERTY(CELL,'TEXT');
i_ldata(ctr).vtid:=v_tid;
PK_EXCEL_TO_DB.PR_DO_INSERT(i_ldata);
-- i_ldata := PK_EXCEL_TO_DB.tDatalist();
EXIT WHEN length(V_Route) = 0 or length(V_Route) is null;
ctr := ctr + 1;
cols := 1;
END LOOP;
:progress:='EXCEL READING IS DONE...';
----------------CLOSE THE EXCEL SHEET AFTER READING--------------
OLE2.INVOKE(APPLICATION,'QUIT');
-----------------RELEASE ALL OBJECTS
OLE2.RELEASE_OBJ(CELL);
OLE2.RELEASE_OBJ(WORKSHEET);
OLE2.RELEASE_OBJ(WORKBOOK);
OLE2.RELEASE_OBJ(WORKBOOKS);
OLE2.RELEASE_OBJ(APPLICATION);
:PROGRESS := 'DATA INSERTED INTO THE TABLE '; SYNCHRONIZE;
SYNCHRONIZE;
exception
WHEN OTHERS THEN
MESSAGE(sqlerrm);
END;Package specification and package body is
PACKAGE PK_EXCEL_TO_DB IS
TYPE tKeyValue IS RECORD (
CROUTE VARCHAR2(255),
VROUTE VARCHAR2(1000),
CTRNDATE VARCHAR2(255),
VTRNDATE VARCHAR2(1000),
CTTIME VARCHAR2(255),
VTTIME VARCHAR2(1000),
CTID VARCHAR2(255),
VTID VARCHAR2(1000));
TYPE tDataList IS TABLE OF tKeyValue;
PROCEDURE PR_DO_INSERT(i_lData IN tDataList);
END;
-----------------------------------------------------------------PK_EXCEL_TO_DB PACKAGE BODY-----------------------------------------------------
PACKAGE BODY PK_EXCEL_TO_DB IS
PROCEDURE PR_DO_INSERT(i_lData IN tDataList) IS
CC_ROUTE VARCHAR2(255);
VV_ROUTE VARCHAR2(1000);
CC_TRNDATE VARCHAR2(255);
VV_TRNDATE VARCHAR2(1000);
CC_TTIME VARCHAR2(255);
VV_TTIME VARCHAR2(1000);
CC_TID VARCHAR2(255);
VV_TID VARCHAR2(1000);
BEGIN
FOR i IN 1..i_lData.count
LOOP
CC_ROUTE:=CC_ROUTE || ',' || i_ldata(i).CROUTE;
VV_ROUTE:=VV_ROUTE|| ',''' || i_ldata(i).VROUTE || '''';
CC_TRNDATE :=CC_TRNDATE || ',' || i_ldata(i).CTRNDATE ;
VV_TRNDATE :=VV_TRNDATE || ',''' || i_ldata(i).VTRNDATE || '''';
CC_TTIME :=CC_TTIME || ',' || i_ldata(i).CTTIME ;
VV_TTIME :=VV_TTIME || ',''' || i_ldata(i).VTTIME || '''';
CC_TID :=CC_TID || ',' || i_ldata(i).CTID ;
VV_TID :=VV_TID || ',''' || i_ldata(i).VTID|| '''';
END LOOP;
FORMS_DDL('INSERT INTO TEMP2 (' || SUBSTR(CC_ROUTE, 2) || ' ' ||
SUBSTR(CC_TRNDATE, 2) || ' ' ||
SUBSTR(CC_TTIME, 2) || '' ||
SUBSTR(CC_TID, 2) || ')
VALUES (' || SUBSTR(VV_ROUTE,2) || ' ' ||
SUBSTR(VV_TRNDATE,2) || '' ||
SUBSTR(VV_TTIME,2) || ' ' ||
SUBSTR(VV_TID,2)|| ')');
--standard.commit;
commit;
END;
END;Thanks
Sam
Edited by: sam8682 on May 13, 2013 2:35 PM -
Varray of Objects: Initializing, Instantiation, Constructors, ORA-06531
This is supposed to fill a varray with ten objects, calling methods in those objects and populating the objects from queries, then display fields from the objects via methods. Error message is in comment at bottom. Any ideas?
-- Enable screen I/O
SET SERVEROUTPUT ON SIZE 1000000
SET VERIFY OFF
-- object spec
CREATE OR REPLACE TYPE employee4 AS OBJECT
o_ename CHAR (20 char),
o_empno NUMBER (4),
o_sal NUMBER (10),
o_thisno NUMBER (4),
MEMBER FUNCTION get_o_ename RETURN CHAR, MEMBER PROCEDURE set_o_ename (o_thisno IN number),
MEMBER FUNCTION get_o_empno RETURN NUMBER, MEMBER PROCEDURE set_o_empno (o_thisno IN number),
MEMBER FUNCTION get_o_sal RETURN NUMBER, MEMBER PROCEDURE set_o_sal (o_thisno IN number),
CONSTRUCTOR FUNCTION employee4 (o_ename CHAR,o_empno NUMBER,o_sal NUMBER,o_thisno NUMBER) RETURN SELF AS RESULT
-- object body
CREATE OR REPLACE TYPE BODY employee4 AS
CONSTRUCTOR FUNCTION employee4 (o_ename IN CHAR,
o_empno IN NUMBER,
o_sal IN NUMBER,
o_thisno IN NUMBER)
RETURN SELF AS RESULT IS
BEGIN
SELF.o_ename := o_ename;
SELF.o_empno := o_empno;
SELF.o_sal := o_sal;
SELF.o_thisno := o_thisno;
RETURN;
END;
-- gets
MEMBER FUNCTION get_o_ename RETURN CHAR IS
BEGIN
RETURN self.o_ename;
END;
MEMBER FUNCTION get_o_empno RETURN NUMBER IS
BEGIN
RETURN self.o_empno;
END;
MEMBER FUNCTION get_o_sal RETURN NUMBER IS
BEGIN
RETURN self.o_ename;
END;
-- sets
MEMBER PROCEDURE set_o_ename(o_thisno IN number) IS
BEGIN
SELECT ename INTO SELF.o_ename FROM emp WHERE empno = SELF.o_thisno;
END;
MEMBER PROCEDURE set_o_empno(o_thisno IN number) IS
BEGIN
SELECT empno INTO SELF.o_empno FROM emp WHERE empno = SELF.o_thisno;
END;
MEMBER PROCEDURE set_o_sal(o_thisno IN number) IS
BEGIN
SELECT sal INTO SELF.o_sal FROM emp WHERE empno = SELF.o_thisno;
END;
END;
DECLARE
-- a varray of employees
TYPE emp_varray1 IS VARRAY(10) OF employee4;
varray_of_emps EMP_VARRAY1;
-- List of EMPNO's in order of appearance in EMP table (for cross-referencing, single-line retrieval)
TYPE MYCREF_VARRAY IS VARRAY(10) OF NUMBER(4);
varray_mycref MYCREF_VARRAY := MYCREF_VARRAY(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-- make a variable to store one empno
thisno NUMBER(4);
-- make a counter
counter INT;
-- query variables for the set calls
q_ename CHAR(20 CHAR);
q_empno NUMBER(4);
q_sal NUMBER(10);
BEGIN
-- Put the first 10 EMPNO's in my cref array
SELECT empno BULK COLLECT INTO varray_mycref FROM emp WHERE ROWNUM < 11;
-- Use a loop to retrieve the first 10 objects in the "emp" table and put them in the varray of objects
FOR counter IN 1..10 LOOP
thisno := varray_mycref(counter);
varray_of_emps(counter).set_o_ename(thisno);
varray_of_emps(counter).set_o_empno(thisno);
varray_of_emps(counter).set_o_sal(thisno);
END LOOP;
-- Use another loop to display the information in the reverse order.
FOR counter in REVERSE 1..10 LOOP
dbms_output.put_line((varray_of_emps(counter).get_o_ename()) || CHR(9) || (varray_of_emps(counter).get_o_empno()) || CHR(9) || (varray_of_emps(counter).get_o_sal()));
END LOOP;
END;
This results in the following response in SQL*PLUS:
Type created.
Type body created.
DECLARE
ERROR at line 1:
ORA-06531: Reference to uninitialized collection
ORA-06512: at line 33Hi,
From metalink:
Cause: An element or member function of a nested table or varray was
referenced (where an initialized collection is needed) without the
collection having been initialized.
Action: Initialize the collection with an appropriate constructor or
whole-object assignment.
ORA 6531 Reference to uninitialized collection (Doc ID 48912.1) -
SDO_GEOR.mosaic() little question
Hi, I'm using SDO_GEOR.mosaic() to create only one georaster object but I've a littel problem.
DECLARE
gr sdo_georaster;
BEGIN
INSERT INTO georaster_table (georid, georaster)
VALUES (10, sdo_geor.init('rdt_1'))
RETURNING georaster INTO gr;
SDO_GEOR.mosaic('georaster_table', 'georaster', gr, 'blocksize=(512, 512, 3)');
UPDATE cartine SET georaster=gr WHERE georid=10;
commit;
END;
I've this output if I create a blank raster into the georaster_table:
ERROR at line 1:
ORA-00001: unique constraint (OASIDBA.SYS_C0050441) violated
ORA-06512: at line 4
and if I don't create a blank georaster:
ERROR at line 1:
ORA-13419: cannot perform mosaick operation on the specified table column
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 8
ORA-06512: at "MDSYS.SDO_GEOR", line 968
ORA-06512: at line 7
what muss I do? Create the blank georaster or not? ThanksHow about creating a new empty georaster table and insert the mosaic into it?
Also:
============================================================
DECLARE
gr sdo_georaster;
BEGIN
INSERT INTO georaster_table (georid, georaster)
VALUES (10, sdo_geor.init('rdt_1'))
RETURNING georaster INTO gr;
SDO_GEOR.mosaic('georaster_table', 'georaster', gr, 'blocksize=(512, 512, 3)');
UPDATE cartine SET georaster=gr WHERE georid=10;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
which table are you working on? georaster_table or cartine?
commit;
END;
============================================================
Message was edited by:
modeler -
Restrictions for sdo_geor.mosaic
Hi All
i have a set of georeferenced images which are ready to be mosaiced , in the sense that there is no overlap or gap in between the images. Spatial Index is also created on the table . But still i get error when i do a sdo_geor.mosaic.
ORA-13419 cannot perform mosaick operation on the specified table column
All the images have the same resolution, same number of bands . is there any other restriction for the images to be mosaiced.
i have put the coverage of images on following url
http://www.geocities.com/jaleelahmed/coverage.html
each red block is one image (one row in my georaster table)
Any advice is appreciated.
Thanks
AbAb,
The beta1 of the next release will be avaialbale in this fall. There is no officially fixed date for the next release yet. The new mosaic would be able to automatically handle this case as long as there is no overlapping. The mosaic object would be sort of sparse so that the missing image tiles would not consume any disk space.
Still, I think your project is doable using the 10g mosaic as long as the images meet the requirements outlined under the Usage Notes of SDO_GEOR.mosaic in chapter 4 of the GeoRaster manual.
To make sure you can move forward, one more question:
are those images rectified and projected into the same projection?
If so, you should be able to do the mosaic without problem.
I would recommend you divide and conquer, i.e., split the whole mosaic into several smaller mosaics (sub-areas, such as northeastern area, northwestern area, etc.) first, mosaick them separately, then mosaick these smaller mosaics into the big one as you desire.
Please note that, for the missing tiles, you will have to make-up them. But it's relatively easy:
1. call sdo_geor.createBlank with a single cell value such as zero and proper image dimentions sizes. (those blank georaster objects will not store the pixels in RDT and so will not consume space. For the definition of BLANK GeoRaster object please read chapter one of the GeoRaster manual)
2. georeference each of the blank objects properly so that they are aligned/co-located with your images correctly. (this is the place where you need much time and shall be very careful so that the blank images are georeferenced correctly and meet the requirements of sdo_geor.mosaic)
Simply for mosaic process, you have an alternative. you actually don't have to geo-spatially georeference each image by leveraging the ULT coordinate feature of GeoRaster. On other words, remove georeferencing info first, then call setULTCoordinate to reset all ULT coordinates of the images so that they are spatially properly located in the GeoRaster cell space. Then do mosaic. After mosaick, you re-georeference the mosaic image by calling sdo_geor.georeference.
Let us know if you have any problem. This project is very interesting and shall be doable.
Regards,
Jeffrey Xie -
ORA-06531:collection error in trigger.
We are using DBMS_XMLSave to insert data into an object nested view. Error ORA-06531 causes the trigger to fail when trying to access the collection count.. Below is the XML, view and trigger. What is missing or are we running into a bug?
Thanks
****************************** XML ****************************
<?xml version = '1.0'?>
<ROWSET>
<ROW>
<ArrestNumber>2</ArrestNumber>
<IMErrors>
<IMErrors_ITEM>
<ResponseErrorCode>CODE 2</ResponseErrorCode>
<ResponseErrorDesc>DESC 2</ResponseErrorDesc>
</IMErrors_ITEM>
<IMErrors_ITEM>
<ResponseErrorCode>CODE 1</ResponseErrorCode>
<ResponseErrorDesc>DESC 1</ResponseErrorDesc>
</IMErrors_ITEM>
</IMErrors>
</ROW>
</ROWSET>
************************* VIEW ****************************
CREATE OR REPLACE TYPE sjs.imres_error_type AS OBJECT
("ResponseErrorCode" VARCHAR2(10),
"ResponseErrorDesc" VARCHAR2(4000))
CREATE OR REPLACE TYPE sjs.imres_errors_type AS TABLE OF imres_error_type
CREATE OR REPLACE VIEW sjs.imresponse
AS SELECT ith.a_id AS "ArrestNumber",
CAST(MULTISET(SELECT ire.errorcode,
ire.errordesc
FROM sjs.imresponseerrors ire
WHERE ire.ith_id = ith.ith_id) AS imres_errors_type) AS "IMerrors"
FROM sjs.imtransactionhistory ith
************************* TRIGGER ****************************
CREATE OR REPLACE TRIGGER sjs.imresponse_new INSTEAD OF INSERT ON sjs.imresponse FOR EACH ROW
DECLARE
error_list imres_errors_type;
error_t imres_error_type;
ith_id_holder NUMBER(18);
cnt NUMBER;
BEGIN
INSERT INTO imtransactionhistory(a_id,interfacetransaction,ith_nysid,ith_fbi,ith_cjtn)
VALUES(:new."ArrestNumber",'PENDING','PENDING','PENDING','PENDING');
SELECT sjs.ith_sequence.currval INTO ith_id_holder FROM dual;
error_list := :new."IMerrors";
cnt := error_list.count;
-- FOR i IN 1..cnt LOOP
-- error_t := error_list(i);
-- INSERT INTO imresponseerrors(ith_id,errorcode,errordesc)
-- VALUES(ith_id_holder,error_t."ResponseErrorCode",error_t."ResponseErrorDesc");
-- END LOOP;
END;
************************* ERROR ****************************
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException:
'oracle.jdbc.driver.OracleSQLException: ORA-06531: Reference to uninitialized collection
ORA-06512: at "SJS.IMRESPONSE_NEW", line 11
ORA-04088: error during execution of trigger 'SJS.IMRESPONSE_NEW'
' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XM
ORA-06512: at "SJS.XML_UTIL", line 72
ORA-06512: at "SJS.IMRES", line 35
ORA-06512: at line 6Frank
error_list is a collection. What happens if you use an index with it? E.G.
error_list(1) := :new."IMerrors";
Cheers, APC -
Ora-06531 reference to uninitialized collection --- Please help
Hello,
I am getting this "ora-06531 reference to uninitialized collection" while executing the below procedure.
=======================
PROCEDURE iud_account_col
( pv_account_version IN account_version_t
AS
LC_USR_ID CONSTANT VARCHAR2(30) := pkg_util.get_usr_id ;
LC_TMSTMP CONSTANT TIMESTAMP /*WITH TIME ZONE*/ := pkg_util.get_tmstmp ;
lv_level VARCHAR2(100);
lv_am_key_id number;
lv_acct_cusip VARCHAR2(12);
LC_AM_KEY_ID number;
LC_AM_VER_NUM number;
BEGIN
DECLARE
lv_am account_version_t;
lv_amv account_maint_t;
lv_amvv account_maint_version_t;
cursor c_acct_cusip ( cv_am_key_id varchar2) is
select acct_cusip
from account_maintenance
where am_key_id = lv_amv.am_key_id;
BEGIN
lv_am := pv_account_version;
lv_level := 'ACCOUNT_MAINT' ;
lv_amv := pv_account_version.account_maint;
LC_AM_KEY_ID := lv_amv.am_key_id;
FOR acct_cusip_info in c_acct_cusip (lv_am_key_id)
LOOP
lv_acct_cusip := acct_cusip_info.acct_cusip;
END LOOP;
IF lv_amv.action = 'I'
THEN
INSERT
INTO
account_maintenance
( am_key_id
, acct_cusip
, am_orig_cre_tmstp
, am_orig_usr_id
, delete_ind
, add_usr_id
, add_tmstmp
, lock_level_num
VALUES
( lv_amv.am_key_id
, lv_amv.acct_cusip
, LC_TMSTMP
, LC_USR_ID
, lv_amv.delete_ind
, LC_USR_ID
, LC_TMSTMP
, lv_amv.lock_level_num
END IF;
lv_amvv := pv_account_version.account_maint.account_maint_version;
lv_level := 'ACCOUNT_MAINT_VERSION';
LC_AM_VER_NUM := lv_amvv.am_ver_num;
IF lv_amvv.action = 'I'
THEN
-- Insert issue maint version
INSERT
INTO
ACCOUNT_MAINTENANCE_VERSION
( AM_KEY_ID
, AM_VER_NUM
, ACCT_CUSIP
, LEGAL_ENTITY
, APPR_STATUS_REF_ID
, INACTIVE_IND
, ADD_USR_ID
, ADD_TMSTMP
, UPD_USR_ID
, UPD_TMSTMP
, LOCK_LEVEL_NUM
VALUES
( lv_amv.am_key_id
, lv_amvv.am_ver_num
, lv_acct_cusip
, lv_amvv.legal_entity
, lv_amvv.appr_status_ref_id
, 'N'
, LC_USR_ID
, LC_TMSTMP
, LC_USR_ID
, LC_TMSTMP
, lv_amvv.lock_level_num
END IF; --- end for account maint version.
FOR j IN lv_amv.account_maint_comment_col.FIRST
.. lv_amv.account_maint_comment_col.LAST
LOOP
DECLARE
lv_amvc account_maint_comment_t;
BEGIN
lv_amvc := lv_amv.account_maint_comment_col(j);
lv_level := 'ACCOUNT_MAINT_COMMENT';
IF lv_amvc.action = 'I'
THEN
--- Insert into account maintenance comment table
INSERT
INTO
ACCOUNT_MAINTENANCE_COMMENT
( AM_KEY_ID
, AM_VER_NUM
, COMMENT_NUM
, COMMENT_TMSTP
, COMMENT_TXT
, INACTIVE_IND
, ADD_USR_ID
, ADD_TMSTMP
, LOCK_LEVEL_NUM
VALUES
( LC_AM_KEY_ID
, LC_AM_VER_NUM
, lv_amvc.comment_num
, LC_TMSTMP
, lv_amvc.comment_txt
, 'N'
, LC_USR_ID
, LC_TMSTMP
, lv_amvc.lock_level_num
END IF;
END;
END LOOP; --- end loop for account maint comments
END;
COMMIT WORK;
RETURN;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK WORK;
RAISE;
END iud_account_col;
====================
The UDT's are below:
CREATE OR REPLACE TYPE ACCOUNT_VERSION_T
AS OBJECT
PORTFOLIO PORTFOLIO_T
, ACCOUNT_MAINT ACCOUNT_MAINT_T
CREATE OR REPLACE TYPE ACCOUNT_MAINT_T
AS OBJECT
( AM_KEY_ID number
, ACCT_CUSIP varchar2(12)
, DELETE_IND varchar2(1)
, ADD_USR_ID varchar2(20)
, ADD_TMSTMP timestamp
, UPD_USR_ID varchar2(20)
, UPD_TMSTMP timestamp
, LOCK_LEVEL_NUM number
, ACTION VARCHAR2(1)
, ACCOUNT_MAINT_VERSION ACCOUNT_MAINT_VERSION_T
, ACCOUNT_MAINT_COMMENT_COL ACCOUNT_MAINT_COMMENT_COL_T
CREATE OR REPLACE TYPE ACCOUNT_MAINT_VERSION_T
AS OBJECT
( AM_KEY_ID number
, AM_VER_NUM number
, ACCT_CUSIP varchar2(12)
, LEGAL_ENTITY varchar2(100)
, APPR_STATUS_REF_ID number
, FUND_INACTIVE_TMSTMP timestamp
, ADD_USR_ID varchar2(20)
, ADD_TMSTMP timestamp
, UPD_USR_ID varchar2(20)
, UPD_TMSTMP timestamp
, LOCK_LEVEL_NUM number
, ACTION VARCHAR2(1)
CREATE OR REPLACE TYPE ACCOUNT_MAINT_COMMENT_T
AS OBJECT
( AM_KEY_ID number
, AM_VER_NUM number
, COMMENT_NUM number
, COMMENT_TXT varchar2(400)
, ADD_USR_ID varchar2(20)
, ADD_TMSTMP timestamp
, UPD_USR_ID varchar2(20)
, UPD_TMSTMP timestamp
, LOCK_LEVEL_NUM number
, ACTION VARCHAR2(1)
=====================================================
This is how I am trying to execute:
Declare
pv_account_version account_version_t := account_version_t(null
, account_maint_t ( 10041
, '11111111'
, 'N'
,'abc'
, NULL
, NULL
, NULL
, 1
,NULL-- 'I'
,ACCOUNT_MAINT_VERSION_T(10031
, 10001
, NULL
,'Legal entity'
,22
,NULL
,'abc'
,NULL
, NULL
,NULL
, 1
,NULL --'I'
,ACCOUNT_MAINT_COMMENT_COL_T(
10031
,10001
,1001
,'My first comment'
,'abc'
, NULL
, NULL
, NULL
, 1
, 'I')
Begin
pkg_cdm_process_v2.iud_account(pv_account_version);
END;
What am I doing wrong here....
Please help.
Thanks.Now if we only knew where the error was flagged.
PROCEDURE Iud_account_col
(pv_account_version IN ACCOUNT_VERSION_T)
AS
lc_usr_id CONSTANT VARCHAR2(30) := pkg_util.get_usr_id;
lc_tmstmp CONSTANT TIMESTAMP /*WITH TIME ZONE*/ := pkg_util.get_tmstmp;
lv_level VARCHAR2(100);
lv_am_key_id NUMBER;
lv_acct_cusip VARCHAR2(12);
lc_am_key_id NUMBER;
lc_am_ver_num NUMBER;
BEGIN
DECLARE
lv_am ACCOUNT_VERSION_T;
lv_amv ACCOUNT_MAINT_T;
lv_amvv ACCOUNT_MAINT_VERSION_T;
CURSOR c_acct_cusip(cv_am_key_id VARCHAR2) IS
SELECT acct_cusip
FROM account_maintenance
WHERE am_key_id = lv_amv.am_key_id;
BEGIN
lv_am := pv_account_version;
lv_level := 'ACCOUNT_MAINT';
lv_amv := pv_account_version.account_maint;
lc_am_key_id := lv_amv.am_key_id;
FOR acct_cusip_info IN c_acct_cusip(lv_am_key_id) LOOP
lv_acct_cusip := acct_cusip_info.acct_cusip;
END LOOP;
IF lv_amv.ACTION = 'I' THEN
INSERT INTO account_maintenance
(am_key_id,
acct_cusip,
am_orig_cre_tmstp,
am_orig_usr_id,
delete_ind,
add_usr_id,
add_tmstmp,
lock_level_num)
VALUES (lv_amv.am_key_id,
lv_amv.acct_cusip,
lc_tmstmp,
lc_usr_id,
lv_amv.delete_ind,
lc_usr_id,
lc_tmstmp,
lv_amv.lock_level_num);
END IF;
lv_amvv := pv_account_version.account_maint.account_maint_version;
lv_level := 'ACCOUNT_MAINT_VERSION';
lc_am_ver_num := lv_amvv.am_ver_num;
IF lv_amvv.ACTION = 'I' THEN
-- Insert issue maint version
INSERT INTO account_maintenance_version
(am_key_id,
am_ver_num,
acct_cusip,
legal_entity,
appr_status_ref_id,
inactive_ind,
add_usr_id,
add_tmstmp,
upd_usr_id,
upd_tmstmp,
lock_level_num)
VALUES (lv_amv.am_key_id,
lv_amvv.am_ver_num,
lv_acct_cusip,
lv_amvv.legal_entity,
lv_amvv.appr_status_ref_id,
'N',
lc_usr_id,
lc_tmstmp,
lc_usr_id,
lc_tmstmp,
lv_amvv.lock_level_num);
END IF; --- end for account maint version.
FOR j IN lv_amv.account_maint_comment_col.FIRST.. lv_amv.account_maint_comment_col.LAST LOOP
DECLARE
lv_amvc ACCOUNT_MAINT_COMMENT_T;
BEGIN
lv_amvc := lv_amv.Account_maint_comment_col(j);
lv_level := 'ACCOUNT_MAINT_COMMENT';
IF lv_amvc.ACTION = 'I' THEN
--- Insert into account maintenance comment table
INSERT INTO account_maintenance_comment
(am_key_id,
am_ver_num,
comment_num,
comment_tmstp,
comment_txt,
inactive_ind,
add_usr_id,
add_tmstmp,
lock_level_num)
VALUES (lc_am_key_id,
lc_am_ver_num,
lv_amvc.comment_num,
lc_tmstmp,
lv_amvc.comment_txt,
'N',
lc_usr_id,
lc_tmstmp,
lv_amvc.lock_level_num);
END IF;
END;
END LOOP; --- end loop for account maint comments
END;
COMMIT WORK;
RETURN;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK WORK;
RAISE;
END iud_account_col; -
Ora-06531 reference to uninitialized collection
Hello,
I am getting this "ora-06531 reference to uninitialized collection" while executing the below procedure.
=======================
PROCEDURE iud_account_col
( pv_account_version IN account_version_t
AS
LC_USR_ID CONSTANT VARCHAR2(30) := pkg_util.get_usr_id ;
LC_TMSTMP CONSTANT TIMESTAMP /*WITH TIME ZONE*/ := pkg_util.get_tmstmp ;
lv_level VARCHAR2(100);
lv_am_key_id number;
lv_acct_cusip VARCHAR2(12);
LC_AM_KEY_ID number;
LC_AM_VER_NUM number;
BEGIN
DECLARE
lv_am account_version_t;
lv_amv account_maint_t;
lv_amvv account_maint_version_t;
cursor c_acct_cusip ( cv_am_key_id varchar2) is
select acct_cusip
from account_maintenance
where am_key_id = lv_amv.am_key_id;
BEGIN
lv_am := pv_account_version;
lv_level := 'ACCOUNT_MAINT' ;
lv_amv := pv_account_version.account_maint;
LC_AM_KEY_ID := lv_amv.am_key_id;
FOR acct_cusip_info in c_acct_cusip (lv_am_key_id)
LOOP
lv_acct_cusip := acct_cusip_info.acct_cusip;
END LOOP;
IF lv_amv.action = 'I'
THEN
INSERT
INTO
account_maintenance
( am_key_id
, acct_cusip
, am_orig_cre_tmstp
, am_orig_usr_id
, delete_ind
, add_usr_id
, add_tmstmp
, lock_level_num
VALUES
( lv_amv.am_key_id
, lv_amv.acct_cusip
, LC_TMSTMP
, LC_USR_ID
, lv_amv.delete_ind
, LC_USR_ID
, LC_TMSTMP
, lv_amv.lock_level_num
END IF;
lv_amvv := pv_account_version.account_maint.account_maint_version;
lv_level := 'ACCOUNT_MAINT_VERSION';
LC_AM_VER_NUM := lv_amvv.am_ver_num;
IF lv_amvv.action = 'I'
THEN
-- Insert issue maint version
INSERT
INTO
ACCOUNT_MAINTENANCE_VERSION
( AM_KEY_ID
, AM_VER_NUM
, ACCT_CUSIP
, LEGAL_ENTITY
, APPR_STATUS_REF_ID
, INACTIVE_IND
, ADD_USR_ID
, ADD_TMSTMP
, UPD_USR_ID
, UPD_TMSTMP
, LOCK_LEVEL_NUM
VALUES
( lv_amv.am_key_id
, lv_amvv.am_ver_num
, lv_acct_cusip
, lv_amvv.legal_entity
, lv_amvv.appr_status_ref_id
, 'N'
, LC_USR_ID
, LC_TMSTMP
, LC_USR_ID
, LC_TMSTMP
, lv_amvv.lock_level_num
END IF; --- end for account maint version.
FOR j IN lv_amv.account_maint_comment_col.FIRST
.. lv_amv.account_maint_comment_col.LAST
LOOP
DECLARE
lv_amvc account_maint_comment_t;
BEGIN
lv_amvc := lv_amv.account_maint_comment_col(j);
lv_level := 'ACCOUNT_MAINT_COMMENT';
IF lv_amvc.action = 'I'
THEN
--- Insert into account maintenance comment table
INSERT
INTO
ACCOUNT_MAINTENANCE_COMMENT
( AM_KEY_ID
, AM_VER_NUM
, COMMENT_NUM
, COMMENT_TMSTP
, COMMENT_TXT
, INACTIVE_IND
, ADD_USR_ID
, ADD_TMSTMP
, LOCK_LEVEL_NUM
VALUES
( LC_AM_KEY_ID
, LC_AM_VER_NUM
, lv_amvc.comment_num
, LC_TMSTMP
, lv_amvc.comment_txt
, 'N'
, LC_USR_ID
, LC_TMSTMP
, lv_amvc.lock_level_num
END IF;
END;
END LOOP; --- end loop for account maint comments
END;
COMMIT WORK;
RETURN;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK WORK;
RAISE;
END iud_account_col;
====================
The UDT's are below:
CREATE OR REPLACE TYPE ACCOUNT_VERSION_T
AS OBJECT
PORTFOLIO PORTFOLIO_T
, ACCOUNT_MAINT ACCOUNT_MAINT_T
CREATE OR REPLACE TYPE ACCOUNT_MAINT_T
AS OBJECT
( AM_KEY_ID number
, ACCT_CUSIP varchar2(12)
, DELETE_IND varchar2(1)
, ADD_USR_ID varchar2(20)
, ADD_TMSTMP timestamp
, UPD_USR_ID varchar2(20)
, UPD_TMSTMP timestamp
, LOCK_LEVEL_NUM number
, ACTION VARCHAR2(1)
, ACCOUNT_MAINT_VERSION ACCOUNT_MAINT_VERSION_T
, ACCOUNT_MAINT_COMMENT_COL ACCOUNT_MAINT_COMMENT_COL_T
CREATE OR REPLACE TYPE ACCOUNT_MAINT_VERSION_T
AS OBJECT
( AM_KEY_ID number
, AM_VER_NUM number
, ACCT_CUSIP varchar2(12)
, LEGAL_ENTITY varchar2(100)
, APPR_STATUS_REF_ID number
, FUND_INACTIVE_TMSTMP timestamp
, ADD_USR_ID varchar2(20)
, ADD_TMSTMP timestamp
, UPD_USR_ID varchar2(20)
, UPD_TMSTMP timestamp
, LOCK_LEVEL_NUM number
, ACTION VARCHAR2(1)
CREATE OR REPLACE TYPE ACCOUNT_MAINT_COMMENT_T
AS OBJECT
( AM_KEY_ID number
, AM_VER_NUM number
, COMMENT_NUM number
, COMMENT_TXT varchar2(400)
, ADD_USR_ID varchar2(20)
, ADD_TMSTMP timestamp
, UPD_USR_ID varchar2(20)
, UPD_TMSTMP timestamp
, LOCK_LEVEL_NUM number
, ACTION VARCHAR2(1)
CREATE OR REPLACE TYPE ACCOUNT_MAINT_COMMENT_COL_T AS TABLE OF ACCOUNT_MAINT_COMMENT_T;
=====================================================
This is how I am trying to execute:
Declare
pv_account_version account_version_t := account_version_t(null
, account_maint_t ( 10041
, '11111111'
, 'N'
,'abc'
, NULL
, NULL
, NULL
, 1
,NULL-- 'I'
,ACCOUNT_MAINT_VERSION_T(10031
, 10001
, NULL
,'Legal entity'
,22
,NULL
,'abc'
,NULL
, NULL
,NULL
, 1
,NULL --'I'
,ACCOUNT_MAINT_COMMENT_COL_T(
10031
,10001
,1001
,'My first comment'
,'abc'
, NULL
, NULL
, NULL
, 1
, 'I')
Begin
pkg_cdm_process_v2.iud_account(pv_account_version);
END;
SQL> /
Declare
ERROR at line 1:
ORA-06531: Reference to uninitialized collection
ORA-06512: at "ACEENG.PKG_CDM_PROCESS_V2", line 799
ORA-06512: at line 27
What am I doing wrong here....
Please help.Hi,
Here is the table structures, data is in my procedure call.
I get error only while testing for 'account_maintenance_comment' table, if I comment this part in my procedure, i won't get this error.
CREATE TABLE ACCOUNT_MAINTENANCE
AM_KEY_ID NUMBER(32) NOT NULL,
ACCT_CUSIP VARCHAR2(12) NOT NULL,
AM_ORIG_CRE_TMSTP TIMESTAMP(6) NOT NULL,
AM_ORIG_USR_ID VARCHAR2(20) NOT NULL,
DELETE_IND VARCHAR2(1) NULL,
ADD_USR_ID VARCHAR2(20) NOT NULL,
ADD_TMSTMP TIMESTAMP(6) NOT NULL,
UPD_USR_ID VARCHAR2(20) NULL,
UPD_TMSTMP TIMESTAMP(6) NULL,
LOCK_LEVEL_NUM NUMBER(32) NOT NULL
CREATE TABLE ACCOUNT_MAINTENANCE_VERSION
AM_KEY_ID NUMBER(32) NOT NULL,
AM_VER_NUM NUMBER(32) NOT NULL,
ACCT_CUSIP VARCHAR2(12) NOT NULL,
SNAME VARCHAR2(20) NULL,
LNAME VARCHAR2(40) NULL,
EXT_ACCT_NUM NUMBER NULL,
ADVISOR_NM VARCHAR2(40) NULL,
SUB_ADVISOR_NM VARCHAR2(40) NULL,
LEGAL_ENTITY VARCHAR2(100) NULL,
DISP_PWR_ADVISOR_NM VARCHAR2(40) NULL,
VOT_PWR_ADVISOR_NM VARCHAR2(40) NULL,
ACCT_TYP_CD VARCHAR2(10) NULL,
ACCT_PUBLIC_NM VARCHAR2(40) NULL,
CLIENT_TYP_CD VARCHAR2(1) NULL,
CUSTODIAN_NM VARCHAR2(40) NULL,
NATIONALITY VARCHAR2(40) NULL,
PORTF_TEST_IND VARCHAR2(1) NULL,
PILOT_PORTF_IND VARCHAR2(1) NULL,
ELIG_IND_13DG VARCHAR2(1) NULL,
RR_EXCLUDE_IND VARCHAR2(1) NULL,
APPR_STATUS_REF_ID NUMBER(32) NULL,
NEXT_REVIEW_TMSTMP TIMESTAMP(6) NULL,
FUND_INACTIVE_TMSTMP TIMESTAMP(6) NULL,
LAST_APPR_USR_ID VARCHAR2(20) NULL,
LAST_APPR_TMSTMP TIMESTAMP(6) NULL,
INACTIVE_IND VARCHAR2(1) NOT NULL,
ADD_USR_ID VARCHAR2(20) NOT NULL,
ADD_TMSTMP TIMESTAMP(6) NOT NULL,
UPD_USR_ID VARCHAR2(20) NULL,
UPD_TMSTMP TIMESTAMP(6) NULL,
LOCK_LEVEL_NUM NUMBER(32) NOT NULL,
CREATE TABLE ACCOUNT_MAINTENANCE_COMMENT
AM_KEY_ID NUMBER(32) NOT NULL,
AM_VER_NUM NUMBER(32) NULL,
COMMENT_NUM NUMBER(32) NOT NULL,
COMMENT_TMSTP TIMESTAMP(6) NOT NULL,
COMMENT_TXT VARCHAR2(400) NULL,
INACTIVE_IND VARCHAR2(1) NOT NULL,
ADD_USR_ID VARCHAR2(20) NOT NULL,
ADD_TMSTMP TIMESTAMP(6) NOT NULL,
UPD_USR_ID VARCHAR2(20) NULL,
UPD_TMSTMP TIMESTAMP(6) NULL,
LOCK_LEVEL_NUM NUMBER(32) NOT NULL)
Maybe you are looking for
-
Hello everyone. If someone can help... I've got some data that I need to present to an XSLT in the following way : <?xml version="1.0" encoding="UTF-8"?> <process id="4.1" title="Project Plan Development"> <block type="inputsList"> <it
-
The operation could not be completed
This messagqe appears when trying to view videos in YouTube. No videos will run. I updated to OS5 some days ago, and YouTube worked nicely...
-
Including dynamically generated jpg files in a report in PDF
Hi all, hope I'm in the right forum. We have an issue with images we must include in a report, when the report output format is PDF. We are using these versions for Reports etc... : Report Builder 10.1.2.0.2 ORACLE Server Release 10.1.0.4.2 Oracle Pr
-
DB authentication for Reports 10g
Hi Following is our environment Oracle Application Server 10g (10.1.2.3.0) - Infrastructure and Middle Tier on same node. Oracle Database 10g R2 (10.2.0.1.0) Current Situation We are running Forms/Reports 10g that were upgraded from 6i Client-Server
-
Hi all, I want up load RG-1 register initial entry stocks can any body guide me please regards bvdv