[On Premise] Excel Exporter Error - ArrayOutOfBoundsException

0
Hi All, I have an issue with an on-premise app where the Excel Exporter functionality is throwing an error: 2018-10-22 15:24:17.120 INFO - StouckcountCreate.ACT_ExtractGridData: Grid Count: 4 2018-10-22 15:24:17.446 ERROR - Connector: An error has occurred while handling the request. [User 'store1c_sit2' with session id '97b9a98a-99a4-406a-b2c6-53763122b10a' and roles 'CentralAdmin'] 2018-10-22 15:24:17.446 ERROR - Connector: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.A_: 0     at StockcountCreate.ACT_ExtractGridData (JavaAction : 'GenerateExcelDoc') Advanced stacktrace:     at com.mendix.basis.component.InternalCore.execute(InternalCore.java:569) Caused by: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0     at StockcountCreate.ACT_ExtractGridData (JavaAction : 'GenerateExcelDoc') Advanced stacktrace:     at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:146) Caused by: com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0     at com.mendix.basis.component.InternalCore.execute(InternalCore.java:598) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:195) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: java.lang.ArrayIndexOutOfBoundsException: 0     at sun.font.CompositeFont.getSlotFont(CompositeFont.java:351)     at sun.font.CompositeGlyphMapper.initMapper(CompositeGlyphMapper.java:81)     at sun.font.CompositeGlyphMapper.<init>(CompositeGlyphMapper.java:62)     at sun.font.CompositeFont.getMapper(CompositeFont.java:409)     at sun.font.CompositeFont.canDisplay(CompositeFont.java:435)     at java.awt.Font.canDisplayUpTo(Font.java:2063)     at java.awt.font.TextLayout.singleFont(TextLayout.java:470)     at java.awt.font.TextLayout.<init>(TextLayout.java:531)     at org.apache.poi.ss.util.SheetUtil.getDefaultCharWidth(SheetUtil.java:274)     at org.apache.poi.ss.util.SheetUtil.getColumnWidth(SheetUtil.java:249)     at org.apache.poi.ss.util.SheetUtil.getColumnWidth(SheetUtil.java:234)     at org.apache.poi.hssf.usermodel.HSSFSheet.autoSizeColumn(HSSFSheet.java:2165)     at org.apache.poi.hssf.usermodel.HSSFSheet.autoSizeColumn(HSSFSheet.java:2147)     at xlsreport.report.export.ExportExcel.processSheetPreferences(ExportExcel.java:220)     at xlsreport.report.export.ExportExcel.buildExportFile(ExportExcel.java:162)     at xlsreport.actions.GenerateExcelDoc.executeAction(GenerateExcelDoc.java:133)     at xlsreport.actions.GenerateExcelDoc.executeAction(GenerateExcelDoc.java:34)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:79)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:57)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191)     at com.mendix.basis.component.InternalCore.execute(InternalCore.java:594)     at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:64)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:201)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:79)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:57)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191)     at com.mendix.basis.component.InternalCore.execute(InternalCore.java:563)     at com.mendix.basis.component.InternalCore.execute(InternalCore.java:578)     at com.mendix.webui.actions.client.ExecuteMicroflowAction.$anonfun$executeMicroflow$5(ExecuteMicroflowAction.scala:108)     at scala.Option.getOrElse(Option.scala:121)     at com.mendix.webui.actions.client.ExecuteMicroflowAction.executeMicroflow(ExecuteMicroflowAction.scala:108)     at com.mendix.webui.actions.client.ExecuteMicroflowAction.execute(ExecuteMicroflowAction.scala:63)     at com.mendix.webui.requesthandling.ClientRequestHandler.$anonfun$handleRequest$2(ClientRequestHandler.scala:364)     at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)     at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.IMonitoredAction.monitor(IMonitoredAction.scala:49)     at com.mendix.basis.actionmanagement.IMonitoredAction.monitor$(IMonitoredAction.scala:25)     at com.mendix.webui.requesthandling.ClientRequestHandler$ClientMonitoredAction.monitor(ClientRequestHandler.scala:472)     at com.mendix.webui.requesthandling.ClientRequestHandler.handleRequest(ClientRequestHandler.scala:349)     at com.mendix.webui.requesthandling.ClientRequestHandler.handleActionWithSessionRequired(ClientRequestHandler.scala:280)     at com.mendix.webui.requesthandling.ClientRequestHandler.handleAction(ClientRequestHandler.scala:242)     at com.mendix.webui.requesthandling.ClientRequestHandler.liftedTree1$1(ClientRequestHandler.scala:104)     at com.mendix.webui.requesthandling.ClientRequestHandler.processRequest(ClientRequestHandler.scala:96)     at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40)     at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:71)     at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:68)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:74)     at com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:858)     at com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.service(RuntimeHandler.java:42)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)     at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)     at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)     at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)     at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)     at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)     at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)     at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)     at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)     at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)     at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)     at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)     at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)     at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)     at org.eclipse.jetty.server.Server.handle(Server.java:561)     at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:334)     at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)     at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)     at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)     at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)     at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)     at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)     at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)     at java.lang.Thread.run(Thread.java:748)   We have two environments in fact (both on premise) but this issue only appears to be on one of the environments, the other one is working fine. Comparing the Model Reflections and Excel Exporter configurations they appear to be the same. So I'm wondering if it might be an environmental issue?   Does anyone know what might be causing this to fail or can anyone suggest what I might check for?   Thanks in advance Regards Adrian
asked
3 answers
2

Thanks Joost and All,

The problem was down to a difference in the JDK:

[psmuser@iedub1lvtweb502 fonts]$ java -version

openjdk version "1.8.0_131"

OpenJDK Runtime Environment (build 1.8.0_131-b12)

OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)

 

[psmuser@IEDU2LVTAPP004 ~]$ java -version

openjdk version "1.8.0_161"

OpenJDK Runtime Environment (build 1.8.0_161-b14)

OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)

 

The issue is a bug reported on Redhat:

https://access.redhat.com/solutions/3145721 (  subscriber exclusive content, i not a subscriber )

 

The bug is we are not able to use font sans serif.

The error:

Caused by: java.lang.ArrayIndexOutOfBoundsException: 0

 at sun.font.CompositeFont.getSlotFont(CompositeFont.java:351)

 at sun.font.CompositeGlyphMapper.initMapper(CompositeGlyphMapper.java:81)

 at sun.font.CompositeGlyphMapper.<init>(CompositeGlyphMapper.java:62)

 at sun.font.CompositeFont.getMapper(CompositeFont.java:409)

 at sun.font.CompositeFont.canDisplay(CompositeFont.java:435

 

The issue happens only on Red hat version 7.4

The workaround, I created a file to force psmuser to change the font.

answered
0

Hello Adrian,

Could this be something as simple as attempting to export a document without passing in any data? Have you inspected the data that's used in the export attempt?

answered
0

Which JDK do you use? Because OpenJDK has a bug there

https://bugzilla.redhat.com/show_bug.cgi?id=1479563

answered