我在 Windows 7 上使用 JReport 9.1,当我尝试运行我的报告时,出现此错误:
Report Engine : Query execution error. Details: Error in connecting to jdbc:oracle:thin:@xxx.xxx.xx.xxx:1521:db_name, Could not initialize class oracle.jdbc.driver.DMSFactory Ensure that the table names, column names and connection are valid and that the JDBC driver can be loaded from the class path.
Oracle 数据库是 11.2.0.3。我的 CLASSPATH 中有 ojdbc6dms_g.jar 文件。我安装了JRE6和JDK1.6。这是怎么回事?
最佳答案
您可以使用ojdbc6.jar
代替ojdbc6dms_g.jar
。 JDBC 驱动程序类是oracle.jdbc.driver.OracleDriver
。看来您的 Oracle DMS 有问题或 CLASSPATH 有问题。
关于java - 无法连接到JReport中的数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13241582/