Free Support Forum - aspose.com

Getting the ArrayIndexOutOfBoundsException: 0 -- MS2010 XLSX to PDF Conversion in Oracle Application Server

Hi,

We are using the Licensed Aspose Software (Java) for Converting the MS2010 xlsx and PPTx files into PDF files. Getting the below mentioned exception while executing the XLSX to PDF Convertion Application, deployed at Oracle Application server in Solaris Environment. It's working fine when execute this application directly in Solaris . If deploy it in Oracle Application server and execute,throwing this exception. old MS files (2003 and 2007 ) are working fine with this application,only 2010 XLSX files are not converting.

java.lang.ArrayIndexOutOfBoundsException: 0

com.aspose.cells.ch.onEnd(Unknown Source)

com.aspose.cells.gE.a(Unknown Source)

com.aspose.cells.bf.b(Unknown Source)

com.aspose.cells.bf.a(Unknown Source)

com.aspose.cells.bf.h(Unknown Source)

com.aspose.cells.bf.a(Unknown Source)

com.aspose.cells.hS.a(Unknown Source)

com.aspose.cells.hS.a(Unknown Source)

com.aspose.cells.ip.a(Unknown Source)

com.aspose.cells.ip.a(Unknown Source)

com.aspose.cells.Workbook.open(Unknown Source)

We have Priority support and invoice number is : 100825104731

Please let me know, if you need any other detaile. This is very urgent and need to fix it ASAP.

Regards,

Araving T

GE Healthcare

Hi,

Please provide us the template Excel 2010 XLSX file, we will check your issue soon.

Thank you.

Hi Amjad,

Thanks for quick respose. if we test it directly in solaris , it's working fine. if we deploy it in Oracle Application server, it's thorwing the exception. you can verify it directly from our sever through Webconference/Webex. Please let me know.

xlsx file also attached.

This is very urgent and we need to fix it ASAP.

Regards,

Arvind

GE Health Care

Hi,

We need to investigate your issue. Your issue might be not be related to Aspose.Cells. I have logged a ticket for your investigation with an id: CELLSJAVA-28609. We will look into it soon.

thank you.

<!–[if gte mso 10]> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

<![endif]–>

Hi,

To look into you issue, at least we also need to know which version of Aspose.Cells for Java you are using and could you try our latest attached version/fix.

Thank you.

Hi Amjad,

We are using the aspose-cells-2.5.2.jar file.

Regards,

Dheeraj

Hi,

For your issue, we have created one debug version of Aspose.Cells i.e. cells-2.5.4.8D.jar (attached). Please try this version and send/paste the exception stack trace to us so that we can make further investigation.

Thank you.

Hi, Could you please refer to the log information?

Thanks

Aravind

11/06/22 14:53:09 java.lang.ArrayIndexOutOfBoundsException: 0

11/06/22 14:53:09 at com.aspose.cells.ch.onEnd(Unknown Source)

11/06/22 14:53:09 at org.dom4j.io.DispatchHandler.onEnd(DispatchHandler.java:144)

11/06/22 14:53:09 at org.dom4j.io.SAXContentHandler.endElement(SAXContentHandler.java:254)

11/06/22 14:53:09 at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1318)

11/06/22 14:53:09 at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)

11/06/22 14:53:09 at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)

11/06/22 14:53:09 at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:205)

11/06/22 14:53:09 at org.dom4j.io.SAXReader.read(SAXReader.java:323)

11/06/22 14:53:09 at org.dom4j.io.SAXReader.read(SAXReader.java:246)

11/06/22 14:53:09 at com.aspose.cells.gE.a(Unknown Source)

11/06/22 14:53:09 at com.aspose.cells.bf.b(Unknown Source)

11/06/22 14:53:09 at com.aspose.cells.bf.a(Unknown Source)

11/06/22 14:53:09 at com.aspose.cells.bf.h(Unknown Source)

11/06/22 14:53:09 at com.aspose.cells.bf.a(Unknown Source)

11/06/22 14:53:09 at com.aspose.cells.hS.a(Unknown Source)

11/06/22 14:53:09 at com.aspose.cells.hS.a(Unknown Source)

