Sage CRM 2018R3 Issue Exporting Report to XLSX

This question is not answered

I am having an issue exporting a report to XLSX in Sage CRM 2018R3.  The message on screen is the typical message, An error occurred while running the report.  Error generating report.

Exporting to CSV and Excel CSV work fine, no issues.  All other tomcat related features(dashboard, exchange integration, etc) all are working fine.  Exporting to XLSX works fine for some reports but not all.

The error in the logs I get is below.  The data being returned in one of the reports with error is nothing out of the ordinary, it contains currency type fields in the report, but no nulls, either 0.0000 for a greater value.  The error message below refers to an empty String.

Has anyone encountered this before?  Any thoughts?

Jan 27 2019 18:09:32.393 3704 6944 5 START - doEndpointGet URL: http://localhost/sdata/crmj/async/spreadsheetTask?trackingId=C8A257AD-ECD6-4265-8B94-FF3AC01D3181&SID=127709436660515
Jan 27 2019 18:09:32.544 3704 6944 5 FINISHED - doEndpointGet finished URL: http://localhost/sdata/crmj/async/spreadsheetTask?trackingId=C8A257AD-ECD6-4265-8B94-FF3AC01D3181&SID=127709436660515
Jan 27 2019 18:09:32.547 3704 6944 1 ERROR generating excel file. HTTP status:500 Message: <diagnoses><errorMessages><errorMessage><info>com.sage.crm.core.exception.SageAsyncProcessException: Report generation failed
Exception in thread "main" com.sage.crm.core.exception.SageReportGeneratingException: java.lang.NumberFormatException: empty String&#13;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorBase.generate(ReportGeneratorBase.java:70)&#13;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorManager.generate(ReportGeneratorManager.java:59)&#13;
at com.sage.crm.core.util.reportgenerator.ReportProcess.generateReport(ReportProcess.java:113)&#13;
at com.sage.crm.core.util.reportgenerator.ReportProcess.main(ReportProcess.java:83)&#13;
Caused by: java.lang.NumberFormatException: empty String&#13;
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)&#13;
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)&#13;
at java.lang.Double.parseDouble(Double.java:538)&#13;
at java.lang.Double.&lt;init&gt;(Double.java:608)&#13;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorSpreadsheet.currencyStringToDouble(ReportGeneratorSpreadsheet.java:260)&#13;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorSpreadsheet.processSummaryBand(ReportGeneratorSpreadsheet.java:632)&#13;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorBase.buildReport(ReportGeneratorBase.java:224)&#13;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorSpreadsheet.buildReport(ReportGeneratorSpreadsheet.java:787)&#13;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorBase.generate(ReportGeneratorBase.java:127)&#13;
at com.sage.crm.core.util.reportgenerator.ReportGeneratorBase.generate(ReportGeneratorBase.java:68)&#13;
... 3 more&#13;

&#13;
at com.sage.crm.core.async.task.SpreadsheetTask.execute(SpreadsheetTask.java:103)&#13;
at com.sage.crm.core.async.TaskProcessor.process(TaskProcessor.java:82)&#13;
at sun.reflect.GeneratedMethodAccessor692.invoke(Unknown Source)&#13;
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&#13;
at java.lang.reflect.Method.invoke(Method.java:498)&#13;
at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:113)&#13;
at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:102)&#13;
at org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:49)&#13;
at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:347)&#13;
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:88)&#13;
at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:131)&#13;
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:330)&#13;
at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:169)&#13;
at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:317)&#13;
at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:155)&#13;
at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:93)&#13;
at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:89)&#13;
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:102)&#13;
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)&#13;
at org.springframework.integration.endpoint.PollingConsumer.handleMessage(PollingConsumer.java:129)&#13;
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:272)&#13;
at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:58)&#13;
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:190)&#13;
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:186)&#13;
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:353)&#13;
at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:55)&#13;
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)&#13;
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)&#13;
at java.lang.Thread.run(Thread.java:748)&#13;
Caused by: com.sage.crm.core.exception.SageEndpointException: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)&#13;
at com.sage.crm.core.util.RunProcessHelper.run(RunProcessHelper.java:291)&#13;
at com.sage.crm.core.async.task.SpreadsheetTask.execute(SpreadsheetTask.java:93)&#13;
... 28 more&#13;
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)&#13;
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377)&#13;
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)&#13;
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147)&#13;
at com.sage.crm.core.util.RunProcessHelper.run(RunProcessHelper.java:288)&#13;
... 29 more&#13;
</info></errorMessage></errorMessages></diagnoses>
Jan 27 2019 18:09:32.547 3704 6944 1 ERROR generating excel file. Message - Error generating report. .
Jan 27 2019 18:09:32.558 3704 6944 4 EndUserAction,User,Action,Time 210 1411 6266

All Replies
  • Is there anything in the Tomcat SQL log?

    The error

    java.lang.NumberFormatException: empty String

    suggests that something being passed to the Export that expects a value is empty.

    And is this export taking place from a Report or from a Group?


  • Hi Jeff,

    That was the only log with error I was able to find.  Is there anther specific location and log file I might be overlooking?

    This export is taking place from a Report

  • The SQL logs will be found under

    C:\Program Files (x86)\Sage\CRM\CRM\Logs

    And will have a name like 20190125sql.log

    The logging level is set within the file log4j.xml within

    C:\Program Files (x86)\Sage\CRM\CRM\tomcat\webapps\crmj\WEB-INF

    Change the logging level to ERROR or DEBUG within the file.  (Take a copy of this before you do in case)

       <!-- SQL Logs -->

       <logger name="jdbc.sqlonly" additivity="false">

           <level value="FATAL"/>

           <appender-ref ref="sql"/>

       </logger>

    If the export fails in the context of a report, does it work with other reports?  Does an export from a group work?  Could the view or the dataset returned by the view be at fault?


  • Set to Debug or Error, nothing populates in the file.  Other reports XLSX export works fine.  I may just try recreating this report and seeing what happens.

    Group exports, export from search, all work fine because your only options are Excel CSV or CSV.  This issue is only occurring with XLSX.  And the data source view is fine, the exact query that the report runs (which I identified in sql profiler)l executes without issue in sql.  And multiple reports are using the same view.

  • That does seem to narrow it down to being the single report definition.  


  • Jeff, reports that have the issue have an integer field.  When I remove the integer field as a report column, the report exports to XLSX, but with the integer field I get the error.  The data in the report for this field is 0 and greater.  I see no issues with the data.  Could this be a bug with 2018R3?

  • If you can reproduce this then you should log this with Support.


  • Yes Exporting reports with a Integer value will error. North American defect #766-171144 resolved in 2019 R1

  • I have the same problem and I am using 2019 R1 there is a quick fix to it

    Matoma