Link to home
Start Free TrialLog in
Avatar of NaveenBandaru
NaveenBandaru

asked on

Webservice with JDBC

Below code works fine when I run this as a stand alone appli cation.
            Class.forName("oracle.jdbc.driver.OracleDriver");
However, when I expose this as a operation in a webervice, it throws below error  java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

I am trying this with the apache, I have exposed this as a webservce.
Any suggestions for this. I tried even DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver())
it does not work even for this. Both of them are working fine when I run them as stand alone on Eclipse, when I espose it as websevice it does not work.

Any suggestions/
ASKER CERTIFIED SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Do you have path to classes12.jar included in your CLASSPATH? It's something like that:
\yourOraHome\jdbc\lib\classes12.jar;
Avatar of NaveenBandaru
NaveenBandaru

ASKER

Got resolved