[#13621] - Custom data source problem: {some class} cannot be resolved to a type

Bug report
Project: Severity:
Component: Reproducibility:
Assigned to:

Hello Guys,

We've been using our own custom data source using the custom implementation of JRDataSource for many years now. Up till now, we are using Jasper Studio 6.8.0 and 6.10.0. It is now time to start using 6.17.0 because we want to migrate to Mac OSX Big Sur.

The code is packaged into a jar file. It is added to the java build path. The adaptor works fine. The test button on the adaptor yields the response 'successful'. So everything seems to be in order. However the studio cannot resolve class names of the jar to types. Upon compilation of the report or when previewing the report, we get the error ' {some class} cannot be resolved to a type'.

This is the screenshot with the error.


I've started with a clean OSX Catalina, clean installation of the Jasper Studio 6.17.0. I've added the jar in several ways (as an external jar, as a library). I've restarted Jasper Studio 6.17.0 several times. Nothing seems to work.

What is going wrong?

Thomas Cleenewerck, colleague of Maarten Van Coile, Yesplan

tcleenewerck_1's picture
Joined: Mar 19 2019 - 7:10am
Last seen: 2 months 4 days ago


  • Severity:Minor» Major
  • Status:New» Feedback Requested

Hi, can you confirm you used the "Custom implementation of JRDataSource" data adapter?
Is the data adapter including the jar reference in the "Jar File Path" section? Or did you simply included the DA in the project classpath where your report is created?

Let me know if you can successfully use it, creating the DA adapter file inside the Project folder.


Indeed I am using the 'Custom implementation of JRDataSource".

The jar file is not referenced in the adaptor: https://share.getcloudapp.com/xQu70Xkw . The jar file is part of a library https://share.getcloudapp.com/JruD7JYy and has been added via user library (https://share.getcloudapp.com/yAurLEqw) to the build path https://share.getcloudapp.com/QwuAGm1J .

To get closer to issue at hand I created a new dummy adaptor to illustrate the problem.

It is a new fresh new implementation which is based on the documentation in https://community.jaspersoft.com/wiki/how-create-and-use-jrdatasourcepro.... I called it my Hello World New Data Adaptor. I didn't use a jar. As you can see https://share.getcloudapp.com/d5uAe7Jj doesn't contain a jar.
I now created a new blank new report. The adaptor works fine up to the point where I reference a class from the adaptor. In https://share.getcloudapp.com/wbu6klDD I simply used the following expression (HelloWorldCustomDataProvider.HelloWorldCustomDataSource) $P{REPORT_DATA_SOURCE} .

I've added the files to this message. As such you can also test it.


Binary Data blank_a4.jrxml2.32 KB

Apparently I can only upload one file at a time. Here is the code for the Hello World Adaptor.

Package icon helloworldcustomdataprovider.zip2.88 KB

I just tested our plugin with TIBCO Jaspersoft® Studio 6.16.0 - Visual Designer for JasperReports 6.16.0. And our Custom implementation of JRDataSource runs fine.


Hi, I think the problem you are experiencing inside comment #3 is related to another issue with classpath that has been described in bug #13616. You could give it a try to see if the solution proposed with this patch here addresses the problem of sources in the project:

Let me know.

Indeed there are other issues as well, because I've experienced some problems with the usage of the libraries added to the project.
Still investigating. Thanks.

Best regards,


Hello Massimo

Thank you for your assistance. The patch works indeed.

I assume that the patch will be integrated in the next version of the studio?

Best regards,


Hi Thomas,
yes it will be integrated. Did it help also for the "jar" use-case, besides the "code-in-project" scenario?



Yes it also helped us in the 'jar' use-case.

  • Priority:Normal» High

I think i'm having same problem while trying to import a custom JAR into the classpath. How can I try the same patch?



see #6 Posted by mrabbi on June 11, 2021 - 3:45pm . Works fine.

  • Resolution:Open» Fixed
  • Status:Feedback Requested» Resolved