Hot questions for Using JasperReports in eclipse plugin

Question:

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.


Edit

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.

net.sf.jasperreports.extension.registry.factory.governor=com.jaspersoft.studio.debug.TraceGovernorExtensionsRegistryFactory

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.


Answer:

The relevant source code is available at:

http://anonsvn:anonsvn@code.jaspersoft.com/svn/repos/jaspersoftstudio/tags/6_3_0_final/com.jaspersoft.studio/src/com/jaspersoft/studio/debug/TraceGovernor.java

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 instanceof JasperReportsConfiguration.

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.

Question:

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:

  • com.jaspersoft.studio.data.webservice.google.jar
  • com.jaspersoft.studio.webservice.connectors.elasticsearch.jar
  • com.jaspersoft.studio.data.webservice.WebService.jar

And paste them within the eclipse/plugins folder, but the adapter is not displaying how is depicted in the Webservice Datasource Documentation.


Answer:

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.

Question:


Answer:

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....

In Eclipse Kepler:

  • you can also add in the Eclipse plugins folder. You can start Eclipse with the -clean option to make sure Eclipse sees the new plugin after cleaning its cache.