File tree Expand file tree Collapse file tree
src/com/servoy/plugins/jasperreports Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments