• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

connection problem

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I want to check the jdbc connection using weblogic 7.0 and Oracle 9.0.1.
To verify this I wrote the following program.
import java.sql.*;
public class TestOracle
{
public static void main(String args[])throws SQLException
{
try
{
Class.forName("weblogic.jdbc.oci.Driver");
String url = "jdbc:weblogic racle racledb";
Connection con = DriverManager.getConnection(url,"scott", "tiger");
con.close();
}catch(Exception e){ System.out.println(e); }
}
}
I get the following run time error:
java.lang.ClassNotFoundException: weblogic.jdbc.oci.Driver
I am using windows XP and have set the following in Environment->System Variables.
CLASSPATH settings in system variable
C:\oracle\ora90\jdbc\lib\classes12.zip;C:\bea\weblogic700\server\lib\weblogic_sp.jar;C:\bea\weblogic700\server\lib\weblogic.jar;
PATH settings in system variable
C:\bea\weblogic700\server\bin\oci901_8;C:\j2sdk1.4.0_03\bin;C:\oracle\ora90\bin;
JAVA_HOME: C:\j2sdk1.4.0_03
Please let me know what has gone wrong.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are running this program standalone, then you might want to use the driver which comes with classes12.zip. I think it is:
oracle.jdcc.driver.OracleDriver
If you want to to JDBC using WebLogic, the right way to do it is by configuring the DataSource and Connection Pool using WebLogic's admin console. Below is a link to a sample connection pool configuration. You should be able to test the connection from the admin console itself.
http://e-docs.bea.com/wls/docs81/jdbc_drivers/oracle.html#1057693
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic