The start of the stack trace is:
Code: Select all
org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.Object] to type [byte[]] for value 'com.stimulsoft.report.StiReport@14e89d9f'; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to serialize object using DefaultSerializer; nested exception is java.io.NotSerializableException: com.stimulsoft.report.events.StiBeginRenderEvent
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:47) ~[spring-core-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:191) ~[spring-core-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.session.jdbc.JdbcIndexedSessionRepository.serialize(JdbcIndexedSessionRepository.java:589) ~[spring-session-jdbc-2.3.1.RELEASE.jar:2.3.1.RELEASE]
at org.springframework.session.jdbc.JdbcIndexedSessionRepository.lambda$insertSessionAttributes$5(JdbcIndexedSessionRepository.java:486) ~[spring-session-jdbc-2.3.1.RELEASE.jar:2.3.1.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.lambda$update$0(JdbcTemplate.java:865) ~[spring-jdbc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:617) ~[spring-jdbc-5.2.10.RELEASE.jar:5.2.10.RELEASE]
The method in the controller is:
Code: Select all
@RequestMapping( "/reports/stimulsofttest" )
public String viewStimulsoftReportTest( Model model )
throws IOException, SAXException, StiDeserializationException
{
final StiReport report = StiSerializeManager
.deserializeReport(new File("/path/to/report.mrt"));
final StiJDBCDatabase dbLMSv3 = (StiJDBCDatabase) report.getDictionary().getDatabases().get("MyDb");
dbLMSv3.setConnectionString(stimulsoftConnection);
report.render();
final StiWebViewerOptions options = new StiWebViewerOptions();
model.addAttribute("report", report);
model.addAttribute("options", options);
return "jsp/reports/stimulsofttest";
}
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://stimulsoft.com/webviewer" prefix="stiwebviewer"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Stimulsoft Report Embedding</title>
</head>
<body>
<p>Report embedded in page here.</p>
<stiwebviewer:webviewer report="${report}" options="${options}"/>
</body>
</html>
Any idea how to get this to work?