Loading ...
Sorry, an error occurred while loading the content.
 

RE: [Firebird-Java] jaybird problem

Expand Messages
  • Sachin Walia
    Hi.. I see a lot of whitespaces in ur classpath.. remove any whitespace in ur classpath.. reset it as follows.. SET
    Message 1 of 5 , Nov 1, 2002
      Hi..
       
      I see a lot of whitespaces in ur classpath.. remove any whitespace in ur classpath..
       
      reset it as follows..
       
      SET CLASSPATH=G:\fbjdbc\lib\mini-j2ee.jar;G:\fbjdbc\lib\mini-concurrent.jar;G:\fbjdbc\jaas.jar;G:\fbjdbc\lib\log4j-core.jar;G:\fbjdbc\firebirdsql.jar;G:\fbjdbc\firebirdjmx.jar;D:\j2sdk1.4.0
      \bin;D:\j2sdk1.4.0\lib;D:\j2sdk1.4.0\jre\lib;
       
      hope it helps..
       
      sachin

      -----Original Message-----
      From: chc_225 [mailto:chc_225@...]
      Sent: Friday, November 01, 2002 8:59 AM
      To: Firebird-Java@yahoogroups.com
      Subject: [Firebird-Java] jaybird problem

      Hello,

      I am still having problem with the jaybird jdbc driver. this is my
      configuration

      I am using a windows NT 4.0  and J2sdk1.4.0

      this is my classpath:-

      CLASSPATH=G:\fbjdbc\lib\mini-j2ee.jar; G:\fbjdbc\lib\mini-
      concurrent.jar; G:\fbjdbc\jaas.jar;  G:\fbjdbc\lib\log4j-core.jar; 
      G:\fbjdbc\firebirdsql.jar; G:\fbjdbc\firebirdjmx.jar; D:\j2sdk1.4.0
      \bin; D:\j2sdk1.4.0\lib; D:\j2sdk1.4.0\jre\lib;


      I called my program with the following:-
      F:\practice>java  TstFb

      and get the following error:-
      Couldn't locate the driver class: java.lang.ClassNotFoundException:
      org.firebirdsql.jdbc.FBDriver


      can anyone help me find the problem please.


      this is my program listing - pls note that it is not that garbled in
      my editor :-

      import java.sql.*;

      public class TstFb
      {
           public static void main(String args[])
           {
               String lname = null;
               String fname = null;
               Connection con;
                Statement sment;
                ResultSet rs;

                 try
                 {
                     Class.forName("org.firebirdsql.jdbc.FBDriver");
                      con = DriverManager.getConnection
      ("jdbc:firebirdsql://localhost/3050:Ibaccess.gdb", "SYSDBA",
                    "masterkey");
                           
                      String sql = "SELECT lname, fname FROM customer WHERE
      custno = 3";

                      sment = con.createStatement();

                      rs = sment.executeQuery(sql);

                      if ( rs.next() )
                      { lname = rs.getString("lname");
                         fname = rs.getString("fname");
                       }
                       rs.close();
                       sment.close();
                       con.close();

                  }

                  catch ( ClassNotFoundException cnfe )
                  {
                      System.err.println("Couldn't locate the driver
      class: "+cnfe);
                   }
                   catch ( SQLException se )
                   {
                       System.err.println("Exception creating the database
      connection: "+se);
                   }


                       

            } // main
        } // CLASS




      this is the structure of my directory where I have jaybird files:-

      Directory of G:\fbjdbc

      06/08/02  09:44p        <DIR>          .
      06/08/02  09:44p        <DIR>          ..
      09/22/02  10:25p                73,089 firebirdjmx.jar
      09/22/02  10:25p                94,126 firebirdsql-test.jar
      09/22/02  10:25p               229,301 firebirdsql.jar
      09/22/02  10:25p               215,721 firebirdsql.rar
      06/08/02  09:44p        <DIR>          lib
      09/11/02  11:42p                98,743 release_notes.html


      Directory of G:\fbjdbc\lib

      06/08/02  09:44p        <DIR>          .
      06/08/02  09:44p        <DIR>          ..
      05/09/01  10:30a               104,195 jaas.jar
      02/02/02  01:45p                66,624 log4j-core.jar
      09/22/02  10:25p                 6,473 mini-concurrent.jar
      09/22/02  10:25p                31,186 mini-j2ee.jar



      thanks in advance for your help




      To unsubscribe from this group, send an email to:
      Firebird-Java-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
    • Luca Lafranchi
      Hi :) There s something else: the connections string is wrong: jdbc:firebirdsql://localhost/3050:Ibaccess.gdb should be
      Message 2 of 5 , Nov 1, 2002
        Hi :)
        There's something else: the connections string is wrong:
        "jdbc:firebirdsql://localhost/3050:Ibaccess.gdb" should be

        "jdbc:firebirdsql:localhost/3050:drive:/path/to/Ibaccess.gdb" (Windows)
        or
        "jdbc:firebirdsql:localhost/3050:/path/to/Ibaccess.gdb" (Linux & co)

        Ciao
        Luca
      • chc_225
        Sachin, thanks for the help, it worked. Now I can really start playing with the database through code. ... in ur ... concurrent.jar;G: f ...
        Message 3 of 5 , Nov 2, 2002
          Sachin, thanks for the help, it worked.

          Now I can really start playing with the database through code.


          --- In Firebird-Java@y..., Sachin Walia <sachinw@s...> wrote:
          > Hi..
          >
          > I see a lot of whitespaces in ur classpath.. remove any whitespace
          in ur
          > classpath..
          >
          > reset it as follows..
          >
          > SET
          > CLASSPATH=G:\fbjdbc\lib\mini-j2ee.jar;G:\fbjdbc\lib\mini-
          concurrent.jar;G:\f
          > bjdbc\jaas.jar;G:\fbjdbc\lib\log4j-
          core.jar;G:\fbjdbc\firebirdsql.jar;G:\fbj
          > dbc\firebirdjmx.jar;D:\j2sdk1.4.0
          > \bin;D:\j2sdk1.4.0\lib;D:\j2sdk1.4.0\jre\lib;
          >
          > hope it helps..
          >
          > sachin
          >
          >
          > -----Original Message-----
          > From: chc_225 [mailto:chc_225@y...]
          > Sent: Friday, November 01, 2002 8:59 AM
          > To: Firebird-Java@y...
          > Subject: [Firebird-Java] jaybird problem
          >
          >
          > Hello,
          >
          > I am still having problem with the jaybird jdbc driver. this is my
          > configuration
          >
          > I am using a windows NT 4.0 and J2sdk1.4.0
          >
          > this is my classpath:-
          >
          > CLASSPATH=G:\fbjdbc\lib\mini-j2ee.jar; G:\fbjdbc\lib\mini-
          > concurrent.jar; G:\fbjdbc\jaas.jar; G:\fbjdbc\lib\log4j-core.jar;
          > G:\fbjdbc\firebirdsql.jar; G:\fbjdbc\firebirdjmx.jar; D:\j2sdk1.4.0
          > \bin; D:\j2sdk1.4.0\lib; D:\j2sdk1.4.0\jre\lib;
          >
          >
          > I called my program with the following:-
          > F:\practice>java TstFb
          >
          > and get the following error:-
          > Couldn't locate the driver class: java.lang.ClassNotFoundException:
          > org.firebirdsql.jdbc.FBDriver
          >
          >
          > can anyone help me find the problem please.
          >
          >
          > this is my program listing - pls note that it is not that garbled
          in
          > my editor :-
          >
          > import java.sql.*;
          >
          > public class TstFb
          > {
          > public static void main(String args[])
          > {
          > String lname = null;
          > String fname = null;
          > Connection con;
          > Statement sment;
          > ResultSet rs;
          >
          > try
          > {
          > Class.forName("org.firebirdsql.jdbc.FBDriver");
          > con = DriverManager.getConnection
          > ("jdbc:firebirdsql://localhost/3050:Ibaccess.gdb", "SYSDBA",
          > "masterkey");
          >
          > String sql = "SELECT lname, fname FROM customer
          WHERE
          > custno = 3";
          >
          > sment = con.createStatement();
          >
          > rs = sment.executeQuery(sql);
          >
          > if ( rs.next() )
          > { lname = rs.getString("lname");
          > fname = rs.getString("fname");
          > }
          > rs.close();
          > sment.close();
          > con.close();
          >
          > }
          >
          > catch ( ClassNotFoundException cnfe )
          > {
          > System.err.println("Couldn't locate the driver
          > class: "+cnfe);
          > }
          > catch ( SQLException se )
          > {
          > System.err.println("Exception creating the
          database
          > connection: "+se);
          > }
          >
          >
          >
          >
          > } // main
          > } // CLASS
          >
          >
          >
          >
          > this is the structure of my directory where I have jaybird files:-
          >
          > Directory of G:\fbjdbc
          >
          > 06/08/02 09:44p <DIR> .
          > 06/08/02 09:44p <DIR> ..
          > 09/22/02 10:25p 73,089 firebirdjmx.jar
          > 09/22/02 10:25p 94,126 firebirdsql-test.jar
          > 09/22/02 10:25p 229,301 firebirdsql.jar
          > 09/22/02 10:25p 215,721 firebirdsql.rar
          > 06/08/02 09:44p <DIR> lib
          > 09/11/02 11:42p 98,743 release_notes.html
          >
          >
          > Directory of G:\fbjdbc\lib
          >
          > 06/08/02 09:44p <DIR> .
          > 06/08/02 09:44p <DIR> ..
          > 05/09/01 10:30a 104,195 jaas.jar
          > 02/02/02 01:45p 66,624 log4j-core.jar
          > 09/22/02 10:25p 6,473 mini-concurrent.jar
          > 09/22/02 10:25p 31,186 mini-j2ee.jar
          >
          >
          >
          > thanks in advance for your help
          >
          >
          >
          >
          > Yahoo! Groups Sponsor
          >
          > ADVERTISEMENT
          >
          >
          <http://rd.yahoo.com/M=237459.2482214.3917349.2146399/D=egroupweb/S=17
          050067
          >
          64:HM/A=1267611/R=0/*http://ad.doubleclick.net/jump/N2524.Yahoo/B10716
          50;sz=
          > 300x250;ord=1036121332521274?>
          >
          > <http://us.adserver.yahoo.com/l?
          M=237459.2482214.3917349.2146399/D=egroupmai
          > l/S=:HM/A=1267611/rand=435008327>
          >
          > To unsubscribe from this group, send an email to:
          > Firebird-Java-unsubscribe@y...
          >
          >
          >
          > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
          > <http://docs.yahoo.com/info/terms/> .
        • chc_225
          thanks for the help luca. I have changed the connection string also. It is working now. ... (Windows)
          Message 4 of 5 , Nov 2, 2002
            thanks for the help luca.
            I have changed the connection string also. It is working now.

            --- In Firebird-Java@y..., "Luca Lafranchi" <luca.lafranchi@r...>
            wrote:
            > Hi :)
            > There's something else: the connections string is wrong:
            > "jdbc:firebirdsql://localhost/3050:Ibaccess.gdb" should be
            >
            > "jdbc:firebirdsql:localhost/3050:drive:/path/to/Ibaccess.gdb"
            (Windows)
            > or
            > "jdbc:firebirdsql:localhost/3050:/path/to/Ibaccess.gdb" (Linux & co)
            >
            > Ciao
            > Luca
          Your message has been successfully submitted and would be delivered to recipients shortly.