When scheduling a Daily Batch Cycle Report to be received via email, the Email is missing the file attachment and the email states: "JasperReports Server encountered an error while generating this report. Please contact your administrator."
When reviewing the jaserre[ortstomcat-stdout log from /<InstallDir>/apache-tomcat/logs we see the error below at the time the report is scheduled to run:
ERROR ReportExecutionJob,JasperServerScheduler_Worker-1:457 - Error filling report (Error UID: b5695467-7dc2-4f21-9535-cca7af33b06d) com.jaspersoft.jasperserver.api.JSException: Error filling report
Arguments:
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$FillResultListener.reportFillError(EngineServiceImpl.java:1362)
at net.sf.jasperreports.engine.fill.BaseFillHandle.notifyError(BaseFillHandle.java:228)
at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:150)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousExecutor.execute(EngineServiceImpl.java:972)
at net.sf.jasperreports.engine.fill.BaseFillHandle.startFill(BaseFillHandle.java:181)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1983)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousReportFiller.fillReport(EngineServiceImpl.java:870)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1894)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runWithDataSource(EngineServiceImpl.java:1185)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:1122)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:997)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousExecutor.execute(EngineServiceImpl.java:972)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:678)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeReportUnitRequest(EngineServiceImpl.java:2176)
at com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.ReportUnitRequest.execute(ReportUnitRequest.java:75)
at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.execute(EngineServiceImpl.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
at com.jaspersoft.ji.license.LicenseCheckAspect.runReport(LicenseCheckAspect.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy149.execute(Unknown Source)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.InternalReportExecutor.runReport(InternalReportExecutor.java:301)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.InternalReportExecutor.runReport(InternalReportExecutor.java:247)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.InternalReportExecutor.runReport(InternalReportExecutor.java:206)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.InternalReportExecutor.executeReport(InternalReportExecutor.java:193)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.InternalReportExecutor.createOutputs(InternalReportExecutor.java:116)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:611)
at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:309)
at com.jaspersoft.ji.report.options.engine.ReportOptionsExecutionJob.execute(ReportOptionsExecutionJob.java:47)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Suppressed: net.sf.jasperreports.engine.JRException: com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 start byte 0xa0
at [Source: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream); line: 1, column: 55629]
at net.sf.jasperreports.engine.util.JsonUtil.parseJson(JsonUtil.java:181)
at com.termalabs.datasource.aai.AaiApiConnection.getJsonResponse(AaiApiConnection.java:120)
at com.termalabs.datasource.aai.AaiApiDataSource.next(AaiApiDataSource.java:65)
at net.sf.jasperreports.engine.fill.JRFillDataset.advanceDataSource(JRFillDataset.java:1572)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1415)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1394)
at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1201)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:117)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:622)
at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:135)
... 44 more
Caused by: com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 start byte 0xa0
at [Source: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream); line: 1, column: 55629]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2391)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:735)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidInitial(UTF8StreamJsonParser.java:3648)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidChar(UTF8StreamJsonParser.java:3644)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishString2(UTF8StreamJsonParser.java:2581)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishAndReturnString(UTF8StreamJsonParser.java:2507)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.getText(UTF8StreamJsonParser.java:334)
at com.fasterxml.jackson.databind.deser.std.BaseNodeDeserializer._deserializeContainerNoRecursion(JsonNodeDeserializer.java:473)
at com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:84)
at com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:20)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:322)
at com.fasterxml.jackson.databind.ObjectMapper._readTreeAndClose(ObjectMapper.java:4716)
at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:3056)
at net.sf.jasperreports.engine.util.JsonUtil.parseJson(JsonUtil.java:179)
... 53 more
[CIRCULAR REFERENCE:net.sf.jasperreports.engine.JRException: com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 start byte 0xa0
at [Source: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream); line: 1, column: 55629]]
Release : 6.4.5.2
This can be caused by jobstream descriptions that have non UTF-8 characters within the description.
These characters can be hidden when looking at the Jobstream Description in AAI or even in the database.
There are several methods of finding which jobstreams have the descriptions with the hidden non UTF-8 characters.
1. Run the query below and export the results to a .csv file
select description, annotation from JobStream
2. Load the csv file in a program like notepad++ or another text editor capable of displaying unicode characters like below:
â€
In Notepad++ you can try using different Encoding to see the characters, some may be visible in ANSII or UTF-8
3. You can also enable the AlertGenerator DEBUG logger in the AAI configuration tool.
If you search the jaws.log you may see messages like below, and just above them in the DEBUG logging it will show you the jobstream name.
Invalid byte 1 of 1-byte UTF-8 sequence.
4. Once you identify which jobstreams have the hidden non UTF-8 characters, please delete the jobstream descriptions, and save the change.
You can then type in a new jobstream description and save it and monitor the logs for the errors below:
Invalid byte 1 of 1-byte UTF-8 sequence.
5. Once you verify that you are no longer seeing the log messages, you should be able to run the Daily Batch Cycle Report and also be able to schedule it and receive the email attachments.
Defect DE574033 has been raised to prevent this from occurring.