Error When Deleting From A Trigger

When I use a trigger to delete from my Oracle Spatial table, the triggering delete statement will fail if the Oracle Spatial table has a spatial index.
Details:
Tables CHEV_WELLBORE and CHEV_WELLBORE_SDO need to stay in sync. CHEV_WELLBORE_SDO has an sdo geometry column plus foreign keys to join back to CHEV_WELLBORE. When you delete from CHEV_WELLBORE, my trigger is supposed to delete the related row from CHEV_WELLBORE_SDO. When I execute the DELETE FROM CHEV_WELLBORE (one row), it processes for a minute or two then fails with an End Of Communications error. If I try the same thing without the spatial index on CHEV_WELLBORE_SDO it works fine. Can anyone see what I'm doing wrong here?
Connected to:
Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production
SQL> drop INDEX CHEV_WELLBORE_SPX force;
Index dropped.
SQL> CREATE OR REPLACE TRIGGER SYNC_WELLBORE_SDO_D
2 AFTER DELETE
3 ON CHEV_WELLBORE
4 FOR EACH ROW
5 WHEN ((old.NO2_BH_LONGITUDE IS NOT NULL AND old.NO2_BH_LATITUDE IS NOT NULL) OR (old.NOD_SURFACE_LONGITUDE IS NOT NULL AND old.NOD_SURFACE_LATITUDE IS NOT NULL))
6 BEGIN
7
8 -- Keep the CHEV_WELLBORE_SDO table in sync with CHEV_WELLBORE
9
10 DELETE FROM CHEV_WELLBORE_SDO WHERE CHEVNO = :old.CHEVNO AND SIDETRACK = :old.SIDETRACK;
11
12 EXCEPTION
13 WHEN OTHERS THEN
14 null; -- Do Nothing, and allow triggering statement to continue without error.
15
16 END;
17 /
Trigger created.
SQL>
SQL> DELETE FROM CHEV_WELLBORE WHERE CHEVNO = '123456';
5 rows deleted.
SQL> ROLLBACK
2 ;
Rollback complete.
SQL> CREATE INDEX CHEV_WELLBORE_SPX
2 ON CHEV_WELLBORE_SDO(GEOMETRY)
3 INDEXTYPE IS MDSYS.SPATIAL_INDEX
4 PARAMETERS (' SDO_LEVEL=14 SDO_NUMTILES=0 SDO_MAXLEVEL=32')
5 ;
Index created.
SQL> DELETE FROM CHEV_WELLBORE WHERE CHEVNO = '123456';
DELETE FROM CHEV_WELLBORE WHERE CHEVNO = '123456'
ERROR at line 1:
ORA-03113: end-of-file on communication channel

Does your DELETE key have an associated After-Process-Branch? Does you page have an "unconditional" Branch. Your unconditional one should have the highest sequence number (of all your branches).
If you have one assinged to the DELETE key, can you check to see what Page or URL is referenced withint that After-Process-Branch.

