Library jdbc not linking...LINUX V7.1 
Author Message
 Library jdbc not linking...LINUX V7.1

Hi all,

I have a problem using JAVA JDBC connection for DB2.

I'm trying to use DB2 in action with JSP pages.

So I have a sample of code :


Driver DriverRecordset1 =
(Driver)Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
Connection ConnRecordset1 =
DriverManager.getConnection("jdbc:db2://192.168.2.1:50000;rdbname=PROJECT","db2inst1","********");
PreparedStatement StatementRecordset1 =
ConnRecordset1.prepareCall("SELECT NAME FROM DB2INST1.PROJECT ORDER BY
NAME ASC");
StatementRecordset1.setQueryTimeout(0);
ResultSet Recordset1 = StatementRecordset1.executeQuery();
boolean Recordset1_isEmpty = !Recordset1.next();
boolean Recordset1_hasData = !Recordset1_isEmpty;
int Recordset1_numRows = 0;
%>

This piece of code works correctly when I'm using it under the shell
with the db2inst1 user, or with my regular account.

Under Apache/JServ I get the result :

Exception: java.sql.SQLException: java.lang.UnsatisfiedLinkError: no
db2jdbc in shared library path
java.sql.SQLException: java.lang.UnsatisfiedLinkError: no db2jdbc in
shared library path
        at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.java:224)
        at jsp__test_2ejsp._jspService(jsp__test_2ejsp.java:50)
        at org.gjt.jsp.HttpJspPageImpl.service(HttpJspPageImpl.java:75)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
        at org.gjt.jsp.JspServlet$Page.process(JspServlet.java:640)
        at org.gjt.jsp.JspServlet.service(JspServlet.java:284)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
        at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:317)
        at
org.apache.jserv.JServConnection.run(JServConnection.java:188)
        at java.lang.Thread.run(Thread.java)

GNUJSP: Please report to Administrator. No JSP error page registered.

This error seems strange because I have correctly linked all the
libraries for libdb2jdbc.so

ldconfig -v gives the correct result.

Can someone help me ?

Bruno



Mon, 24 Feb 2003 17:44:07 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. ora8i - linux / library link problem

2. Missing libdb-3.1 DB2 Linux V7.2 OS Linux Debian

3. Ordinal 801could not be located in the dynamic link library msjet40.dll

4. the ordinal 29 could not be located in dynamic link library odbcbcp.dll

5. problem: Ordinal 107 could not be located in the dynamic link library opends60.dll

6. DB-library/CT-library/Tools for Linux

7. JDBC 8.1.6 not working with Oracle 8.0.5 on Linux

8. ns4.03 intermittent hang on local network, though not on slow link (using jdbc)

9. Link errors while linking a Sybase Client library program

10. DB-Library error 10040: DB-Library network communication layer not loaded

11. Sybase on Linux - Relational Databases for Linux - with Article and vendor links - Updated 27-Sep-98

12. Linux/JDBC/RMI to Solaris/JDBC to DB2...


 
Powered by phpBB® Forum Software