Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connect oracle database to my servlet

 
shobhita srinivasan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone
i am very new to java and i have been asked to connect to an oracle database through my servlet. i performed the exact same task with an access database but i am not able to do the same with an oracle database. i have made the necessary changes in including the jar files and i have also included the driver in the classpath. what more is to be done??? also when i give the command to view the classpath in eclipse the classpath does not show the added path of the oracle driver.

help required....!!!
 
prakash pawar
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi shobhita,

Before checking the conectivity from a servlet,Can you please the it from "Data Source Explorer" view of Eclipse IDE.

for Data Source Explorer navigate : Window > Show View > Datasource Explorer.

fill all the database credential detail and test the connection.

if it works there then if you are not wrong at code it should work.

good luck :-)

Edited to remove direct email: please read UseTheForumNotEmail. If you're dead-set on not helping anybody else, use a private message.

 
shobhita srinivasan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,

thanks for helping me out. i don't seen to have the plugin feature for the datasource view in my eclipse. is there any other way to check whether the connection has been made successfully. i get the exception that no suitable driver found.
As far as my knowledge goes(which is very very very less when it comes to java) i get this exception when the jar files required are not put in the classpath right??

i am sorry if my doubts sound really dumb

 
prakash pawar
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

I guess the version of your jar file is not compatible.

try with different jar file.

 
shobhita srinivasan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tried with a different driver too...!! still nt workin
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're not really providing enough information to help. Like the jar you're using, the driver name you're using, the basics.
 
shobhita srinivasan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
am using the odbc14.jar file and i am useing the oracle thin driver
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The driver *name*.

What *specific* error are you getting, and under what circumstances? Please see TellTheDetails and ItDoesntWorkIsUseless: it's really important that you help us help you; don't make us ask every little question.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic