Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Pipe errors in NEP "String index out of range:"

    • Product: Primo
    • Product Version: all
    • Relevant for Installation Type: Dedicated-Direct, Direct, Local, Total Care

     

    Question

    What might be the reason for errors such as "String index out of range:" in a Pipe NEP stage

     

    Error from the log:

    2016-06-06 13:00:27,372 ERROR [t-NEP-bulk-2.PersistRecords] [c-BulkContext] - Adding record to failed records, record id=hhs-alma217364270002062,error=java.lang.StringIndexOutOfBoundsException: String index out of range: -4
            at java.lang.String.substring(String.java:1967)
            at com.exlibris.primo.publish.platform.frbr.extractor.SaxFRBRSectionExtractor.createKeyPart(SaxFRBRSectionExtractor.java:155)
            at com.exlibris.primo.publish.platform.frbr.extractor.SaxFRBRSectionExtractor.parseElement(SaxFRBRSectionExtractor.java:142)
            at com.exlibris.primo.publish.platform.frbr.extractor.SaxFRBRSectionExtractor.endElement(SaxFRBRSectionExtractor.java:116)
            at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
            at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
            at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
            at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
            at com.exlibris.primo.publish.platform.frbr.extractor.SaxFRBRSectionExtractor.extract(SaxFRBRSectionExtractor.java:69)
            at com.exlibris.primo.publish.platform.frbr.FrbrKeysBuilder.getPNXFRBRKeys_withKeys(FrbrKeysBuilder.java:222)
            at com.exlibris.primo.publish.platform.frbr.FrbrKeysBuilder.buildFrbrKeys_withKeys(FrbrKeysBuilder.java:181)
            at com.exlibris.primo.publish.platform.frbr.FrbrKeysBuilder.buildFrbrKeys(FrbrKeysBuilder.java:70)
            at com.exlibris.primo.publish.platform.nep.persistence.PersistenceTask.createFrbrKeys(PersistenceTask.java:514)
            at com.exlibris.primo.publish.platform.nep.persistence.PersistenceTask.insertAndUpdateRecords(PersistenceTask.java:258)
            at com.exlibris.primo.publish.platform.nep.persistence.PersistenceTask.execute(PersistenceTask.java:114)
            at com.exlibris.primo.publish.process.interceptor.NewSpringTransactionExecutionService$1.doInTransaction(NewSpringTransactionExecutionService.java:20)
            at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
            at com.exlibris.primo.publish.process.interceptor.NewSpringTransactionExecutionService.execute(NewSpringTransactionExecutionService.java:17)
            at com.exlibris.primo.publish.process.interceptor.exception.AbstractExceptionHandlerInterceptor.execute(AbstractExceptionHandlerInterceptor.java:15)

     

    Answer

    The issue might be that the NR for FRBR k1 or k2 or k3 does not add the $$K & $$A/$$AT/$$ATO in all rules. 
    You can test the NR on one of the failed records and check if it creates a frbr k1/k2/k3 values, with or without the $$K & $$A/$$AT/$$ATO. 

    If that is the case please fix the NR. 


    • Article last edited: 09-Jun-2016