11/06/22 14:53:09 at com.aspose.cells.ip.a(Unknown Source)

11/06/22 14:53:09 at com.aspose.cells.ip.a(Unknown Source)

11/06/22 14:53:09 at com.aspose.cells.Workbook.open(Unknown Source)

Hi Aravind,


Thanks. I have attached your provided exception logs to the Ticket associated with this thread. Soon we will get back to you on this.

Hi, Could you move this ticket 311800 to this priroty group? We need to resolve this issue ASAP as we have to move the fix in PROD next week.

Thanks

Aravind

Hi,

I could not find any ticket with id: 311826.

Can you please confirm, if this ticket is relating to Aspose.Cells or some other Aspose product or if you have provided the correct ticket id?

Hi,

We think you must have used some old versions of Aspose.Cells.jar instead of the debug version v2.5.4.8D we attached in previous post. Please use the debug version to reproduce the issue and send us the exception details.

Thank you.

Hi Amjad, I don't see any difference between the previous log files and the current. I have tested with aspose-cells-2.5.2.jar where we faced this problem initially and then tried with your debug jar aspose-cells-2.5.4.8D.jar. Also tried with aspose-cells-2.5.4.7.jar and got the same results. Attached is the log file with the two jars 2.5.4.8D and 2.5.4.7. We would miss the target date which would be a very big problem for us. Requesting you to resolve the issue ASAP.

Hi,

Thanks for providing us the log file.

We will soon look into it and get back to you.

thank you.

Hi,

For this issue, we caught the Exception for reading from XLSX files. However, we are afraid that there may be some other root cause for your problem which we cannot figure out by the given exception information. This exception is caused by empty string pool read from your template file. So one reason maybe that there is invalid data in your template file. If this is not the case, and as you have said that all worked fine when executing the application directly, then there must be some issues for reading the string pool from your template file. Anyways, please try this fix and share us your feedback.

Thank you.

Hi, The patch did not make any difference. The only difference is the error message and trace are not written in the log file now. Did you fix anything or did you make any changes related to logging? Can you reproduce the issue in OAS or do let me know if you want to setup a conf call to discuss?

Hello,



We have the high priority support agreement with Aspose.

The solution provided is not working for our environment.



Please let me know how we can escalate this issue to make the code work on our Oracle Application Server environment.



Can we set up a WebEx session to show the issue?



Otherwise, what are next steps to resolve this issue ASAP for our environment?



Thank you,



Dale Parkinson

GE Healthcare Agile PDM System Owner

Hi Dale,


We deeply regret any inconvenience caused.

We have handled the Exception [ArrayIndexOutOfBoundsException] mentioned in your original post and provided the Aspose.Cells for .NET v2.5.4.9 with this fix. If you are getting the same exception then you must be able to log it. Please provide these log files. If there is no exception then please share what kind of problem are you facing while integrating your OAS with Aspose.Cells Java API.

As communicated earlier, there can be some other reasons that we are unable to figure out from the exception logs. In order to set up a conference call or WebEx session, we have attached your feedback to the Ticket associated with this thread. As soon as we receive any updates, we will post them here for your reference.

Meanwhile, it would be of great help to us if your elaborate your problem with screenshots and/or brief description.

Thank you for your patience.

Please refer to the code and log below

code :
<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

<![endif]–>

Workbook workbook = new Workbook();

workbook.open(“d:\\stamp.xls”);

SaveOptions saveop = workbook.getSaveOptions();

saveop.setOnePagePerSheet(true);

saveop.setFontPath(new String[]{"/apps/ge/fonts"});

workbook.save(“d:\\stamp.pdf”, FileFormatType.PDF);

log : aspose_log.txt(attached )

Output file: stamping_xlsx.pdf(Attached)

Input File: Stamping.xlsx(attached)




Just to correct the statements… The directories are solaris directories and the code is
Workbook workbook = new Workbook();
workbook.open(“/apps/ge/stamp.xls”);
SaveOptions saveop = workbook.getSaveOptions();
saveop.setOnePagePerSheet(true);
saveop.setFontPath(new String[]{"/apps/ge"});
workbook.save(“/apps/ge/stamp.pdf”, FileFormatType.PDF);