| 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: 44
|
|
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: 2343
|
|
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
ITIL foundation
|
 |
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: 2343
|
|
|
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 ::
|
 |
 |
|
|
subject: No suitable driver found for jdbc:oracle:thin:@localhost:1521:Indu
|
|
|