How Dom parser in jdk1.4 could not  run in jdk1.5?

Hi,guys,I've wrote a class to parse XML file some easily for me , such as
package eisen.util;
* <p>Title: E-Future Pos Software</p>
* <p>Description: A new version for E-Future Pos software on Linux text terminal and Windows GUI.</p>
* <p>Copyright: E-Future Copyright (c) 2002</p>
* <p>Company: E-Future</p>
* @author Eisen Wang
* @version 1.0
import java.util.*;
//import org.apache.xerces.parsers.*;
import java.io.*;
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import org.w3c.dom.*;
public class Configurator
      * Constructor. Build by a xml file containing infomations about the node
      * @param fileName a String point to the XML file
     public Configurator(String fileName)
          try
               DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
               DocumentBuilder parser = factory.newDocumentBuilder();
               document = parser.parse(fileName).getFirstChild() ;
          }catch(Exception e)
               e.printStackTrace() ;
               return;
//          document = parser.getDocument() ;
           * Now we get the real root node of whole document, but it's not
           * the actual first availble node . So we have to proceed the 1st child
           * node of it.
          NodeList nl = document.getChildNodes() ;
          document = nl.item(0) ;
     * constructor.build a confgurator by the root node
     * @param node root node of the configuration file.
     public Configurator(Node node)
          document = node;
     * constructor. copy another configurator object to itself
     * @param c the original Configurator object
     public Configurator(Configurator c)
          document = c.document;
     * get the name of the root node.
     * @return String the name of root of whole document
     public String getName()
          String strTemp = document.getNodeName() ;
          return(strTemp);
     * get the string content of the node property
     * @param flag a string point to the corresponds property
     * @return a string of the property content or null if flag is not existed.
     public String getString(String flag)
          NamedNodeMap nm = document.getAttributes() ;
          if (nm==null) return(null);
          Node node = nm.getNamedItem(flag);
          if (node==null) return(null);
          String str = node.getNodeValue() ;
          return (str);
      * get the integer value of the node property
      * @param flag a string point to the corresponds property
      * @return the value of the property
     public int getInt(String flag)
          NamedNodeMap nm = document.getAttributes() ;
          Node node = nm.getNamedItem(flag);
          int val ;
          if (node!=null) val = Integer.parseInt(node.getNodeValue())  ;
          else val = 0;
          return (val);
      * get the succeeding XML configuration file
      * @return the filename recording in the XML file of the node.
     public Configurator getProfile()
          Configurator conf;
          try
               Node profile = document.getFirstChild() ;
               String filename = null;
               if (profile.getNodeType() == Node.TEXT_NODE )
                    filename = profile.getNodeValue() ;
               conf=new Configurator(filename);
          }catch(Exception e)
               conf = null;
          return (conf);
     * get all the Element child nodes of the root node usually the
     * child components of the container.
     * @return a Vector contains all the Configurators made by children nodes
     public Vector getChilds()
          if ((getString("profile")!=null)&&(getString("profile").toUpperCase() .equals("YES") ))
               Configurator conf = getProfile();
               if (conf != null) return(conf.getChilds() );
               else return(null);
          else
               Vector nl;
               nl = new Vector();
               NodeList nltemp = document.getChildNodes() ;
               for (int i=0;i<nltemp.getLength() ;i++)
                    Node node = nltemp.item(i) ;
                    if (node.getNodeType() == node.ELEMENT_NODE ) nl.add(new Configurator(node));
               return (nl);
      * get all the Element child nodes named of 'name' of the root node usually the
      * child components of the container.
      * @param name the assigned name of selected nodes
      * @return all the Configurators made by children nodes named of 'name'
     public Vector getChilds(String name)
          if ((getString("profile")!=null)&&(getString("profile").toUpperCase() .equals("YES") ))
               Configurator conf = getProfile();
               if (conf != null) return(conf.getChilds() );
               else return(null);
          else
               Vector nl;
               nl = new Vector();
               NodeList nltemp = document.getChildNodes() ;
               for (int i=0;i<nltemp.getLength() ;i++)
                    Node node = nltemp.item(i) ;
                    if ((node.getNodeType() == node.ELEMENT_NODE)&&(node.getNodeName() .equals(name))) nl.add(new Configurator(node));
               return (nl);
     public Configurator getChild(int no)
          Vector nltemp = getChilds();
          Configurator temp = (Configurator)nltemp.get(no) ;
          return (temp);
      * a Node of the configuration point to the actual root.
     private Node document;
}This class could run well on jdk1.4, but while using jdk1.5, compling report no error but it would report "java.lang.VerifyError: (class: com/future/DataCommit, method: <init> signature: ()V) Incompatible object argument for function call" in run-time. I don't know how to solve it, and checked out all the file on internet I found-- can't find what error in my code. Please help me to correct it . Thanks a lot.

Yeah .of course. the error occurs while init the DataCommit object in main(),and the error message is *"java.lang.VerifyError: (class: com/future/DataCommit, method: <init> signature: ()V) Incompatible object argument for function call"*
package com.future;
import java.io.*;
import java.util.*;
import eisen.util.*;
public class DataCommit
     protected Configurator m_config = null;
     protected String m_ip = null;
     protected int    m_port = 21;
     protected String m_localfolder = System.getProperty("user.dir");
     protected String m_localbackupfolder = System.getProperty("user.dir")+File.pathSeparator+"bak";
     protected String m_Store = null;
     public DataCommit()
          m_config = new Configurator("d:\\temp\\future.xml");
//          Configurator temp = (Configurator)m_config.getChilds("site").get(0);
//          m_ip = temp.getString("ip");
//          m_port = temp.getInt("port");
//          temp = (Configurator)m_config.getChilds("folder").get(0);
//          m_localfolder = temp.getString("local");
//          m_localbackupfolder = temp.getString("backup");
//          temp=(Configurator)m_config.getChilds("shop").get(0);
//          m_Store = temp.getString("id");
     public static void main(String[] args)
          DataCommit dataCommit1 = new DataCommit();
     public void commit()
}Edited by: Eisen on Oct 27, 2008 10:03 PM

Similar Messages

  • How do i solve The photo could not be opened, because the original item cannot be found

    How do i solve The photo could not be opened, because the original item cannot be found

    The issue is with iPhoto. When it opens it is looking for a photo that either no longer exists or is misplaced. I would post I the iPhoto forum where those experts are.

  • How can I trap the question 'Could not reserve record (2 tries). Keep tryin

    How can I trap the question 'Could not reserve record (2 tries). Keep trying ?'
    How can I trap the question 'Could not reserve record (2 tries). Keep trying ?'
    I want to know the error_code for this question before the 40501 error code.
    Thanks for the help.

    See
    Could not reserve record (2). Keep trying ?....

  • I recently updated and after the update i tried import my passwords and recieved XML parsing error. Passwords could not be imported.

    ''Duplicate post, continue here - [https://support.mozilla.com/en-US/questions/788710]''
    after a recent update to fire fox 3.6.13 i believe that was the version. I tried import my passwords all 30 of them or more I received this message XML parsing error. Passwords could not be imported. please help me to regain my passwords and to fix this problem so it wont happen again thank you

    Are you using the Password Exporter extension?

  • How to fix: Nokia Ovi Suite could not connect to t...

    How to fix: Nokia Ovi Suite could not connect to the Nokia account server
    https://profiles.google.com/111711145986835145800/posts/57KK7mZPLfL#111711145986835145800/posts/57KK...
    Please THANK me by clicking on the ****WHITE STAR** ( Giving KUDOS) the big GREEN BOX to your LEFT .
    It will help me to serve you better !!!!!
    Thanking You

    did this
    https://www.google.dk/search?q=itunes+iphone+error+0xE8000003&oq=itunes+iphone+e rror+0xE8000003&aqs=chrome..69i57.4857j0j7&sourceid=chrome&es_sm=91&ie=UTF-8
    got these
    https://discussions.apple.com/thread/5408879?tstart=0
    https://discussions.apple.com/message/12650630#12650630
    https://discussions.apple.com/message/23805897#23805897
    https://discussions.apple.com/message/23305865#23305865

  • Startup error message - Could not run this script because of a disk error.

    I uninstalled Dates-to-iCal-Launcher and couldn't find any info about how to uninstall it online (just dragged the icon from Applications to the Trash). Now every time I start my iBook, I get an error message from Dates-to-iCal Launcher (there is an icon that looks like a scroll on the left):
    Could not run this script because of a disk error.
    -43
    How do I get rid of this error message? It happens every time I turn on the computer. Thank you!

    thanks for the update.
    there is no risk when changing settings in any OS user interface like System Preferences etc.
    there could be some risk in manually deleting files from Library folders, which is done sometimes to uninstall applications.
    keep in mind to regularly back up important files.

  • 9ias setup exe could not run

    So that we may better diagnose DOWNLOAD problems, please provide the following information.
    - Server name : download.oracle.com...
    - Filename
    - Date/Time : 27,28 August 2002
    - Browser + Version : Internet explorer 6.0
    - O/S + Version : Windows XP 2002
    Hi,
    -After downloading and unzipping 9ias i could not run
    the setup.exe
    my computer has pentium 4
    i know there is aproblem with p4 and universal installer
    but what is the exact solution ?
    -I' am also wondering if there is a sertification with windows XP or not
    to not to waste my time
    Could anyone help me with this
    Waiting for a reply
    thanks !

    Hi,
    Please right click the setup.exe and choose run as administrator.
    Sometime, it may be caused by missing or corrupted system files, run SFC.
    Start>click cmd in the search box>type SFC/scannow.
    And sometimes other software, especially security type programs, can interfere with your installations.
    Test in Safe mode to see if the issue persists.
    Restart the computer, press F8 before the windows logo appears.
    If still cannot install, test with install .exe file in another computer. If the same issue, the issue may be the setup file itself. If can install in another computer, it may be the issue of the windows installer.
    Follow the steps in the kb to troubleshoot the issue.
    How to troubleshoot issues with Windows installer service
    http://support.microsoft.com/kb/2438651/en-us
    Regards,
    Ada Liu
    TechNet Community Support

  • Unable to install itunes 10,5.I receive this message: there is a problem with this window installer package. A program required for nthis install to complete could not run. Contact your support personnel or package vendor.Am using window ultimate 64 bits

    I am unable to install itunes 10,5. I receive this message: There is a problem with this window installer package. A program required for this install to complete could not run. Contact your support personnel or package vendor. I am using window 7 ultimate 64 bits

    There is a problem with the Window installer package. A program required for this intall to complete could not be run. Contact your support personnel or package venfor.
    Perhaps let's first try updating your Apple Software Update.
    Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
    If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time?

  • I wanted a solution to the problem I was having on Win 7 Pro Service Pack 1 in that links on an open Adobe Acrobat file will not open in my Firefox Browser 33.0.2. The Error I receive is "Acrobat could not run the web browser.  Unknown Error. (123)"

    I want a solution to the problem I was having on Win 7 Pro Service Pack 1 in that links on an open Adobe Acrobat Pro 10.1.12  file will not open in my Firefox Browser 33.0.2. The Error I receive is "Acrobat could not run the web browser.  Unknown Error. (123)"

    Change browsers. See what happens.
    Be well...

  • After downloading the mac os x 10.6.8 I can't open safari. It first told me that I could not run it with Safari 5.1 so I downloaded safari 6 because I had read that that would solve the problem. However I am still getting an error message. HELP!!

    After downloading the mac os x 10.6.8 I can't open safari. It first told me that I could not run it with Safari 5.1 so I downloaded safari 6 because I had read that that would solve the problem. However I am still getting an error message. HELP!!

    I see this on Apple's support page:
    Available for: OS X Lion v10.7.5, OS X Lion Server v10.7.5, OS X Mountain Lion v10.8 and v10.8.1

  • Web links in .pdfs inoperable- "Acrob. could not run the browser"

    I keep my Adobe Reader updated often, but I've been experiencing a severe inconsistency with the ability to open a (FFox) web page by clicking a link given by the author of any given .pdf., embedded in it. Sometimes it works and opens up the new FFox page OK. But maybe a little more than half the  time I first get a security warning, "The document is trying to connect to (URL). If you trust this site, choose 'Allow'. If you do not trust this site, choose 'Block' ".   So, I'll click 'allow' and then I get a window saying, "Acrobat could not run the web browser.    Unknown error (740).
    I've tried to find out more about an error 740, but there's no relation online between any error w/ that # and Adobe. It reads kind of contradictory anyway, since it says "unknown error" but then gives you an error #.  Ideas, anyone? Thanks.
    (Message was edited by: Victorious57)

    I'm having the same problem and have found a few suggestions from different places that may help.
    1. Add the site / host to the trusted sites list in Internet explorer. E.G http://hostname or file://hostname or hostname.
    2. In Adobe reader or Acrobat go to START>PREFERENCES>JAVA SCRIPT Untick 'enable Acrobat JavaScript'.
    3. Create the documents from open office and use the export to PDF option.
    The last option seemed to work when adding the hostname to the trusted sites list in IE 8 (IE 6 didn't work)
    One thing I noticed when I created PDF's this way is the link was displayed as file://hostname/share/doc.pdf.
    When I converted a document from MS Word 2007 and used Acrobat standard to convert the document the link was displayed as file://///host/share.doc.pdf.
    I'm not sure why the extra //// were added but it seems that MS word puts the hyperlink in this format.
    As I said creating the document in Open Office worked when I added the host in IE 8's trusted site list but this isn't acceptable for me due our SOE restrictions.
    Our setup is as follows..
    XP Pro SP2
    Internet Explorer 6
    Adobe Acrobat Standard 9.3

  • 'iTunes could not run because it had detected a problem with your audio...

    ...configuration.'
    I have just updated to the newest iTunes version from the latest version.
    I have installed iTunes and when I click 'iTunes' to launch iTunes, it says this 'iTunes could not run because it had detected a problem with your audio configuration.'
    I get the option to click 'OK' or 'Help'
    When I click 'OK' the window closes and then nothing happens.
    When I click 'Help' nothing happens.
    Any advice??

    It's probably QuickTime 7.3 that is the problem. Uninstall it and install version 7.2 instead. http://www.apple.com/support/downloads/quicktime72forwindows.html

  • Itunes could not run because some of its required files are missing. please

    After trying to run iTunes, I get the error message: "iTunes could not run because some of its required files are missing. please reinstall iTunes." It hasn't always done this, and I've had iTunes for years. Any ideas why it has just started now, and what I can do about it? Thanks

    have you tried reinstalling?

  • I could not run report on 9i

    hi
    i am using developer9i. and created a report named emp.rep
    but i could not run it. please tell me what can i do to run report
    but i have experience developer6i.
    thanks
    mostafiz

    They'll probably know more about this application over here.
    http://answers.microsoft.com/en-us/search/search?SearchTerm=math+input+panel&IsSuggestedTerm=false&CurrentScope.ForumName=&CurrentScope.Filter=&ContentTypeScope=#////1
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Could not run the web browser

    I've installed Reader 7.0.9 in order to read ebooks. When I try to activate the mobile device, reader responds with "Acrobat could not run the web browser. Unknown error. (0)". Is there a plug-in missing or corrupted control somewhere. Any suggestions. This is XP SP2 (and SP3) on a Dell Precision.
    Any suggestions.

    Let me amend my comment. Reader 7 might have been tested with XP SP2,
    but with all the changes in the OS due to security changes, OS changes
    and browser changes, Reader 8.1.3 or Reader 9 would be a better match to
    your software.
    Mike

Maybe you are looking for

  • Changing Depreciation Key for Tax for closed fiscal years -

    Hello, Hoping someone can help me with this question - Is it possible to change the depreciation key for closed fiscal years - we need to change it for Tax - books. And if yes - does it mean we need to open closed fiscal years ?? Thank you, Richa

  • Processing a Two-Step Group in parts

    Dear all, I am processing my Two step group with LT0e and would like to process it partially. Is there a way to do that? Some background: When Picking from one of the Storage Types I want to use a Return Storage Type. Since this applies to one Outbou

  • HTTP.RESPONSE in synch BPM

    Hello, I want to receive a XML message from a HTTP sender synchron into a BPM. In the BPM I have to to several steps, one is a mapping step and another is an asynchronus SEND of an IDOC to an R/3. I have setup this BPM and everything works ok. The BP

  • Want to update Skype on my Iphone, keep getting message saying:must use Itunes to download because item is over 20MB. How do I do THIS?

    I simply want to update the Skype app on my Iphone, but keep getting a message that says: must use itunes to download because item is 20MB. Help. Mack

  • Change propertyof array in subvi

    Hello, i know how to change a property of an OK-button. Now i have an array of OK-buttons. How can i change a property of one of the buttons in the array? See the attached VIs. In the top-vi i have two arrays. The "main-array" is the array where the