JDBC and OracleDriver problem



I am using iReports (3.7.0) with JasperServer (3.7.3) and Oracle (11.1). I added the JDBC data source just fine. I wrote a sample report using the data source, and it compiles and fills correctly. I published it to my server successfully. However, when I run the report unit from my repository navigator, I get an error in iReport:

1 - oracle.jdbc.driver.OracleDriver

java.lang.Exception: 1 - oracle.jdbc.driver.OracleDriver

at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:403)

at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320)

at com.jaspersoft.ireport.jasperserver.REportRunner.run(REportRunner.java:70)

at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)

at org.openide.util.RequestProcessor$Processor.run(requestProcessor.java:997)

Also, when I log into JasperServer and try to open that sample report, I get a different error stack trace, which is miles long (essentially restating the same ClassNotFoundException error).

I have already tried several things to fix this:

1. I added the Oracle drivers to the iReport classpath.

2. I registered the Oracle drivers in the service window.

3. I placed the Oracle drivers in the iReport\libs folder.

If I'm not mistaken, this is caused by the deprecation of oracle.jdbc.driver in favor of oracle.jdbc, so iReport and JasperServer are still searching for the old Oracle driver, but I am unsure of how to fix it. Any help is appreciated, thanks in advance.

Post Edited by oddpod11 at 06/09/2010 17:39
oddpod11's picture
Joined: Jun 1 2010 - 3:34pm
Last seen: 9 years 8 months ago

5 Answers:


Figured it out thanks to JasperSoft support.  The problem was that the OracleDrivers had not been placed in the server directory in addition to the iReport library.  So, if anyone reading this encounters a similar issue, place the drivers in the jasper-server\\WEB-INF\\lib directory, restart the server, and try again.

oddpod11's picture
Joined: Jun 1 2010 - 3:34pm
Last seen: 9 years 8 months ago


I have issues with resolving this JDBC OracleDriver. I can run my report separately in the iReport but after deploying it in the server then if I choose Right Click then Run JaserServer Report then it throws this exception. I'm using the latest version Jaspersoft BI Suite 4.0.1. I tried copying the drvier zip files in the exact location and I tried in other folders too. But got struck with this issue.

Can someone please help me on this issue? Appreciate your help :)

error.java.lang.Exception: 1 - oracle.jdbc.driver.OracleDriver 
    at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:403) 
    at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320) 
    at com.jaspersoft.ireport.jasperserver.ReportRunner.run(ReportRunner.java:70) 
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) 
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)



tigerteam's picture
Joined: May 25 2011 - 2:22pm
Last seen: 8 years 8 months ago
Ahh Figured it out :)
After installing the Jaspersoft v4 Go To this folder "\\jasperreports-server-4.0.1\\buildomatic\\conf_source\\db\\oracle\\jdbc" copy the appropriate ojdbc jar file (Different version depends on your oracle database - For 11g I copied ojdbc5-11.2.0.jar files) and paste it in two different folders in order to get the iReport and JasperReport run without any java exception.

C:\\Program Files\\jasperreports-server-4.0.1\\apache-tomcat\\lib

C:\\Program Files\\jasperreports-server-4.0.1\\apache-tomcat\\webapps\\jasperserver-pro\\WEB-INF\\lib

tigerteam's picture
Joined: May 25 2011 - 2:22pm
Last seen: 8 years 8 months ago

My problem: net.sf.jasperreports.engine.JRRuntimeException: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:172)
at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.contributeParameters(JdbcDataAdapterService.java:127)
at net.sf.jasperreports.data.AbstractDataAdapterService.test(AbstractDataAdapterService.java:128)
at com.jaspersoft.studio.data.wizard.AbstractDataAdapterWizard$3.run(AbstractDataAdapterWizard.java:157)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
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(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:174)
at net.sf.jasperreports.data.jdbc.JdbcDataAdapterService.getConnection(JdbcDataAdapterService.java:144)
... 4 more
My solution:

I download from this site (oracle): http://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12...   driver for oracle 12

and I write in Data adapter wizard (on tab Draver Classpath, path for my download file)  pic



caps_lock9's picture
Joined: Feb 10 2015 - 9:20pm
Last seen: 1 year 7 months ago

I had the same problem connecting Jaspersoft Studio 6.6.0 to an Oracle 10g database, i downloaded classes12.jar and installed it from 'Driver Classpath' and it worked. Thanks for the guidance

andiewamae's picture
Joined: Feb 27 2019 - 10:28pm
Last seen: 7 months 3 weeks ago