on 01-18-2008 4:04 AM
HI All,
In my webdynpro application, i need to insert some values into the Oracle Database through webdynpro Java. When i run my application, it throws an Exception:
"Errorjava.sql.SQLException: No suitable driver "
try
{
conn =DriverManager.getConnection ("jdbc:oracle:thin:@<servername>:<portnumber>:DB","uname", "pwd");
Statement stmt=conn.createStatement();
stmt.executeUpdate ("insert into VEHICLE "
+ "(NAME, PRICE, CURRENCY)"
+ "values ('Audi80', 25000, 'EUR')");
}
finally
{
stmt.close();
}
I have imported the class12 jar. Is there anything else to be done. Why is it throwing me that Exception? How can i rectify that Error? Can anyone please help me on that?
Regards,
Divya
Hi Divya
According to your post , you have already imported classes12.jar into your project. but there are chances that it might not be available at runtime.
For your information...
There are two ways in adding the external JAR files in WebDynpro
1) RightClick on the project - > properties-> Java Build Path - >Libraries ->Add External JAR Files
By doing this , your jar will be available only on the local machine. if the path got changed or file got deleted , you will get errors.so to avoid that
2) Goto Navigation Tab - > navigate through lib directory and paster your .JAR file there
By doing this your jar file will be deployed on to the sever ,so it will be available always on the server
Best Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Divya,
You need to add the .jar file of the database driver to the project.
Right click on project root node and select properties.
Select Java Build Path and then switch to libraries tab.
Click on Add External Jar to add your jar file.
If you don't have the driver you will first have to download it.
Regards,
Mayuresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Divya,
you have to make sure that driver is available in runtime.
where did you put the driver?
you can put it in lib directory of your DC.
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.