[#14206] - How to add extensions to static classpath of JR Studio

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

Category:
General
Priority:
Normal
Status:
Feedback Requested
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
N/A
Assigned to:

From the documentation:
JasperReports provides several ways to extend its functionality. [...] To use these extensions in Jaspersoft Studio, just add the required JARs to the Jaspersoft Studio classpath. The Jaspersoft Studio classpath is composed of static and reloadable paths. Extensions must be set as static paths [...].

Is there any comprehensive guide how to add such an extension to the *static classpath of Jaspersoft Studio*? I already created some different extensions (Query Executer, PDF-Exporter, Generic Components, ...) which work in a small java testing environment using the library directly, but I never figured out how to add those jars to [some static classpath of JR Studio], so that the preview works. Everything I tried results in

net.sf.jasperreports.engine.JRException: Class some.package.with.MyClass not found.
Caused by: java.lang.ClassNotFoundException: some.package.with.MyClass cannot be found by net.sf.jasperreports_6.19.1.final

oh's picture
oh
9
Joined: Sep 6 2016 - 2:52am
Last seen: 1 month 1 week ago

1 Comment:

#1
  • Status:New» Feedback Requested

Hi,
some articles and resources are available in the dedicated page of the project and in the community wiki. Even though some are (partially) outdated.

Adding the jar containing for example custom functions or chart customizers should work fine. Others might require a proper Eclipse plugin creation (i.e components or data adapters).

I don't recall there are specific tutorials on how to create step-by-step a custom component for Studio.
But you might look at the htmlcomponent code sources in the JasperReports project demo folder + the JSS sources for the com.jaspersoft.studio.html plug-in.

For "Data Adapters" the sources of com.jaspersoft.studio.data plug-in (check the different packages) might help you, together with the different Datasource and DatasourceProvider classes in JasperReports project.

About your errors please details what you are trying to achieve and the steps you performed, so we can try to verify what is the issue. Thanks.

Best regards,
Massimo.

Feedback
randomness