Jasper连接Oracle报:oracle.jdbc.driver.OracleDriver cannot be found by net.sf.jasperreports_6.6.0.final

在TIBCO Jaspersoft Studio-6.6.0中创建oracle连接的时候选择oracle,提示,

net.sf.jasperreports.engine.JRRuntimeException: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver 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.DataAdapterEditorPart$1$1.runOperations(DataAdapterEditorPart.java:197)
	at com.jaspersoft.studio.utils.jobs.CheckedRunnableWithProgress$1.run(CheckedRunnableWithProgress.java:51)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver 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)
	... 5 more

这是没找到驱动,在driver classpath 目录下,添加本地ojdbc包

Jasper连接Oracle报:oracle.jdbc.driver.OracleDriver cannot be found by net.sf.jasperreports_6.6.0.final_第1张图片

点击完毕后,提示错误,修改database location 下的   driver-class-name: oracle.jdbc.OracleDriver  ,

然后保存,重新测试,

Jasper连接Oracle报:oracle.jdbc.driver.OracleDriver cannot be found by net.sf.jasperreports_6.6.0.final_第2张图片

 

你可能感兴趣的:(遇到的问题)