Topic
  • 1 reply
  • Latest Post - ‏2004-12-15T11:59:21Z by ChrisBailey
SystemAdmin
SystemAdmin
2736 Posts

Pinned topic java.lang.UnsatisfiedLinkError: SQLAllocStmt

‏2004-12-15T08:15:08Z |
Hi, dear all

I'm developing a Java application using WSAD 5.1.1 and DB2 7.1
I've made a connection to a datasource via jdbc 2 driver successfully. But I encountered java.lang.UnsatisfiedLinkError exception.

The source code

code
Connection conn = null;
PreparedStatement ps = null;
try {
conn = ScaninSQLUtil.getConnection();
ps = conn.prepareStatement("select * from T_SYS_PARMS");
[/code]

Exception:

code
2004-12-15 15:32:40,344 com.pdc.gwisamhk.robot.common.Tracer ERROR - SQLAllocStmt
java.lang.UnsatisfiedLinkError: SQLAllocStmt
at COM.ibm.db2.jdbc.app.DB2Statement.<init>(DB2Statement.java:321)
at com.pdc.gwisamhk.robot.scanin.Scanin.main(Scanin.java:851)
[/code]
I've been searching for the solution for days, but couldn't make any progress.
Please help!

Thanks!
Updated on 2004-12-15T11:59:21Z at 2004-12-15T11:59:21Z by ChrisBailey
  • ChrisBailey
    ChrisBailey
    190 Posts

    Re: java.lang.UnsatisfiedLinkError: SQLAllocStmt

    ‏2004-12-15T11:59:21Z  
    Hi:

    This is really a DB2 JDBC problem, but...

    The normal reason for an UnsatisfiedLinkError is that the Java code has called a native method for which the JVM has been unable to find the native implementation.

    This is usually caused because the library that contains the symbol is not on the library search path for the process.

    Hope this helps,

    Chris