java无法连接到JReport中的数据库
我在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
中有OJDBCDMS_g.jar文件。我有JRE6和JDK1。6.已安装。这是怎么回事
# 1 楼答案
你可以用
ojdbc6.jar
代替ojdbc6dms_g.jar
。JDBC驱动程序类是oracle.jdbc.driver.OracleDriver
。看起来您的Oracle DMS有问题,或者类路径有问题