我正在尝试为我的 jasperserver 使用远程 MYSQL 源。连接良好,不会抛出错误。但是,当我尝试在 jasperstudio 中进行报告时,出现以下错误
错误日志:
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
net.sf.jasperreports.engine.JRRuntimeException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:166)
at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.contributeParameters(JdbcDataAdapterService.java:126)
at com.jaspersoft.studio.data.jdbc.JDBCFieldsProvider.getFields(JDBCFieldsProvider.java:52)
at com.jaspersoft.studio.data.jdbc.JDBCDataAdapterDescriptor.getFields(JDBCDataAdapterDescriptor.java:83)
at com.jaspersoft.studio.data.ui.SimpleQueryWizardDataEditorComposite.readFields(SimpleQueryWizardDataEditorComposite.java:258)
at com.jaspersoft.studio.property.dataset.wizard.WizardDataSourcePage.run(WizardDataSourcePage.java:369)
at com.jaspersoft.studio.wizards.JSSWizardRunnablePage$1.run(JSSWizardRunnablePage.java:84)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:175)
at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:141)
... 7 more
我也绝对有司机课程mysql-connector-java-5.1.26-bin.jar
。/opt/jasperreports-server-cp-5.5.0/lib
我在类路径 /opt/jasperreports-server-cp-5.5.0/webapps/jasperserver/WEB-INF/lib 中也有相同的 connector.jar ...仍然没有。
我不确定问题是什么......任何帮助将不胜感激!谢谢!