[ 
https://issues.apache.org/jira/browse/PDFBOX-5455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17552605#comment-17552605
 ] 

Michael Klink commented on PDFBOX-5455:
---------------------------------------

In version 1.8.9 you mention the lines 121..124 are
{code:java}
            String[] versionComponents = 
System.getProperty("java.version").split("\\.");
            int javaMajorVersion = Integer.parseInt(versionComponents[0]);
            int javaMinorVersion = Integer.parseInt(versionComponents[1]);
            is16orLess = javaMajorVersion == 1 && javaMinorVersion <= 6;
{code}
Your {{ArrayIndexOutOfBoundsException}} at {{Index 1}}, therefore, refers to 
{{versionComponents[1]}}.
Apparently your {{java.version}} system property has not the contents expected 
by PDFBox developers.
As a quick fix you may try and append {{.9}} to that system property before 
using PDFBox classes.
As a real fix, you should update your PDFBox version. 1.8.9 is ancient.

> java.lang.ExceptionInInitializerError in  
> org.apache.pdfbox.util.PDFTextStripper class
> --------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-5455
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5455
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 1.8.9
>            Reporter: Kalpesh Patel
>            Priority: Minor
>
> Unable to read pdf file . Getting below exception - 
> Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds 
> for length 1
>     at 
> org.apache.pdfbox.util.PDFTextStripper.<clinit>(PDFTextStripper.java:123)
>  
> Let me know if more details needed
>  
> [~Bettenburg] 
>  
> [~will86] 
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to