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

ABP-Apostolic Bible Polyglot English Text causes indexing error

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7
    • Component/s: o.c.jsword.index
    • Labels:
      None

      Description

      There is a reference with a number that is larger than a Short and JSword throws an error on
      // Get the number after the G or H
      strongsNumber = Short.parseShort(m.group(2));

      I haven't analyzed the ABP to see exactly what is happening but this could be an error in the ABP.

      Exception in thread "Thread-20" java.lang.NumberFormatException: Value out of range. Value:"35887" Radix:10
      at java.lang.Short.parseShort(Unknown Source)
      at java.lang.Short.parseShort(Unknown Source)
      at org.crosswire.jsword.book.study.StrongsNumber.parse(StrongsNumber.java:243)
      at org.crosswire.jsword.book.study.StrongsNumber.<init>(StrongsNumber.java:63)
      at org.crosswire.jsword.index.lucene.analysis.StrongsNumberFilter.incrementToken(StrongsNumberFilter.java:71)
      at org.apache.lucene.index.DocInverterPerField.processFields(DocInverterPerField.java:189)
      at org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(DocFieldProcessorPerThread.java:244)
      at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:779)
      at org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:757)
      at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:2472)
      at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:2446)
      at org.crosswire.jsword.index.lucene.LuceneIndex.generateSearchIndexImpl(LuceneIndex.java:455)
      at org.crosswire.jsword.index.lucene.LuceneIndex.<init>(LuceneIndex.java:177)
      at org.crosswire.jsword.index.lucene.LuceneIndexManager$1.run(LuceneIndexManager.java:105)

        Attachments

          Activity

          Hide
          mjdenham Martin Denham added a comment -

          This does look like a Strong's error in ABP and ABPGrk at 1 Samuel 2:32
          Error Key:1 Samuel 2:32 Value out of range. Value:"35887" Radix:10
          Error Key:1 Samuel 2:32 Value out of range. Value:"35887" Radix:10

          In a similar way there are also Strong's number errors in ChiUn and ChiUns in the following verses:
          Error Key:Genesis 48:5 Value out of range. Value:"101961" Radix:10
          Error Key:Exodus 13:19 Value out of range. Value:"61006" Radix:10
          Error Key:Exodus 15:26 Value out of range. Value:"87899" Radix:10

          Show
          mjdenham Martin Denham added a comment - This does look like a Strong's error in ABP and ABPGrk at 1 Samuel 2:32 Error Key:1 Samuel 2:32 Value out of range. Value:"35887" Radix:10 Error Key:1 Samuel 2:32 Value out of range. Value:"35887" Radix:10 In a similar way there are also Strong's number errors in ChiUn and ChiUns in the following verses: Error Key:Genesis 48:5 Value out of range. Value:"101961" Radix:10 Error Key:Exodus 13:19 Value out of range. Value:"61006" Radix:10 Error Key:Exodus 15:26 Value out of range. Value:"87899" Radix:10
          Hide
          dmsmith DM Smith added a comment -

          I'm able to index it with the most recent code. The markup is screwy.

          I think that JSword should be able to absorb these errors. When you can verify that it works for you, please resolve it.

          Show
          dmsmith DM Smith added a comment - I'm able to index it with the most recent code. The markup is screwy. I think that JSword should be able to absorb these errors. When you can verify that it works for you, please resolve it.
          Hide
          dmsmith DM Smith added a comment -

          Changed the Short.parseShort() to Integer.parseInt

          Made some other improvements to make it more resilient.

          Show
          dmsmith DM Smith added a comment - Changed the Short.parseShort() to Integer.parseInt Made some other improvements to make it more resilient.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: