2

I'm trying to set up s prototype for accessing Oracle data in an xPage using the JDBC Query in the Extension Library. I'm getting the following errors:

Error while reading the relational data Error while loading connection cos11p Error loading JDBC driver class com.oracle.jdbc.driver_1.0.0.20141104-1319. If running the server, check that an OSGi plugin wrapper for the corresponding JDBC driver is available on the server, or that the corresponding package is available in the WEB-INF/lib directory. If running the studio, check that the corresponding package is available in your client library. java.sql.SQLException: Cannot create JDBC driver com.oracle.jdbc.driver_1.0.0.20141104-1319 Cannot create JDBC driver com.oracle.jdbc.driver_1.0.0.20141104-1319 java.lang.ClassNotFoundException: Cannot find class com.oracle.jdbc.driver_1.0.0.20141104-1319 in NSF Cannot find class com.oracle.jdbc.driver_1.0.0.20141104-1319 in NSF com.oracle.jdbc.driver_1.0.0.20141104-1319

Here is what I have done so far to set this up: 1. Installed latest version of extension library on the server 2. Installed JDBC driver on the server using the Open NTF wizard 3. created cos11p.jdbc connection file located in WebContent\WEB-INF\JDBC

<jdbc>
<driver>com.oracle.jdbc.driver_1.0.0.20141104-1319</driver>
<url>jdbc:oracle:thin:@//sodb2p.malt-o-meal.com:1521/cos11p</url>
<user>username</user>
<password>password</password>
</jdbc> 
  1. Created xpage with view panel using JDBC Query pointing to jdcb connection
  2. Xpage application properties have relational and extlib libraries checked
Shean McManus
  • 158
  • 1
  • 10

2 Answers2

3

That "JDBC driver class" from the error looks wrong. I believe it should be "oracle.jdbc.OracleDriver". In the JDBC driver plugin wizard, the "class" field should use that String I've quoted, which references a class within the JDBC driver you've downloaded (not the filename of the driver itself). It's a key part of getting the generated OSGi plugin to work correctly.

And in the JDBC file, you would then use the same class name in the "driver" parameter. I don't think there should be a date stamp in that parameter at all

Brian Gleeson - IBM
  • 2,565
  • 15
  • 21
  • Bingo! I had initially had the driver parameter as "com.oracle.jdbc.driver" and then matched it with the actual driver name. Needs to be "oracle.jdbc.OracleDriver" as you suggested. Thanks! – Shean McManus Nov 19 '14 at 22:03
  • Great. Even with the wizard, it can be a bit tricky to get perfectly right. Glad it worked – Brian Gleeson - IBM Nov 19 '14 at 23:33
0

Did you check that the OSGi driver was loaded properly? Try

tell http osgi ss oracle

to check

Oliver Busse
  • 3,375
  • 1
  • 16
  • 26