This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No suitable driver found for jdbc:oracle:thin:@localhost:1521:Indu

 
indu yeturu
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all,

am getting this error when am trying to connect to database with connection.properties file

but it works perfectly if am not using properties file in class ...

class12.jar is there in classpath.
why the difference is coming, and please help me in solving this !
 
Smitesh Shinde
Ranch Hand
Posts: 45
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Indu,
Seems to be problem with reading of properties file.
 
indu yeturu
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

here, it is connecting to properties file i think... is there any error?
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Print out all of the values of the info you get from the property file to check.



Does it show what you expect?

(not shure: Can you have spaces between property and equal sign, or between equal sign and value?)
 
indu yeturu
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have printed all the values, which are same as in javaclass. and I removed the spaces between the = sign and the value , but still getting the same exception
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see "Class.forName(...);" in your property file example.
 
indu yeturu
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh! thank you somuch . I forgot to include class.forName(...) in jsp's and servlets.... now, it is working fine..



just , have a look on this, and correct me if my way is wrong ...
is this the correct way to write connection details property file ??

my properties file is ::


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic