aspose file tools*
The moose likes JDBC and the fly likes  No suitable driver found for jdbc:oracle:thin:@localhost:1521:Indu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark " No suitable driver found for jdbc:oracle:thin:@localhost:1521:Indu" Watch " No suitable driver found for jdbc:oracle:thin:@localhost:1521:Indu" New topic
Author

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

indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123
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 !


thanks,
indu
Smitesh Shinde
Ranch Hand

Joined: Feb 16, 2008
Posts: 45

Hi Indu,
Seems to be problem with reading of properties file.
indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123

here, it is connecting to properties file i think... is there any error?
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2510
    
  10

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?)

OCUP UML fundamental and ITIL foundation
youtube channel
indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123
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

Joined: Dec 20, 2006
Posts: 2510
    
  10

I don't see "Class.forName(...);" in your property file example.
indu yeturu
Ranch Hand

Joined: Aug 27, 2008
Posts: 123
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 ::


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No suitable driver found for jdbc:oracle:thin:@localhost:1521:Indu