Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Java, web-api and Oracle

SOLVED
Go to solution
Highlighted
Carlos_211
Collector

Java, web-api and Oracle

Hi,

I cannot access the Oracle database with the web-api in Java. The Error when I execute my program in Java is the following...

"Error no driver:java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver"

In this program I haven't used web-api, becouse i cannot access even the database. I include also the lines of my programm.
4 REPLIES
Oguz Kutlu Asi
Honored Contributor
Solution

Re: Java, web-api and Oracle

Hi,

Your oracle jdbc driver is missing, or classpath is not defined. I attached a sample to open connection to a oracle service desk database using jdbc.

I've written that kind of java code matching servernames (search codes) written in a text file with CMDB and writing result to another text file, so i can see missing ones It's because you can only search one by one using client's search facility.

I couldn't attach oracle jdbc driver (ojdbc14.jar) because it's size is greater than 1 MB. You need to find it.
What's right is right, whether or not God exists
Rubem Andrade
Occasional Visitor

Re: Java, web-api and Oracle

Carlos,

Take a look at the following doc :
http://support.openview.hp.com/tech_docs/sd/sd_oracle_troubleshooting_guide.pdf

You have to proceed a login at the site to get the doc.

Anyway what is the Java version you are using? Remember that Service Desk normally
runs Java 1.3.1.

Hope it helps,
Regards,
RA

Carlos_211
Collector

Re: Java, web-api and Oracle

Thanks, now it is solved.

I didn't know in which .jar file were the driver classes, So I entered www.oracle.com->downloads->driverODBC->Java1.4 and I saw that the file I needed was the ojdbc14.jar.

After that, I found that file in my oracle folder tree and added it to the classpath, and everything worked!! (It was in "D:\oracle\ora92\jdbc\lib\ojdbc14.jar" )

Thanks a lot.

Carlos, from Spain
Carlos_211
Collector

Re: Java, web-api and Oracle

Closed ;-)
//Add this to "OnDomLoad" event