Similar Messages

  • Error when deleting from Tabular Form

    Hello,
    I have created a Tabular Form on a report based on a table in my database. I used the Wizard to create the form and included the standard 'Cancel', 'Delete' and 'Add Rows' buttons. When I try to delete rows by ticking them and then clicking 'Delete' , I get the standard explorer 'Page Cannot be Found' error with a URL of http://htmldb.oracle.com/pls/otn/wwv_flow.accept
    Any ideas what could be causing this?
    Thanks
    Simon

    Does your DELETE key have an associated After-Process-Branch? Does you page have an "unconditional" Branch. Your unconditional one should have the highest sequence number (of all your branches).
    If you have one assinged to the DELETE key, can you check to see what Page or URL is referenced withint that After-Process-Branch.

  • Error On deleting from table

    Hello Experts.
    I am getting error when deleting from table.
    please help me.I had given my error.
    If possible also tell me how to trace this error.
    java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
         at java.util.ArrayList.RangeCheck(ArrayList.java:507)
         at java.util.ArrayList.get(ArrayList.java:324)
         at com.sap.tc.webdynpro.progmodel.context.Node$ElementList.getElement(Node.java:2034)
         at com.sap.tc.webdynpro.progmodel.context.Node.isMultiSelected(Node.java:841)
         at com.sap.tc.webdynpro.progmodel.context.Node.isMultiSelected(Node.java:839)
         at try1.comp1.TableView.onActionDelete_Entry(TableView.java:191)
         at try1.comp1.wdp.InternalTableView.wdInvokeEventHandler(InternalTableView.java:191)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
         at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:759)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:712)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    This Is the code of delete function.
    //@@begin onActionDelete_Entry(ServerEvent)
             int Count=wdContext.nodePerson().size();
             int LeadSelcection=wdContext.nodePerson().getLeadSelection();
             for(int i=0;i<Count;i++)
                  if( (i==LeadSelcection) || wdContext.nodePerson().isMultiSelected(i))
                       wdContext.nodePerson().removeElement(wdContext.nodePerson().getElementAt(i));
                  }//if
             }//for
        //@@end

  • I'm unable to open up Lightroom 5, I get this message in a pop up box: "Lightroom encountered an error when reading from it's preview cache and needs to quit" Underneath  that is "Lightroom will attempt to fix this problem the next time when it launches."

    I'm unable to open up Lightroom 5, I get this message in a pop up box: "Lightroom encountered an error when reading from it's preview cache and needs to quit" Underneath  that is "Lightroom will attempt to fix this problem the next time when it launches."  It hasn't, what should I do? Thanks Shawn (Irish Se7en) .

    Can you try to rename (not delete!) the folder named "YOUR_CATALOG_NAME Previews.lrdata" and restart Lightroom?

  • LR encountered an error when reading from its preview cache and needs to quit.

    I have the 30 day trial version of Lightroom.  I was able to use it for one week, but the past 1.5-2 weeks, it has been locked up and giving this error message.  How do I resolve the problem?  And how do I reset the 30 day free trial?  I would like to have time using the product, before deciding on the annual contract.
    "LR encountered an error when reading from its preview cache and needs to quit.  Lightroom will attempt to fix this problem the next time it launches."
    Thank you.

    Delete the preview cache from the Lightroom folder in your Pictures folder if you used the default placement. It has the extension .lrdata.
    You cannot reset the trial period.

  • I keep receiving this error every time I open LR, "Lightroom encountered and error when reading from its preview cache and needs to quit" and the app won't open. It said LR would try and fix this error next time I opened it but the error remains. I tried

    I keep receiving this error every time I open LR, "Lightroom encountered and error when reading from its preview cache and needs to quit" and the app won't open. It said LR would try and fix this error next time I opened it but the error remains. I tried uninstalled and installing the app and the error remains. I have windows 8. Can anyone please help???

    Use Windows Explorer to open the folder containing your catalog. The normal location is Pictures\Lightroom. Locate a folder with the extension .lrdata and delete that folder. Then you should be able to start Lightroom again, and Lightroom will begin building and new previews folder. Do not delete anything else.

  • Upgraded to 5.4 when opening lightroom get a message "encountered an error when reading from its preview cache and need to quite" tried this several time but get the same eror message

    Upgraded to 5.4 when opening lightroom get a message "encountered an error when reading from its preview cache and need to quite" tried this several time but get the same error message.  Says Lightroom will attempt to fix the problem the next time it launches but that is not happening.  How do it fix this?

    Delete the preview cache using your operating system. It is a folder whose name ends with Previews.LRDATA. Do not delete the Lightroom catalog, which ends with .LRCAT

  • When backing up lightroom 4 catalog, get message "lightroom encountered an error when reading from its preview cache and needs to quit" this occurs during optimization stage of backup

    i upgraded from lightroom 4 to lightroom 5 and installed it on a separate hard drive. Initially had no problems util my computer crashed due to the failure of the drive on which Lightroom 5 was installed. Since having my computer rectified, i am unable to use lightroom 5 getting the message "lightroom encountered an error when reading from its preview cache and needs to quit"
    I can still use lightroom 4, however, i get the same message when i try to backup the catalog. This occurs during the optimisation phase of backup.
    I suspect it is related to Lightroom 5 creating a catalog from the Lightroom 4 files and cannot now locate those files or that they have been corrupted.
    Would appreciate any solutions / suggestions.

    You need to delete your preview cache and have Lightroom rebuild it.   Cache location can be found here.
    https://helpx.adobe.com/lightroom/kb/preference-file-locations-lightroom-41.html
    Why And How To Clear Your Lightroom Cache - Lightroom Fanatic

  • Lightroom encountered an error when reading from its preview cache and needs to quit.  Lightroom will attempt to fix this problem the next time it launches"."

    Lightroom encountered an error when reading from its preview cache and needs to quit. Lightroom will attempt to fix this problem the next time it launches"."Help
    Please

    Stan Blumberg wrote:
    I have deleted the file but the message persists even after restarting the computer....any advice??...I am using LR 5
    You don't delete a file, you have to delete a folder. Is that what you did?
    If you deleted the folder specified above, and you still get the message, then it's the wrong folder. Use your operating system's search function and find ALL folders on ALL disks whose name ends with Previews.LRDATA, delete each one found, and then try opening Lightroom.

  • Lightroom encountered an error when reading from its preview cache and needs to quit.   Lightroom will attempt to fix this problem next time it launches. " But it doesn't fix it!

    I get the following window on loading Lightroom 5.7 -
    Lightroom encountered an error when reading from its preview cache and needs to quit.
    Lightroom will attempt to fix this problem next time it launches.
    I have tried several restarts, without success. Also reinstalled Lightroom; no joy
    Any suggestions?

    Using your system browser (Windows Explorer or Finder), open the folder that contains your catalog. In Windows it is in your pictures folder and then in a Lightroom folder. Inside of the Lightroom folder you will find another folder that has the extension .lrdata. It will have the same name as your catalog except for the extension. You need to delete that folder, and then start Lightroom again. Lightroom will generate a new previews folder, and you should be back in business.

  • Everytime I open lightroom I get a pop up message saying "Lightroom encountered an error when reading from its preview cache and needs to quit" and it closes. Ive already tried reinstalling, nothing seems to work. Help please!

    Every time I open lightroom I get a pop up message saying "Lightroom encountered an error when reading from its preview cache and needs to quit" and it closes. Ive already tried reinstalling, nothing seems to work. Help please!

    Open the folder containing your catalog. In that folder you will find another folder with the extension .lrdata, and you need to delete that folder. After you do that, Lightroom should start normally and will create a new preview cache.

  • Lightroom crashes at start up with the error message "Lightroom encountered an error when reading from its preview cache and needs to quit".  Please advise on how to fix this error.  Thanks

    Lightroom crashes at start up with the error message "Lightroom encountered an error when reading from its preview cache and needs to quit".  Please advise on how to fix this error.  Thanks

    You probably need to delete your preview cache.  See here  
    Why And How To Clear Your Lightroom Cache - Lightroom Fanatic
    Preference and other file locations in Lightroom 5

  • LRCC Error: Lightroom encountered an error when reading from its preview cache and needs to quit.

    I just upgraded from LR 5.7.1 to LRCC a couple of days ago.  After working with a collection of images in Lightroom CC, this message popped up: "Lightroom encountered an error when reading from its preview cache and needs to quit."  What do I need to do to remedy this?  Thanks!

    Quit Lightroom
    Then trash the preview cache. It’s in the main catalog folder.
    Delete the folder with the ending Previews.lrdata
    The default location for the Lightroom folder is normally Pictures/My Pictures if you did a standard installation.
    Re-launch Lightroom after deleting the Previews folder.
    N.B. do not touch files ending .lrcat

  • Help.."Lightroom encountered an error when reading from its preview cache and needs to quit"..

    Can some one please help me with this error message I keep getting.  I was told to uninstall LR and reinstall it and I am still getting the same error message.  "light room encountered an error when reading from its preview cache and needs to quit"..

    Go to the folder containing your catalog, and delete the folder that ends in .lrdata. Then start Lightroom, and it will create a new preview file, and you should be good to go.

  • Error Message "Lightroon encountered an error when reading from its preview cache and needs to quit"

    Error Message "Lightroon encountered an error when reading from its preview cache and needs to quit"
    It says thes everytime I try to open Lightroom and then quits the program.
    Help please--thanks

    Using your system browser, go to your catalog folder and look for a folder with the extension .lrdata and delete that folder. You will have the same name as your catalog but with the different extension. DO NOT make the mistake and delete your catalog. After you delete that folder Lightroom should start and will begin building a new previews folder.

Maybe you are looking for