Linux 上的 iReport,设置 JDBC 驱动程序
我正在尝试让 JasperReports 正常工作。为了构建它们,我使用 iReport。 我需要连接到 MS SQL Server 数据库。在 iReport 中列出了 MS JDBC 驱动程序。但是,当我去测试连接时,出现找不到类错误。
我已确保我的类路径中有该驱动程序
echo $CLASSPATH
/home/USER/dev/jtds/jtds-1.2.5.jar
有人遇到过此类问题并找到了解决方法吗?
I am trying to get some JasperReports working. To build them I am using iReport.
I need to connect to an MS SQL Server db. In iReport the MS JDBC driver is listed. However when I go to test the connection I get a class not found error.
I have made sure that I have the driver in my class path
echo $CLASSPATH
/home/USER/dev/jtds/jtds-1.2.5.jar
Has any one run into these sorts of issues and found a way around?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
关键思想是“在 iReport 中列出了 MS JDBC 驱动程序”。有点令人惊讶……这根本没有任何意义。
嗯...这意味着 iReport 团队认为这是一个足够常见的驱动程序,因此他们将其放入下拉列表中,这样您就不必键入它。这并不意味着驱动程序可用。
正如 Dan 在评论中已经提到的那样,解决方案是使用菜单“工具”→“选项”将相关的 .jar 文件 (jtds-1.2.5.jar) 添加到 iReport 的类路径中。 (在 OS X 上是菜单 iReport → Preferences)。
The key idea is "In iReport the MS JDBC driver is listed." Somewhat surprisingly... this means nothing at all.
Well... it means that the iReport team thinks this is a common enough driver that they put it into the drop down list so that you would not have to type it. It does not mean that the driver is available.
As Dan has already alluded to in the comments, the solution is to add the relevant .jar file (jtds-1.2.5.jar) to iReport's classpath using the menu Tools → Options. (On OS X it's the menu iReport → Preferences).
转到 ireport,您将在顶部看到一个图标,然后单击它,它将显示您建立到 jdbc 的连接并向其添加 ojdbc 14 jar 的路径。就这么简单,并将该 jar 添加到类路径中。
go to the ireport there u will see one icon on top and click it it will show paths there u establish a connection to jdbc and add ojdbc 14 jar to it . that's it simple and add that jar to classpath.