Bug 41251 - ArrayIndexOutOfBoundsException in multithreading environement
Summary: ArrayIndexOutOfBoundsException in multithreading environement
Status: CLOSED WONTFIX
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 0.20.5
Hardware: All Linux
: P1 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-28 02:29 UTC by Hamed Taha
Modified: 2012-04-30 00:17 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hamed Taha 2006-12-28 02:29:26 UTC
Making 5 fop threads work simultaneiousely leads to a failure every 1000 task.
That means, when the process is invoked 5000 times (only f threads are allowed 
at one time) about 5 out of the 5000 tasks fail and result in the following 
exception.

The same tasks which failed, can be successful processed when invoked again, 
which means it has nothing to do with the tasks themselves. And the failure 
happens randomly at any time, but i never noticed that it happened at the very 
beginning of the processing. Usually it happenes after few hundreds of tasks 
were processed.   

java.lang.ArrayIndexOutOfBoundsException: -2; Line#: 51; Column#: 106 
at com.mycompany.rendering.engine.FopRenderer.render(FopRenderer.java:254) 
at com.mycompany.rendering.engine.XmlHtmlRenderer.render
(XmlHtmlRenderer.java:92) 
at com.mycompany.rendering.engine.XmlHtmlRenderer.render
(XmlHtmlRenderer.java:124) 
at com.mycompany.myproduct.postprocessing.CDefaultPostProcessor.transform
(CDefaultPostProcessor.java:320) 
at com.mycompany.myproduct.postprocessing.CDefaultPostProcessor.xml2pdf
(CDefaultPostProcessor.java:274) 
at com.mycompany.myproduct.postprocessing.CDefaultPostProcessor.postprocess
(CDefaultPostProcessor.java:207) 
at com.mycompany.myproduct.postprocessing.CTaxCertPostProcessor.postprocess
(CTaxCertPostProcessor.java:78) 
at com.mycompany.myproduct.processors.CReportProcessor.postProcessRequest
(CReportProcessor.java:251) 
at com.mycompany.myproduct.processors.CReportProcessor.doExecute
(CReportProcessor.java:183) 
at com.mycompany.myproduct.processors.CReportRequestProcessor.doExecute
(CReportRequestProcessor.java:454) 
at com.mycompany.myproduct.CmyproductProcess.execute
(CmyproductProcess.java:183) 
at com.mycompany.myproduct.processors.CReportRequestProcessor.process
(CReportRequestProcessor.java:157) 
at com.mycompany.myproduct.workflow.queues.WorkerMDEJB.onMessage
(WorkerMDEJB.java:126) 
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) 
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) 
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) 
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) 
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) 
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) 
javax.xml.transform.TransformerException: 
java.lang.ArrayIndexOutOfBoundsException: -2 
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
(TransformerImpl.java:2344) 
at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode
(TransformerImpl.java:2160) 
at org.apache.xalan.transformer.TransformerImpl.transformNode
(TransformerImpl.java:1213) 
at org.apache.xalan.transformer.TransformerImpl.transform
(TransformerImpl.java:668) 
at org.apache.xalan.transformer.TransformerImpl.transform
(TransformerImpl.java:1129) 
at org.apache.xalan.transformer.TransformerImpl.transform
(TransformerImpl.java:1107) 
at com.mycompany.rendering.engine.FopRenderer.render(FopRenderer.java:241) 
at com.mycompany.rendering.engine.XmlHtmlRenderer.render
(XmlHtmlRenderer.java:92) 
at com.mycompany.rendering.engine.XmlHtmlRenderer.render
(XmlHtmlRenderer.java:124) 
at com.mycompany.myproduct.postprocessing.CDefaultPostProcessor.transform
(CDefaultPostProcessor.java:320) 
at com.mycompany.myproduct.postprocessing.CDefaultPostProcessor.xml2pdf
(CDefaultPostProcessor.java:274) 
at com.mycompany.myproduct.postprocessing.CDefaultPostProcessor.postprocess
(CDefaultPostProcessor.java:207) 
at com.mycompany.myproduct.postprocessing.CTaxCertPostProcessor.postprocess
(CTaxCertPostProcessor.java:78) 
at com.mycompany.myproduct.processors.CReportProcessor.postProcessRequest
(CReportProcessor.java:251) 
at com.mycompany.myproduct.processors.CReportProcessor.doExecute
(CReportProcessor.java:183) 
at com.mycompany.myproduct.processors.CReportRequestProcessor.doExecute
(CReportRequestProcessor.java:454) 
at com.mycompany.myproduct.CmyproductProcess.execute
(CmyproductProcess.java:183) 
at com.mycompany.myproduct.processors.CReportRequestProcessor.process
(CReportRequestProcessor.java:157) 
at com.mycompany.myproduct.workflow.queues.WorkerMDEJB.onMessage
(WorkerMDEJB.java:126) 
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) 
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) 
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) 
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) 
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) 
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) 
java.lang.ArrayIndexOutOfBoundsException: -2 
at org.apache.fop.fo.flow.TableRow$CellArray.getNextFreeCell(TableRow.java:130) 
at org.apache.fop.fo.flow.TableRow.initCellArray(TableRow.java:505) 
at org.apache.fop.fo.flow.TableRow.layout(TableRow.java:271) 
at org.apache.fop.fo.flow.AbstractTableBody.layout(AbstractTableBody.java:236) 
at org.apache.fop.fo.flow.Table.layout(Table.java:302) 
at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154) 
at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110) 
at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:400) 
at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338) 
at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262) 
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223) 
at org.apache.xalan.transformer.ResultTreeHandler.endElement
(ResultTreeHandler.java:309) 
at org.apache.xalan.templates.ElemLiteralResult.execute
(ElemLiteralResult.java:716) 
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
(TransformerImpl.java:2339) 
at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode
(TransformerImpl.java:2160) 
at org.apache.xalan.transformer.TransformerImpl.transformNode
(TransformerImpl.java:1213) 
at org.apache.xalan.transformer.TransformerImpl.transform
(TransformerImpl.java:668) 
at org.apache.xalan.transformer.TransformerImpl.transform
(TransformerImpl.java:1129) 
at org.apache.xalan.transformer.TransformerImpl.transform
(TransformerImpl.java:1107) 
at com.mycompany.rendering.engine.FopRenderer.render(FopRenderer.java:241) 
at com.mycompany.rendering.engine.XmlHtmlRenderer.render
(XmlHtmlRenderer.java:92) 
at com.mycompany.rendering.engine.XmlHtmlRenderer.render
(XmlHtmlRenderer.java:124) 
at com.mycompany.myproduct.postprocessing.CDefaultPostProcessor.transform
(CDefaultPostProcessor.java:320) 
at com.mycompany.myproduct.postprocessing.CDefaultPostProcessor.xml2pdf
(CDefaultPostProcessor.java:274) 
at com.mycompany.myproduct.postprocessing.CDefaultPostProcessor.postprocess
(CDefaultPostProcessor.java:207) 
at com.mycompany.myproduct.postprocessing.CTaxCertPostProcessor.postprocess
(CTaxCertPostProcessor.java:78) 
at com.mycompany.myproduct.processors.CReportProcessor.postProcessRequest
(CReportProcessor.java:251) 
at com.mycompany.myproduct.processors.CReportProcessor.doExecute
(CReportProcessor.java:183) 
at com.mycompany.myproduct.processors.CReportRequestProcessor.doExecute
(CReportRequestProcessor.java:454) 
at com.mycompany.myproduct.CmyproductProcess.execute
(CmyproductProcess.java:183) 
at com.mycompany.myproduct.processors.CReportRequestProcessor.process
(CReportRequestProcessor.java:157) 
at com.mycompany.myproduct.workflow.queues.WorkerMDEJB.onMessage
(WorkerMDEJB.java:126) 
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370) 
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262) 
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678) 
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) 
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) 
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Comment 1 Andreas L. Delmelle 2007-02-18 04:51:17 UTC
Bugzilla cleanup:

This is unrelated to FOP. The error occurs in the calling code, not FOP itself.
Comment 2 Hamed Taha 2007-02-18 05:02:53 UTC
(In reply to comment #1)
> Bugzilla cleanup:
> This is unrelated to FOP. The error occurs in the calling code, not FOP 
itself.

The Exception was thrown by FOP-Code!
Comment 3 Andreas L. Delmelle 2007-02-18 05:10:29 UTC
(In reply to comment #2)
> 
> The Exception was thrown by FOP-Code!

Not according to the stack trace you posted. 
"com.mycompany.rendering.engine" is definitely not a FOP package.
Comment 4 Jeremias Maerki 2007-02-18 05:12:13 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > 
> > The Exception was thrown by FOP-Code!
> 
> Not according to the stack trace you posted. 
> "com.mycompany.rendering.engine" is definitely not a FOP package.

Look closely, Andreas:
java.lang.ArrayIndexOutOfBoundsException: -2 
at org.apache.fop.fo.flow.TableRow$CellArray.getNextFreeCell(TableRow.java:130) 
at org.apache.fop.fo.flow.TableRow.initCellArray(TableRow.java:505) 
at org.apache.fop.fo.flow.TableRow.layout(TableRow.java:271) 
at org.apache.fop.fo.flow.AbstractTableBody.layout(AbstractTableBody.java:236) 
at org.apache.fop.fo.flow.Table.layout(Table.java:302) 
Comment 5 Andreas L. Delmelle 2007-02-18 05:19:50 UTC
(In reply to comment #4)
> Look closely, Andreas:
> java.lang.ArrayIndexOutOfBoundsException: -2 
> at org.apache.fop.fo.flow.TableRow$CellArray.getNextFreeCell(TableRow.java:130) 

Right, sorry. My bad.

OTOH, this bug does not seem to applicable to the Trunk anymore, so that would make it... a WONTFIX?

Comment 6 Glenn Adams 2012-04-01 19:12:55 UTC
based on comments below, this no longer applies to trunk
Comment 7 Glenn Adams 2012-04-30 00:15:06 UTC
batch transition resolved+wontfix to closed+wontfix
Comment 8 Glenn Adams 2012-04-30 00:17:27 UTC
batch transition resolved+wontfix to closed+wontfix; if you believe this remains a bug and can demonstrate it with appropriate input FO file and output PDF file (as applicable), then you may reopen