Bug 52560

Summary: ArrayIndexOutOfBoundsException: -2 on NPOIFSFileSystem.readBAT
Product: POI Reporter: Maxim Valyanskiy <max.valjanski>
Component: POI OverallAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.8-dev   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Maxim Valyanskiy 2012-01-30 12:53:41 UTC
Tika's Excel extractor fails with following exception:

Exception in thread "main" org.apache.tika.exception.TikaException: Unexpected RuntimeException from org.apache.tika.parser.microsoft.OfficeParser@958bb8
	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:244)
	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
	at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
	at org.apache.tika.cli.TikaCLI$OutputType.process(TikaCLI.java:130)
	at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:397)
	at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:101)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -2
	at org.apache.poi.poifs.filesystem.BlockStore$ChainLoopDetector.claim(BlockStore.java:95)
	at org.apache.poi.poifs.filesystem.NPOIFSFileSystem.readBAT(NPOIFSFileSystem.java:396)
	at org.apache.poi.poifs.filesystem.NPOIFSFileSystem.readCoreContents(NPOIFSFileSystem.java:373)
	at org.apache.poi.poifs.filesystem.NPOIFSFileSystem.<init>(NPOIFSFileSystem.java:202)
	at org.apache.poi.poifs.filesystem.NPOIFSFileSystem.<init>(NPOIFSFileSystem.java:184)
	at org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:154)
	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
Comment 1 Maxim Valyanskiy 2012-01-30 12:55:54 UTC
fixed in r1237629.