Results 1 to 1 of 1
  1. #1
    lse123 is offline Senior Member
    Join Date
    Oct 2008
    Posts
    116
    Rep Power
    0

    Default I tried debug failing: trying to include xml file contents to db table...

    I tried debug failing: trying to include xml file contents to db table... I attach...can you detect?
    xmlPlantToDB.java:170
    public void endElement(String namespaceURI,
    String sName, String qName) throws SAXException {

    if (state == 1) // here error does not go to endDocument( )
    searchonHand[j-1]=str;

    if (state == 2)
    searchname[j-1]=str; // line 170

    xmlPlantToDB.java:47
    parser.parse(new File(xmlFile), eventHandler); // line 47

    Java Code:
      Carnationjava.lang.NullPointerException   
          at xmlPlantToDB.endElement(xmlPlantToDB.java:170)   
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)   
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1774)   
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2930)   
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)   
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)   
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)   
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)   
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)   
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)   
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)   
          at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)   
          at javax.xml.parsers.SAXParser.parse(SAXParser.java:331)   
          at xmlPlantToDB.main(xmlPlantToDB.java:47)
    Attached Files Attached Files

Similar Threads

  1. how to include restart merkers in a JPEG file
    By ananta_javaforums001 in forum Networking
    Replies: 0
    Last Post: 04-09-2009, 03:29 PM
  2. How to include lib in JAR file
    By adam.muller in forum Eclipse
    Replies: 4
    Last Post: 08-06-2008, 05:15 PM
  3. Include file from other proyect
    By oleg_gunnar in forum Advanced Java
    Replies: 1
    Last Post: 03-08-2008, 06:20 PM
  4. Include Java file in HTML Page
    By kathyc in forum New To Java
    Replies: 2
    Last Post: 03-07-2008, 03:51 AM
  5. jsp:include and include file
    By Heather in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 07-14-2007, 04:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •