jaspersoft-studiosqljdbc

JDBC Database Connection Failed


For database i am using msql server express and Microsoft sql server management studio. for reporting i am using Jaspersoft studio.for connection of database i used SQL JDBC driver,all drivers are installed but still connection of database showing failed.

enter image description here

Error details

net.sf.jasperreports.engine.JRRuntimeException: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver cannot be found by net.sf.jasperreports_6.6.0.final
    at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:173)
    at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.contributeParameters(JdbcDataAdapterService.java:128)
    at net.sf.jasperreports.data.AbstractDataAdapterService.test(AbstractDataAdapterService.java:122)
    at com.jaspersoft.studio.data.wizard.AbstractDataAdapterWizard$3.runOperations(AbstractDataAdapterWizard.java:155)
    at com.jaspersoft.studio.utils.jobs.CheckedRunnableWithProgress$1.run(CheckedRunnableWithProgress.java:51)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver cannot be found by net.sf.jasperreports_6.6.0.final
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:174)
    at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:145)

Solution

  • Finally i got the answer

    1. enable the sql server authentication for that refer below video enter link description here

    2.then open jaspersoft studio and simply select JDBC driver and add sql server authentication username and password

    and here you are done!!!