Skip to content

Commit edc0375

Browse files
committed
SVYX-905 unable to resolve class
net.sf.jasperreports.compilers.GroovyEvaluator
1 parent 08b05bf commit edc0375

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/com/servoy/plugins/jasperreports/JasperReportsPlugin.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,24 @@ public IJasperReportsService connectJasperService() {
8585
Debug.trace("JasperTrace: service connection initialize");
8686
// create if not yet created
8787
if (jasperReportService == null) {
88-
try {
88+
ClassLoader savedCl = Thread.currentThread().getContextClassLoader();
89+
try
90+
{
91+
Thread.currentThread().setContextClassLoader(getIClientPluginAccess().getPluginManager().getClassLoader());
8992
jasperReportService = (IJasperReportsService) application.getServerService("servoy.IJasperReportService");
9093
if (jasperReportsDirectory == null) jasperReportsDirectory = jasperReportService.getReportDirectory();
9194
if (jasperExtraDirectories == null) jasperExtraDirectories = jasperReportService.getExtraDirectories();
92-
} catch (Exception ex) {
95+
}
96+
catch (Exception ex)
97+
{
9398
Debug.error(ex);
9499
throw new RuntimeException(
95100
"JasperTrace: Jasper Exception: Cannot connect to service-server");
96101
}
102+
finally
103+
{
104+
Thread.currentThread().setContextClassLoader(savedCl);
105+
}
97106
}
98107

99108
// in case the server is not started in developer

0 commit comments

Comments
 (0)