• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Web service with a jdbc connection

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I would to create a web service (with the Eclipse tool). In my WS I have to connect to a oracle database and insert some record in a table.
I have tried to create a simple application (no WS) connected with JDBC to this database (inserting the ojdbc14.jar into the project) and it works!
I also tried to create a web service connected to my db with ODBC...and it works too!
But if I create a WS with the same code of the "Jdbc application" it doesn't work and the message is:

oracle.jdbc.driver.OracleDriver
No suitable driver

Why?

-Thanks a lot-
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know how Eclipse sets things up, but it sounds like a classpath problem. Have you checked that the correct jar file is included in your project?
 
Richard Sorhands
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I read documentation on jdbc connection. For the jre 1.4 I have to use the file ojdbc14.jar. But it's strange that the application that write on the db works, but not the web service!
 
Richard Sorhands
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
help me please! :shocked:
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you consider what I wrote earlier? There is a question in that post. I assume it's also not because of a misspelt URL?
 
Richard Sorhands
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have insert into the project the correct jar...I hope!
In the console Eclipse also write:

Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.

I don't know if it is the problem but I have included the activation.jar and mail.jar! I don't understand..
[ June 09, 2006: Message edited by: Richard Sorhands ]
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That sounds to me very much like the jar files are not where Eclipse expects them to be.
 
author & internet detective
Posts: 42056
926
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Richard,
The Eclipse project path is used for compilation. You need to make sure the JDBC driver is in the classpath of the server.

I'm moving this to our IDEs forum, since it turned out to be more about Eclipse/classpaths than JDBC.
 
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic