JDBC 数据库连接失败
JDBC Database Connection Failed
对于数据库,我正在使用 msql server express 和 Microsoft sql server management studio。
为了报告我正在使用 Jaspersoft studio.for 数据库连接我使用了 SQL JDBC 驱动程序,所有驱动程序都已安装但仍然显示数据库连接失败。
错误详情
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.runOperations(AbstractDataAdapterWizard.java:155)
at com.jaspersoft.studio.utils.jobs.CheckedRunnableWithProgress.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)
终于找到答案了
- 为下面的视频启用sql服务器身份验证
enter link description here
2.then打开jaspersoft studio,只需selectJDBC驱动,添加sql服务器认证用户名和密码
大功告成!!!
对于数据库,我正在使用 msql server express 和 Microsoft sql server management studio。
为了报告我正在使用 Jaspersoft studio.for 数据库连接我使用了 SQL JDBC 驱动程序,所有驱动程序都已安装但仍然显示数据库连接失败。
错误详情
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.runOperations(AbstractDataAdapterWizard.java:155)
at com.jaspersoft.studio.utils.jobs.CheckedRunnableWithProgress.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)
终于找到答案了
- 为下面的视频启用sql服务器身份验证 enter link description here
2.then打开jaspersoft studio,只需selectJDBC驱动,添加sql服务器认证用户名和密码
大功告成!!!