Class Not Found Exception while connecting to Oracle

Discussion in 'Java' started by Amol, Jul 26, 2003.

  1. Amol

    Amol Guest

    Hi,
    I am developing a application in using Struts Framework with Tomcat
    4.1.2 as Web Server.

    I am Trying to connec to to my Oracle Database. I have copied the
    classes12.zip to classes\lib directory of tomcat. But still i am
    getting Class Not Found Exception. Here is my code:


    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection
    ("jdbc:eek:racle:thin:mad:<server Ip
    Addr>:1521:infodev","infodba","infodba");

    I get following Error:
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver


    Please tell me if i am doing anything wrong or i need to add anything
    to this.
    Thanks in Advance.

    Amol.....
     
    Amol, Jul 26, 2003
    #1
    1. Advertising

  2. Amol

    rkm Guest

    should it be
    Class.forName("com.oracle.jdbc.driver.OracleDriver");
    ?
    just a guess. You could zip tvf the classes12.zip file and
    see for sure what the names are.

    rick

    Amol wrote:
    > Hi,
    > I am developing a application in using Struts Framework with Tomcat
    > 4.1.2 as Web Server.
    >
    > I am Trying to connec to to my Oracle Database. I have copied the
    > classes12.zip to classes\lib directory of tomcat. But still i am
    > getting Class Not Found Exception. Here is my code:
    >
    >
    > Class.forName("oracle.jdbc.driver.OracleDriver");
    > Connection conn = DriverManager.getConnection
    > ("jdbc:eek:racle:thin:mad:<server Ip
    > Addr>:1521:infodev","infodba","infodba");
    >
    > I get following Error:
    > java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    >
    >
    > Please tell me if i am doing anything wrong or i need to add anything
    > to this.
    > Thanks in Advance.
    >
    > Amol.....
     
    rkm, Jul 26, 2003
    #2
    1. Advertising

  3. Amol

    Roedy Green Guest

    Roedy Green, Jul 26, 2003
    #3
  4. Amol

    Amol Guest

    Hi,
    Thanks for the Reply.

    I have put the classes12.zip file in both the lib folders, still its
    not working. Any other Suggestion??

    Sudsy <> wrote in message news:<>...
    > Amol wrote:
    > > Hi,
    > > I am developing a application in using Struts Framework with Tomcat
    > > 4.1.2 as Web Server.
    > >
    > > I am Trying to connec to to my Oracle Database. I have copied the
    > > classes12.zip to classes\lib directory of tomcat. But still i am
    > > getting Class Not Found Exception. Here is my code:
    > >
    > >
    > > Class.forName("oracle.jdbc.driver.OracleDriver");
    > > Connection conn = DriverManager.getConnection
    > > ("jdbc:eek:racle:thin:mad:<server Ip
    > > Addr>:1521:infodev","infodba","infodba");
    > >
    > > I get following Error:
    > > java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    > >

    >
    > I have classes12.zip in my $TOMCAT_HOME/lib/common directory.
    > You could also deploy on an application basis by copying it
    > to the $APP_HOME/WEB-INF/lib directory.
     
    Amol, Jul 28, 2003
    #4
  5. Amol

    Sudsy Guest

    Amol wrote:
    > Hi,
    > Thanks for the Reply.
    >
    > I have put the classes12.zip file in both the lib folders, still its
    > not working. Any other Suggestion??


    <snip>

    >>I have classes12.zip in my $TOMCAT_HOME/lib/common directory.
    >>You could also deploy on an application basis by copying it
    >>to the $APP_HOME/WEB-INF/lib directory.


    I forgot the the directory structure changed with Tomcat 4. Do
    you have a directory named $TOMCAT_HOME/shared/lib? If so then
    that's where your classes12.zip file should be installed.
    I don't understand why it wouldn't be picking up the copy in
    your $APP_HOME/WEB-INF/lib directory.
    Unfortunately, without the actual configuration files I can't
    guarantee these suggestions.
     
    Sudsy, Jul 28, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TmVv?=
    Replies:
    2
    Views:
    712
    =?Utf-8?B?TWljaGFlbCBCYWx0aWM=?=
    Jul 12, 2005
  2. Juha Laiho
    Replies:
    0
    Views:
    545
    Juha Laiho
    Jul 30, 2003
  3. David Rudder
    Replies:
    0
    Views:
    408
    David Rudder
    Jul 30, 2003
  4. python_eager

    error rising while connecting oracle 9i

    python_eager, Jan 5, 2006, in forum: Python
    Replies:
    2
    Views:
    457
  5. Feyruz
    Replies:
    4
    Views:
    2,251
    Sherm Pendley
    Oct 14, 2005
Loading...

Share This Page