on 10-01-2007 3:10 PM
Hi Experts,
I am trying to connect to oracle database through java.
For this i have written the following code.
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
}
catch (ClassNotFoundException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
Connection conn;
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
try {
conn = DriverManager.getConnection("jdbc:oracle:thin:@155.125.45.243:1522:SEBND801","SDC_APT","abcd");
}
catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
wdComponentAPI.getMessageManager().reportException("Error in connecting to the SDC database",false);
}
I am getting the error : No suitable driver.
Do i need to add any jar files on the server or in my project?
Appriciate your help in this.
Ashish Shah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhijit , Chintan,
Thanks for your respose.
I am using j2sdk1.4.2_11 , when i checked the site : http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html
I could see these three classses for JDK 1.4 , now can you tell me which one do i need to include in my WebDynpro application?
ojdbc14.jar - JDBC classes (1,212,964 bytes)
ojdbc14_g.jar - JDBC classes with debug and trace(1,427,311 bytes)
ocrs12.jar - Additional RowSet support (37,761 bytes)
Also , Do i need to install / deploy or configure anything in my WebApplication server?
Ashish Shah
Ashish,
In case of DC project you will need to create a library project and place the jar file in it. Then you need to add the library project as a used DC in your application DC and it should work fine then.
Following links may help you...
/people/bala.krishnan2/blog/2006/09/25/bid-adieu-to-bots--using-captchas
/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro
- Chintan
Ashish,
Depending on the version of Oracle you are trying t connect you will need to add the Oracle-JDBC jar files. You can check the following link
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html
- Chintan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.