Problems after Update on 6.20.3


after update from 6.12.0 to 6.20.3 i became an error: "net.sf.jasperreports.engine.JRRuntimeException: java.lang.ClassNotFoundException: cannot be found by" on all my reports.

After testing the connections i get the same error.

I have the jar files for sqljdbc42, 7.0.0.jre10, 7.0.0.jre8, 7.2.2.jre11, 7.2.2.jre8, 9.2.1.jre8. 9.2.1.jre11, 9.2.1.jre15, 12.2.0.jre11, 12.2.0.jre8 under plugins.

What can i do that it works right again?

thomas.wuest's picture
Joined: Mar 23 2020 - 6:29am
Last seen: 3 months 2 weeks ago

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit for direct access to our technical support teams offering guaranteed response times.

mrajkuma - 3 months 3 weeks ago

3 Answers:

Are these DB connections configured in JasperStudio or JasperServer (or both)? It seems you need to add the MS SQL Server JDBC Jar lib in studio via Preferences - > Java -> Build Path -> User Libraries. MS SQL Server DB connections typically require this addition. I know I've had to add that JDBC Jar directly many times over. 

If this doesn't work let me know, just post back any supplemental info you can.

darth_fader's picture
Joined: Mar 7 2010 - 9:45pm
Last seen: 3 months 2 weeks ago

Thanks for your answer. I have created a new UserLibrary named MS SQL under BuildPath and testet with mssql-jdbc-7.0.0.jre10.jar, mssql-jdbc-7.0.0.jre8.jar and sqljdbc42.jar. Nothing works.

Interestingly, I have a GIT repository with the DataSources (which worked previously). And a newly created project without DataSources. It works in the newly created project. Not in my GIT repository. And I wonder why not.

I don´t know witch jar i need. Microsoft SQL Server Version is 2022 64-Bit KB5026717.

net.sf.jasperreports.engine.JRRuntimeException: java.lang.ClassNotFoundException: cannot be found by
    at java.base/ Source)
Caused by: java.lang.ClassNotFoundException: cannot be found by
    at org.eclipse.osgi.internal.loader.BundleLoader.generateException(
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Unknown Source)
    at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(

thomas.wuest's picture
Joined: Mar 23 2020 - 6:29am
Last seen: 3 months 2 weeks ago

As recommended by @darth_fader, the driver should be added to your project in Jaspersoft Studio.
If published to the server you should also add the driver to the server either in the webapps/jasperserver/WEB-INF/lib folder or through the UI when defining the data source connection.

rpeguet's picture
Joined: Mar 8 2011 - 2:06am
Last seen: 17 hours 42 min ago