Question about removing a node.. getting 'not found in this context'  error

hi, i have the following code:
     public boolean deleteRunType(String runTypeName){
          //in this function we
          NodeList nl = Doc.getElementsByTagName("Run-Type");
          int numberOfNodes = nl.getLength();
          String attribute;
          NamedNodeMap attributes;
          for(int i=0;i<numberOfNodes;i++){
               attributes = nl.item(i).getAttributes();
               if(attributes!=null){
                    Node attributeNode = attributes.getNamedItem("name");
                    if(attributeNode!=null){
                         attribute = attributeNode.getNodeValue();
                         System.out.println("Comparing:  attribute = " + attribute + "   to runTypeName = " + runTypeName);
                         if(attribute.compareTo(runTypeName) == 0){
                              System.out.println("Match!");
                              Doc.removeChild(nl.item(i));
                    }//end if
               }//end if
          }//end for
          return true;
//definition of Doc:
                    DocumentBuilder DB  = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                    Doc           = DB.parse(xmlFile);anyways, i am getting an error:
org.apache.crimson.tree.DomEx: NOT_FOUND_ERR: That node does not exist in this context.
     at org.apache.crimson.tree.ParentNode.removeChild(Unknown Source)
     at RunType.RunTypeXMLWriter.deleteRunType(RunTypeXMLWriter.java:58)
     at RunType.RunTypeXMLWriter.main(RunTypeXMLWriter.java:81)when i run it. it crashes on the Doc.removeChild(nl.item(0)); line.
why is this? I grabbed the child directly from the list, so it should exist in this
context. Maybe i don't understand the context.
Any ideas or suggestions? Thank you SO much for all the help. i am finally
starting to get the hang of XML, but i still have some hangups!

This is not an uncommon problem.
When you do getElementsByTagName() on a document, you get all elements by that name that anywhere in the tree of the document.
When you do a removeChild, you need to be pointing to the parent of the element you are removing.
If you change the removeChild line to :
Node parent =  nl.item(i).getParentNode();
parent.removeChild( nl.item(i) );Also, it is generally not done to use a capital letter to start the name of an instance, such as "Doc". Initial capital letters are usually reserved for class names.
Dave Patterson

Similar Messages

  • IMac:  I type in an IP Address to view my home camera system.  I get a screen : please click icon to load and install webkitplugin:  I hit enter and get: not found.  This IP address works on my iPhone to view my camera system. Help!

    iMac:  I type in an IP Address to view my home camera system.  I get a screen : please click icon to load and install webkitplugin:  I hit enter and get: not found.  This IP address works on my iPhone to view my camera system. Help!

    Search the support website or contact the helpdesk of the equipment supplier. That would be the first place I'd try.

  • 404 Not Found nginx - this is error occured while surfing for any kind of searching sites, please help

    404 Not Found
    nginx -support.mozilla.com : server does not support RFC 5746, see CVE-2009-3555
    Warning: Error in parsing value for 'display'. Declaration dropped.
    Source File: https://support.mozilla.com/en-US/questions/new?product=beta&category=b5&search=404+Not+Found+nginx+-+this+is+error+occured+while+surfing+for+any+kind+of+searching+sites%2C+please+help
    Line: 0
    Warning: Unknown property 'box-flex'. Declaration dropped.
    Source File: https://support.mozilla.com/en-US/questions/new?product=beta&category=b5&search=404+Not+Found+nginx+-+this+is+error+occured+while+surfing+for+any+kind+of+searching+sites%2C+please+help
    Line: 0

    Warning Unresponsive Script
    * https://support.mozilla.com/en-US/kb/Warning%20Unresponsive%20script
    Troubleshooting extensions and themes
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
    Check and tell if its working.

  • "The requested URL /apex/f was not found on this server" error

    Hi there
    I'm getting the following error message when trying to access our apex app:
    http://theHost:8080/apex
    The requested URL /apex/f was not found on this server
    It just happened out the blue so i've no idea what happened. Can someone help me to find a solution asap?
    Many thanks, Jon

    How did you fix this, please? I'm getting the same error, and none of the solutions on this forum apply.
    Edited by: Jean-Marc, UK on Mar 16, 2010 2:34 PM

  • BUG: URL /apex/wwv_flow.accept was not found on this server error

    Hi all,
    I have a page with 3 regions:
    - pl/sql(javascript, html)
    - chart
    - html(form)
    Everything works fine until I add a html table to my pl/sql region.
    When I do this I can't create any records anymore(html form).
    When I press the create button on the html form it results in:
    The requested URL /apex/wwv_flow.accept was not found on this server.
    When I delete the html table on my pl/sql region, the create button works fine.
    It seems like somekind of bug, is there a way to get around this.
    Thanx,
    Pim

    Hi,
    When I add (in the pl/sql region with htp.p procedure)the code below:
    <table summary="" cellspacing="0" cellpadding="0" border="0"
    width="100%">
    <tr>
    <td align="left" nowrap="nowrap" align="left" colspan="2">
    <input type="BUTTON" value="Test"
    onclick="javascript:TestOnDemand()">
     Adres
     <input type="text" name="address" size="30" maxlength="200"
    value=""/>
     Land
     <input type="text" name="land" size="30" maxlength="200"
    value=""/>
    </td>
    </tr>
    </table>
    The create button on the third(html_form) will result in the error.
    I did some more tests, it's the button in the above table which causes the error. When I delete the button all is OK. It seems that the dynamic html button has somekind of conflict with the form(html region) button. When I replace the table with a form it makes no difference.
    The reason why I'm doing this, is that I need button on the page which doesn't do a 'dosubmit' (page reload). In a standard htmldb button there's always a 'dosumbit' present. I posted another thread, which confirmed this.
    Thanx,
    Pim

  • Advice for recovering from "The requested URL was not found on this server" error when browsing photos and videos on my iPhone 4S IOS5.1

    Im not quite sure how I got into this situation but I have fried my Iphone app photo and video library.  This demonstrates itself in 2 ways
    1. The above error message when I attempt to play videos older than a certain date.
    2. Photos older than a certain date - appear to be grainy suggesting that only the thumbnails are on the phone, and the full resolution photos have been blitzed.
    This coruption may have occured as I have replaced my Iphone 2 times in the last few months for various reasons, where each time I have restored them both using back ups I have made using icloud.  (I havent made an Itunes back up since the iclod came around)
    In reading the support forums - it suggest to restore from a back up version.  Is anyone aware if selectively restoring media content from an icloud back up is possible.
    I have 2 Back Up versions on icould.
    1- 13.5 GB
    2- 7.2 GB
    My hope is that the earlier 13.5 GB version has content I am looking for.
    I am kicking myself for not making the occassional itunes back up, or at least use Image capture as a more secure way of ensuring my personal content is not lost. (I am loosing faith with icould).
    Can someone suggest a good workflow for restoring from a cloud back up.  I have already downloaded the most recent photos using image capture onto my mac.
    Kiwi Grant

    Progress Update.
    I made a back of what existing phtos and Videos I had on my Iplhone.  I used Image capture to do this making an entire back up of photos and videoa that were still intact on the phone.
    Image capture is god for this purpose, as it does exactly what you ask it to do without applying any rules or squishing the files back into iphote (which might also be corupted) 
    Image capture wil do the basic function of retriving the contents of the phone and save them as native files on your hard drive.
    Once I did this I erased my iphone, and re intitialised it restoring an older back up from icloud.
    As the retore was happneing - I did retreive the missing files that cuased the intial beviour as above, and I could play the videos that were missing in the above scenerio.  The wierd ting was however that even though the source files were now back on the device, the thumbnail previews were missing. Where I ahd balck thumb nails for server portions of the resotred content.
    I then went to bed as the restore is a long process.  When I woke up the library had library had cleaned itself up.  Mysteriously the prcess had deleted the files missing the their thumbnails.
    This is very perculiar and bad behavior.
    I am now repeating the process, and will attempt to download the missing content as it is restored and prior to the phone trying to fix itself.
    Here are the lessons learned.
    DO NOT rely on Photo Stream to keep back ups and synchornise videos from you IOS device. IT DOES NOT SUPPORT THIS CAPBILITY
    DO NOT rely on iCloud Back Up alone - always fd an occassional iTunes back up or more reliably still always take a back up of photos and video files using Image Capture to be doubly sure that you a have backd up any content.
    DO THIS NOW - dont wait to loose your phone ofr have your phone repaired by replacement at the apple Store.  (I did both :-(

  • The requested URL /apex/wwv_flow.accept was not found on this server

    I'm trying to create a report query in Apex 3.2.1
    Home>Application Builder>Application 100>Shared Components>Report Queries>Edit Report Query
    There are 5 queries and I'm trying to add additional queries, but when I click on Add Query I get the /apex/wwv_flow.accept was not found on this server error message page.
    I've had this message before in tabular view forms, where one cell will contain text that causes the error on update, but when the data is removed the page saves OK.

    Any result to this post?

  • The requested URL not found on this server

    Hi
    I was trying to export the output of a report to Excel spreadsheet using the technique mentioned in the below link
    http://htmldb.oracle.com/pls/otn/f?p=18326:54:4064128727007824::::P54_ID:1962
    and got a "requested URL pls/apex/x.excel_xml was not found in this server" error message. I have successfully created the procedure and it exists under the workspace schema with the correct permissions.
    What am I doing wrong?
    Thanks in advance.

    Hi Scott,
    Thanks for looking into this. I am using Oracle-Application-Server-10g/10.1.2.0.2 , Application Express Release 2.2 and Oracle Database 10g Enterprise Edition Release 10.2.0.1.0.
    My application and the oracle procedure I am trying to call (excel_xml) exists in the same workspace "testworkspace" . I ran the grant requst as "grant execute on excel_xml to public".
    But still I get the URL not found error message.
    Here is the error log from Apache
    [Wed Sep 20 08:35:59 2006] [error] [client 10.60.23.126] [ecid: 4141503397020,1] File does not exist: c:/orahome_1/apache/apache/htdocs/favicon.ico
    [Wed Sep 20 08:56:09 2006] [error] [client 10.60.23.126] [ecid: 3866626726665,1] mod_plsql: /pls/apex/report.excel_xml HTTP-404 \nreport.excel_xml: PROCEDURE DOESN'T EXIST\n
    [Wed Sep 20 09:03:38 2006] [error] [client 10.60.23.126] [ecid: 1976841578959,1] mod_plsql: /pls/apex/report.excel_xml HTTP-404 \nreport.excel_xml: PROCEDURE DOESN'T EXIST\n
    Really appreciate any help on this.
    Thanks.

  • The requested URL /discoverer/viewer was not found on this server

    hi
    In e-business suite 12.1.1 , In projects super user responsibility when I want to open JSP forms like :
    Team Role Details Workbook and Overcommitted Resource Hours Workbook and Scheduled Resource Hours Workbook This error take place :
    Not Found
    The requested URL /discoverer/viewer was not found on this server.
    i think this is not related to Oracle Projects, i think it should solve by It.
    can any body tell me what should i do???

    M.Khayatan wrote:
    hi
    In e-business suite 12.1.1 , In projects super user responsibility when I want to open JSP forms like :
    Team Role Details Workbook and Overcommitted Resource Hours Workbook and Scheduled Resource Hours Workbook This error take place :
    Not Found
    The requested URL /discoverer/viewer was not found on this server.
    i think this is not related to Oracle Projects, i think it should solve by It.
    can any body tell me what should i do???Do you get this error with this specific page only?
    Please see these docs.
    11i: "NOT FOUND The requested URL /discoverer/viewer was not found on this server" Error When Attempting To Open Workbook From Apps Menu [ID 1327364.1]
    How to Create a Link to a Discoverer Workbook in Apps R12 [ID 471303.1]
    Using Discoverer 11.1.1 with Oracle E-Business Suite Release 12 [ID 1074326.1]
    Using Discoverer 10.1.2 with Oracle E-Business Suite Release 12 [ID 373634.1]
    Thanks,
    Hussein

  • Getting Error 'Root XML Node nqw not found in island!'

    I have upgraded my setup from OBIEE 11.1.1.5.0 to 11.1.1.5.1 and then uploaded a catalog created in older version, 11g itself.
    I'm able to run the dashboards and see all reports. They run absolutely fine, show all correct data.
    However if I try to edit report or try to open them in Answers module .... from anywhere (Catalog Link/ Edit option below reports in Dashboard) it gives me this error.
    " Root XML Node nqw not found in island! "
    It's strange. I tried following:
    1. doing a Upgrade of catalog by setting up parameter in instanceconfig.xml file
    <Catalog>
    <UpgradeAndExit>true</UpgradeAndExit>
    </Catalog>
    and then reverting back to false.
    2. Also tried the GUID upgarde by setting parameters in instanceconfig.xml file and NQSConfig.ini file
    none helped.
    Any help?

    Hi Naresh,
    I hope you have resolved the issue by this time.
    In my case, it was related to an invalid filter on the report.
    I have removed the filter by updating the report .xml file from Catalog Manager.
    Hope this helps other with similar issue.
    Thanks,
    Ravi

  • I get a message Debug Error:[Exception... "Node was not found" code: "8" nsresult: "0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)" location: "chrome://ffebayhot/content/lib/Extension.debug.js Line: 366"] using Vista. I don't understand how to delete the "ebay

    Every time I try to use google for a search, I get the following error msg. Debug Error:[Exception... "Node was not found" code: "8" nsresult: "0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)" location: "chrome://ffebayhot/content/lib/Extension.debug.js Line: 366"]. I saw the solution provided for MS XP, but not for Vista. Also, while I saw the solution, I need more explicit instructions on how to "delete the ebay extension".
    == This happened ==
    Every time Firefox opened
    == When I try to load google from Firefox, I get the error message, Debug Error:[Exception... "Node was not found" code: "8" nsresult: "0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)" location: "chrome://ffebayhot/content/lib/Extension.debug.js Line: 366"]

    Tools->Add-ons->Extensions
    At the top of the Firefox window, click on the Tools menu and select Add-ons. The Add-ons window will appear.
    In the Add-ons window, select the Extensions panel.
    Select the add-on you wish to uninstall.
    Click the Uninstall button. When prompted, click Uninstall to confirm.
    Then restart Firefox.
    Read here:
    [[Uninstalling add-ons|#How to uninstall extensions and themes|Uninstalling extensions]]

  • I get an error message when using google search: Debug Error:[Exception... "Node was not found" code: "8" nsresult: "0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)" location: "chrome://ffamazonhot/content/lib/Extension.debug.js Line: 366"]

    Debug Error:[Exception... "Node was not found" code: "8" nsresult: "0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)" location: "chrome://ffamazonhot/content/lib/Extension.debug.js Line: 366"]

    Tools->Add-ons->Extensions
    At the top of the Firefox window, click on the Tools menu and select Add-ons. The Add-ons window will appear.
    In the Add-ons window, select the Extensions panel.
    Select the add-on you wish to uninstall.
    Click the Uninstall button. When prompted, click Uninstall to confirm.
    Then restart Firefox.
    Read here:
    [[Uninstalling add-ons|#How to uninstall extensions and themes|Uninstalling extensions]]

  • OBIEE Error 'Root XML Node nqw not found in island!'

    Hello,
    After I altered my Hyperion Essbase structure, my OBIEE Reports don't open.
    I increase one generation in my accounts hierachy, and now when I try open my OBIEE reports, I get the follow error:
    "Root XML Node nqw not found in island"
    Any help?
    Thanks,

    Hi Naresh,
    I hope you have resolved the issue by this time.
    In my case, it was related to an invalid filter on the report.
    I have removed the filter by updating the report .xml file from Catalog Manager.
    Hope this helps other with similar issue.
    Thanks,
    Ravi

  • Call Library Function Node: library not found or failed to load

    Hello,
    I had a VI that could not find some of the dll functions it needed.  It works on one machine and not on another.  So foolishly I copied the dll in question from the working machine and pasted it over the one on the non-working machine. 
    Now all my math functions are broken on the machine I copied the dll too.  The error is "Call Library Function Node: library not found or failed to load"
    And if I try to relink in the VI I get "Error loading C:\National Instruments\LabVIEW 8.2\resource\lvanlys.dll" A dynamic link library (DLL) initialization routine failed."
    I tried a repair labview and that did not help.
    I tried uninstall and reinstall labview and that did not help!
    Please help me fix this!
    Version 8.2
    dll: C:\National Instruments\LabVIEW 8.2\resource\lvanlys.dll
    Jim

    What library did you first copy?
    Also lvanlys.dll depends on the Intel Math Kernel Library that gets installed in a different location "C:\Program Files\National Instruments\Shared\MKL".
    This Intel Math Kernel Library again depends on the Visual C runtime libraries. Most likely you replaced one of those runtime libraries somehow and now the Math Kernel Library (MKL) fails to initialize which causes thelvanlys.dll to fail its load.
    Without a good view on your system and what other NI software you have installed it is very hard to recommend a good way of proceeding. There are various versions of the MKL used by various versions of NI products and just deleting the entire MKL folder might get you into trouble with other NI tools.
    Deinstalling everything from NI, deleting the entire National Instruments folder and then reinstalling what you need would be the most safe proceeding.
    And next time don't just copy some Visual C runtime libraries between machines. Their dependencies are complicated at the least and simply not graspable by us mere mortals. Use the according C runtime installer for the version you need as that installer will take care of installing the right versions of C runtime components and registering everything proberly so you do not usually run into problems with other applications using different versions of the C runtime.
    Message Edited by rolfk on 03-01-2010 10:26 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • I purchased and downloaded a movie and when I it backed up to my computer it changed something and now when I try to watch the movie I get an error message that says "The request URL was not found on this server.? What do I need to do to correct it?

    I purchased a movie and downloaded it and when I conected my I Pod to my computer, now I get a message "The requested URL was not found on this server".   What do I do to fix it?

    Because the location for each song in your library is on your hard drive.  If the hard drive isn't there, how can iTunes play it?
    You'll have to move/copy the music from your hard drive to your computer's hard drive.
    Basically, EASIEST way to do all this, if you don't care about your play counts, etc...
    -Delete EVERYTHING from iTunes, so that your library is now empty.
    -Go to "Advanced" inside of the "Preferences" window, found in the "Edit" drop-down.  You can also access Preferences by pressing Ctrl+, (Press Ctrl and the comma key)
    -Change your iTunes Media Folder Location to something simple, but on your computer. I use C:/iTunes.  Make sure "Keep iTunes Media Folder Organized" and "Copy files to...." are both checked.  You can close Preferences now.
    -Now, drag and drop your music from your hard drive into your iTunes library.  iTunes will automatically add the music to your library, as you would expect, and also creates a copy of each file to place into that iTunes Media Folder you just created.
    Shouldn't have any more problems...

Maybe you are looking for

  • I deleted itunes from my old comp and downloaded to my new one but wont let me sync it without wiping it ?

    I recently bought me a new laptop. So I deleted my Itunes from my old computer and downloaded it to this one. Now when I try to hook it up to this comp it says"that it can only be linked to one computer at a time"? Now how do I get it not to erase al

  • Any way to monitor "task agents"?

    Forte system agents only seem to go down to the resolution of partitions, each of which may be actually be running multiple tasks. I have an application with several concurrent event loop tasks, all within the same partition, which communicate asynch

  • How to check null status of a ResultSet

    In my servlet program i'm tring to connect to a database and retrieve some values. Establishing the connection to the database working fine i can retrieve what ever the values from the desired table(empDetails),But my problem is if empDetails table i

  • Which user-exit or BAPI triggered when a schedule line is changed

    Dear All, Does anyone know which user-exit, enhancement or BAPI is triggered when we do change on schedule line item? Let's say, I have two line schedule line item, then I do change for delivery date. After triggered "Item Availability" button, syste

  • Welcome to Business Objects

    Hello and welcome to Business Objects, now a SAP Company ! We proudly present our new forum for Business Objects technologies related questions. The Business Objects forum will give you the possibility to share ideas, opinions and information with ot