Db2 Sql Error Code=-4472
Contents |
DB2 JDBC JCC Unsatisfied Link UnsatisfiedLinkError db2jcct2 4472 Technote (troubleshooting) Problem(Abstract) Java application failing with UnsatisfiedLinkError, resulting in the failure to load native DB2 library (db2jcct2) for establishing a type 2 ibm db2 sql error code connection. Symptom Applications failing to load the Data Server Driver for a Type 2 db2 sql error code 805 connection may return one of the following messages: [jcc][10389][12245][3.53.70] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: db2jcct2 (No such file or db2 sql error code 404 directory): ERRORCODE=-4472, SQLSTATE=null [jcc][10389][12245][3.57.110] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: Can't find library db2jcct2 (libdb2jcct2.so or .so) ERRORCODE=-4472 Cause The application environment is not configured correctly for loading the DB2 native library. Resolving the db2 sql error code 104 problem TheIBM Data Server Driver for JDBC and SQLJsupports two types of connectivity: type 2 connectivity and type 4 connectivity. Type 2 connectivity requires a DB2 client (or server) installation and has a restriction in that the "bitness" of the java application must match with the DB2 client ( or server) instance. So a 32bit java application using type 2 connectivity can only work with a 32bit DB2 client
Db2 Sql Error Code 803
(or server) instance and a 64bit java application using type 2 connectivity can only work with a 64bit DB2 client (or server) instance for connectivity to a remote (or local) database. The bitnes of the remote database instance does not matter, only that of which is configured in the client application environment. Example, if install the IBM Data Server Driver for JDBC and SQLJ on a Windows 64-bit operating system then one cannot use IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to connect to a DB2 Database for Linux, UNIX, and Windows instance from a 32-bit Java application. If the above requirement has been met and yet continue failing at loading the native db2 library then check that library path is being set correctly. The JVM used for the application environment must load the correct library, depending on its bit type (32-bit or 64-bit). A 32-bit JVM can only load the 32-bit DB2 native libraries and a 64-bit JVM can only load the 64-bit DB2 native libraries. Windows: Ensure LIB environment variable references the correct library path for the JVM. db2jcct2.dll is located in %DB2HOME%\bin Associated libraries (*.lib) are located in: (32-bit) %DB2HOME%\lib\Win32. (64-bit) %DB2HOME%\lib Unix and Linux: Ensure LIBPATH (AIX) or LD_LIBRARY_PA
DB2 type 2 datasource
Db2 Sql Error Code 811
db2jdbc LIBPATH LD_LIBRARY_PATH Technote (troubleshooting) Problem(Abstract) When trying db2 sql error code 204 to connect to a DB2 type 2 datasource from WebSphere Application db2 sql error code 206 Server error java.lang.UnsatisfiedLinkError: SQLConnect occurs. Symptom A type 2 driver has a native library that must be loaded by the http://www.ibm.com/support/docview.wss?uid=swg21419978 jvm process. A java.lang.UnsatisfiedLinkError means that the WebSphere Application Server jvm process could not find or could not load the DB2 library. The following java stack is typical of an UnsatisfiedLinkError using the DB2 legacy driver java.lang.UnsatisfiedLinkError: COM/ibm/db2/jdbc/app/DB2Connection.SQLConnect(Ljava/lang/String;II)I at http://www.ibm.com/support/docview.wss?uid=swg21110708 COM.ibm.db2.jdbc.app.DB2Connection.connect(Unknown Source) at COM.ibm.db2.jdbc.app.DB2Connection.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta http://stackoverflow.com/questions/3957131/java-lang-unsatisfiedlinkerror-while-loading-db2-jdbc-driver Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, db2 sql helping each other. Join them; it only takes a minute: Sign up java.lang.UnsatisfiedLinkError while loading DB2 JDBC driver up vote 7 down vote favorite I try to use jboss-seam with a db2 database, the following error occurs com.ibm.db2.jcc.a.SqlException: [jcc][10389][12245][3.52.95] while loading the native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path an error occurred ERRORCODE=-4472, SQLSTATE=null I tried db2 sql error setting -Djava.library.path=/opt/IBM/db2/V9.5/lib64 as well as -Djava.library.path=/opt/IBM/db2/V9.5/lib32 Both paths include libdb2jcct2.so I also tried to set LD_LIBRARY_PATH with no effect. OS is MacOs EDIT I also tried to use a JDBC4 driver , db2jcc4.jar since jdbc4 drivers shouldn't rely on native libs. java osx jdbc db2 share|improve this question edited Oct 18 '10 at 9:16 Pascal Thivent 398k77815990 asked Oct 18 '10 at 7:06 stacker 44.4k1387162 add a comment| 6 Answers 6 active oldest votes up vote 14 down vote accepted The IBM Data Server Driver for JDBC and SQLJ includes both Type 2 and Type 4 JDBC drivers. Please check the following: 1) Make sure the driver is in your classpath: db2jcc.jar. Alternatively you can use the JDBC4 driver (db2jcc4.jar), but don't put both in the classpath. 2) Make sure that you're specifying the JCC driver (com.ibm.db2.jcc.DB2Driver) in your app configuration. 3) Use a Type-4 URL like jdbc:db2://server:port/database. If you specify a Type-2 URL like jdbc:db2:database then the driver will start looking for native libraries. share|improve this answer an