Connection to an Oracle DB
Hi,
I have a small app running in WD which returns the data of a table in a SAP system (via Adaptive RFC model).
It all goes wrong when I want to enrich my WD app with data of the Oracle DB.
My code is as follows:
<b>Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@<server ip>:<port>:<sid>", User, Password);</b>
The exception occurs when the code reaches the "Class.forName..." line and gives the error:
<b>java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
-
Loader Info -
ClassLoader name: [sap.com/xi_monit]
Parent loader name: [Frame ClassLoader]
References:
common:service:http;service:servlet_jsp
service:ejb
common:service:iiop;service:naming;service:p4;service:ts
service:jmsconnector
library:jsse
library:servlet
common:library:IAIKSecurity;library:activation;library:mail;library:tcsecssl
library:ejb20
library:j2eeca
library:jms
library:opensql
common:library:com.sap.security.api.sda;library:com.sap.security.core.sda;library:security.class;library:webservices_lib;service:adminadapter;service:basicadmin;service:com.sap.security.core.ume.service;service:configuration;service:connector;service:dbpool;service:deploy;service:jmx;service:jmx_notification;service:keystore;service:security;service:userstore
interface:resourcecontext_api
interface:webservices
interface:ejbserialization
sap.com/tcwddispwda
sap.com/tcwdcorecomp
service:webdynpro
service:sld
library:tcddicddicservices
library:com.sap.aii.proxy.framework
library:tcgraphicsigs
library:com.sap.mw.jco
library:com.sap.lcr.api.cimclient
library:sapxmltoolkit
library:com.sap.aii.util.rb
library:com.sap.util.monitor.jarm
library:tcddicddicruntime
library:com.sap.aii.util.xml
library:tccolapi
library:com.sap.aii.util.misc
library:tc~cmi
library:tccolruntime
Resources:
D:\usr\sap\XID\DVEBMGS00\j2ee\cluster\server0\apps\sap.com\xi_monit\webdynpro\public\lib\app.jar
Loading model: {parent,references,local}
-
</b>
The strange thing is, that when I make a small Java project, and include this code, it all works fine. It seems that I have to import the Oracle drivers somewhere else, but I do not know where.
Maybe someone already encountered this issue.
Bart
Divakar Salla replied
Hi,
You have created the DataSource and set the parameters on the 'Main Tab', just open the 'Additional Tab' and check if the SQL Engine parameter is set to 'Vendor SQL' and not 'Open SQl'.
Hope that helps.
Regards,
S.Divakar