Hot questions for Using JasperReports in eclipse plugin
I'm writing plugin for Jaspersoft studio up-to-date. The plugin crashes, when it is trying to open preview of report. (from the plugin) Stack Trace of java.lang.NullPoinpointerException:
com.jaspersoft.studio.debug.TraceGovernor.setup(TraceGovernor.java:111) com.jaspersoft.studio.debug.TraceGovernor.initMaps(TraceGovernor.java:118) com.jaspersoft.studio.debug.TraceGovernor.beforeReportInit(TraceGovernor.java:162) net.sf.jasperreports.engine.fill.JRFillDatasetScriptlet.beforeReportInit(JRFillDatasetScriptlet.java:74) net.sf.jasperreports.engine.JRAbstractScriptlet.callBeforeReportInit(JRAbstractScriptlet.java:176) net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:236) net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:115) net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:580) net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:414) net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:119) java.lang.Thread.run(Thread.java:745)
Non of code in stack trace is mine. I think it can't load necessary classes. (Jaspersoft studio can load all necessary libraries) Does anyone know, what to do with it please? Many thanks.
I've found, that it's caused by this property in Jaspersoft studio, that loads extension, that is loading
TraceGovernor. It's for debugging report, but it isn't compatible with my plug-in.
I've solved that by removing it from java package
com.jaspersoft.studio_6.3.0.final.jar\jasperreports_extension.properties, but I would like some non-destructive method, how to disable this extension.
The relevant source code is available at:
The NPE appears to be the result of an uninitialized
jrConfig field in the
TraceGovernor class, which would be initialized had
getJasperReportsContext() of the
ScriptletFactoryContext context in the constructor of
TraceGovernor returned an
You may checkout and navigate the repository to further investigate the reason for the NPE. Otherwise, I can only suggest to file a bug report with JasperSoft.
I have a problem installing Jasper Studio Webservice plugin in Eclipse Neon. I followed the instructions in Installing the Webservice Datasource, where in simple words what I need to do is to copy the jars:
And paste them within the eclipse/plugins folder, but the adapter is not displaying how is depicted in the Webservice Datasource Documentation.
After awhile searching in Google I ended up following these answers, but none of these worked for me:
- Eclipse: How to install a plugin manually?
- Easy way to copy old plugins into new install of eclipse
What it worked was search in the Eclipse Documentation that describes that for old plugins you have to put them in eclipse/dropins folder.
You can download the files from another computer and put it in a usb. I guess if you have connection for stackoverflow, you might have enough for downloading files. The procedure is shown here
what I used before: open Eclipse:
Help -> Install New Software... -> Add -> Archive....
- Another way: is listed on the Eclipse documentation
In Eclipse Kepler:
- you can also add in the Eclipse plugins folder. You can start Eclipse with the
-cleanoption to make sure Eclipse sees the new plugin after cleaning its cache.