• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

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

 
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 !
 
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?
 
Bartender
Posts: 2657
19
Netbeans IDE C++ Linux
  • 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: 2657
19
Netbeans IDE C++ Linux
  • 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 ::


 
If you were a tree, what sort of tree would you be? This tiny ad is a poop beast.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!