Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2003
    Posts
    4

    Angry Unanswered: help: java.lang.UnsatisfiedLinkError: SQLConnect

    Hello:


    We deploy DB2 and Webshere on win 2000, it works .
    but when we do it on Linux 8.0, we got error that:


    [8/19/03 16:24:07:307 EEST] 546b83f9 WebGroup E SRVE0026E: [Servlet Error]-[SQLConnect]: java.lang.UnsatisfiedLinkError: SQLConnect
    at COM.ibm.db2.jdbc.app.DB2Connection.connect(DB2Conn ection.java:509)
    at COM.ibm.db2.jdbc.app.DB2Connection.<init>(DB2Conne ction.java:431)
    at COM.ibm.db2.jdbc.app.DB2ReusableConnection.<init>( DB2ReusableConnection.java:72)
    at COM.ibm.db2.jdbc.DB2PooledConnection.getConnection (DB2PooledConnection.java:188)
    at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getConnec tion(WSRdbDataSource.java:213)
    .....


    Program code is :

    ....
    DataSource ds = null;

    try {
    /*
    Hashtable parms = new Hashtable();
    parms.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.ejs.ns.jndi.CNInitialContextFactory") ;
    */
    Context jndiCntx = new InitialContext(); // parms);
    ds = (DataSource) jndiCntx.lookup("jdbc/JINDC");
    }
    catch (NamingException ne) {
    System.err.println("Can't get DB connection ");
    throw new ServletException("Can't get DB connection ");

    }

    if (ds == null) return null;
    Connection conn1 = ds.getConnection();

    Any expert can help us .'
    Last edited by williamtee; 08-19-03 at 10:42.

  2. #2
    Join Date
    Aug 2003
    Posts
    4
    Nobody knows ?

    Or

  3. #3
    Join Date
    Jun 2002
    Location
    UK
    Posts
    525
    I don't really know but seen as you're getting impatient...

    Why don't you check that you have the correct db2java.zip in your classpath.

  4. #4
    Join Date
    Jun 2002
    Location
    UK
    Posts
    525
    Did that help you ?

    Or


  5. #5
    Join Date
    Aug 2003
    Posts
    4
    Sorry to say negative.

    driver package is there well, and we just got exception during getConnection.

  6. #6
    Join Date
    Jun 2002
    Location
    UK
    Posts
    525
    Are you sure? AFAIK, there are 2 db2java.zip files. One for websphere and the other is the standard db2 file in .../sqllib/java. I think that you need to ensure that your classpath points to the db2 file and NOT the websphere one.

    A search on google for "db2java.zip unsatisfiedlinkerror" would shed some more light on the subject.

    HTH

  7. #7
    Join Date
    Aug 2003
    Posts
    4
    ----------------------
    Are you sure? AFAIK, there are 2 db2java.zip files. One for websphere and the other is the standard db2 file in .../sqllib/java. I think that you need to ensure that your classpath points to the db2 file and NOT the websphere one.

    A search on google for "db2java.zip unsatisfiedlinkerror" would shed some more light on the subject.

    HTH
    ---------------------------

    Of course and i defined the driver classpath to /db2instl/sqllib/java .

    >ANy way thank you for your help.

  8. #8
    Join Date
    Jun 2002
    Location
    UK
    Posts
    525
    Okay William. Can you keep us updated if/when you find a solution?

    Thanks, Damian

  9. #9
    Join Date
    Sep 2003
    Posts
    1

    Cool Re: help: java.lang.UnsatisfiedLinkError: SQLConnect

    try use db2jcc.jar instead.


    Originally posted by williamtee
    Hello:


    We deploy DB2 and Webshere on win 2000, it works .
    but when we do it on Linux 8.0, we got error that:


    [8/19/03 16:24:07:307 EEST] 546b83f9 WebGroup E SRVE0026E: [Servlet Error]-[SQLConnect]: java.lang.UnsatisfiedLinkError: SQLConnect
    at COM.ibm.db2.jdbc.app.DB2Connection.connect(DB2Conn ection.java:509)
    at COM.ibm.db2.jdbc.app.DB2Connection.<init>(DB2Conne ction.java:431)
    at COM.ibm.db2.jdbc.app.DB2ReusableConnection.<init>( DB2ReusableConnection.java:72)
    at COM.ibm.db2.jdbc.DB2PooledConnection.getConnection (DB2PooledConnection.java:188)
    at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getConnec tion(WSRdbDataSource.java:213)
    .....


    Program code is :

    ....
    DataSource ds = null;

    try {
    /*
    Hashtable parms = new Hashtable();
    parms.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.ejs.ns.jndi.CNInitialContextFactory") ;
    */
    Context jndiCntx = new InitialContext(); // parms);
    ds = (DataSource) jndiCntx.lookup("jdbc/JINDC");
    }
    catch (NamingException ne) {
    System.err.println("Can't get DB connection ");
    throw new ServletException("Can't get DB connection ");

    }

    if (ds == null) return null;
    Connection conn1 = ds.getConnection();

    Any expert can help us .'

  10. #10
    Join Date
    Aug 2003
    Posts
    3

    update : solved

    For future reference I had this problem and fixed it by ensuring that the User that started WebSphere had the db2profile script in their .profile

    Hope this helps someone!

    Damian.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •