Uploaded image for project: 'JSword'
  1. JSword
  2. JS-173

Error reading GenBook (Pilgrim's Progress)

    Details

      Description

      I think this is a JSword error, unless I am doing something wrong. I am getting an Exception when trying to read Pilgrim's Progress and have a simple way to reproduce it.

      Here is my test. The only custom bit below is my getBook method. The error occurs on the getSAXEventProvider line

      Book book = getBook("Pilgrim");
      Key key = book.getKey("THE FIRST STAGE");
      BookData data = new BookData(book, key);
      SAXEventProvider osissep = data.getSAXEventProvider();

      Here is the StackTrace:
      org.jdom.IllegalAddException: The Content already has an existing parent "seg"
      at org.jdom.ContentList.add(ContentList.java:209)
      at org.jdom.ContentList.add(ContentList.java:131)
      at org.jdom.ContentList.addAll(ContentList.java:283)
      at org.jdom.ContentList.addAll(ContentList.java:253)
      at org.jdom.Element.addContent(Element.java:827)
      at org.crosswire.jsword.book.filter.thml.IgnoreTag.processContent(IgnoreTag.java:53)
      at org.crosswire.jsword.book.filter.thml.CustomHandler.endElement(CustomHandler.java:164)
      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:1782)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938)
      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:511)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
      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:119)
      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 org.crosswire.jsword.book.filter.thml.THMLFilter.parse(THMLFilter.java:154)
      at org.crosswire.jsword.book.filter.thml.THMLFilter.cleanParse(THMLFilter.java:109)
      at org.crosswire.jsword.book.filter.thml.THMLFilter.toOSIS(THMLFilter.java:70)
      at org.crosswire.jsword.book.sword.SwordGenBook.getOsisIterator(SwordGenBook.java:129)
      at org.crosswire.jsword.book.BookData.getOsisContent(BookData.java:157)
      at org.crosswire.jsword.book.BookData.getOsisFragment(BookData.java:100)
      at org.crosswire.jsword.book.BookData.getSAXEventProvider(BookData.java:113)
      at net.bible.service.sword.SwordApiTest.testReadPilgrimsProgress(SwordApiTest.java:128)

        Attachments

          Activity

            People

            • Assignee:
              dmsmith DM Smith
              Reporter:
              mjdenham Martin Denham
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: