thomas.wuest Posted May 30, 2023 Share Posted May 30, 2023 Hello, after update from 6.12.0 to 6.20.3 i became an error: "net.sf.jasperreports.engine.JRRuntimeException: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver cannot be found by net.sf.jasperreports_6.20.3.final" 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? Link to comment Share on other sites More sharing options...
Mehak Rajkumar Posted May 30, 2023 Share Posted May 30, 2023 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 https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
darth_fader Posted June 3, 2023 Share Posted June 3, 2023 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. Link to comment Share on other sites More sharing options...
thomas.wuest Posted June 6, 2023 Author Share Posted June 6, 2023 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: com.microsoft.sqlserver.jdbc.SQLServerDriver cannot be found by net.sf.jasperreports_6.20.3.final at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:199) at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.contributeParameters(JdbcDataAdapterService.java:125) at net.sf.jasperreports.data.AbstractDataAdapterService.test(AbstractDataAdapterService.java:120) at com.jaspersoft.studio.data.DataAdapterEditorPart$1$1.runOperations(DataAdapterEditorPart.java:196) at com.jaspersoft.studio.utils.jobs.CheckedRunnableWithProgress$1.run(CheckedRunnableWithProgress.java:50) at java.base/java.lang.Thread.run(Unknown Source)Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver cannot be found by net.sf.jasperreports_6.20.3.final at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541) at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:536) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168) 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(JRClassLoader.java:208) at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:158) Link to comment Share on other sites More sharing options...
Raphaël Peguet Posted June 12, 2023 Share Posted June 12, 2023 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now