David Adler wrote:
At 08:24 AM 4/10/2006, Luca Morandini wrote:
David Adler wrote:
Hi Luca, thanks for this information - it is very helpful.
It appears that it is not finding db2jcct2.dll which is in \sqllib\bin.
It you can get \sqllib\bin in your path, it may work.
I'm trying to connect from a Linux client (with GeoServer) to a Windows server (with DB2), hence I cannot implement your suggestion.
I'm not currently running GeoServer on Linux so don't have any good ideas. Did you install the DB2 client on Linux? This should ensure that the right libraries are in the right places. (You would need a DB2 for Linux install image. I don't think you would need to install Spatial Extender on Linux).
BTW, I wasn't able to find the client download on the IBM site, and the minimum installation for DB2 (on Windows at least) is 336 MB ! Is there anything lighter than that ?
Anyway, I tried with uDIG on Windows, and the same happened... even when I put db2jcct2.dll in the path ! (there was a chain of other DLLs still missing).
uDIG also works fine for me on Windows. Do you have the DB2 client installed on this system?
No, I thought it wasn't necessary.
This is a bit puzzling to me as I thought this was using the JDBC type 4 driver which I thought was "pure" Java. This will take some investigation.
Puzzling indeed, type4 was supposed to be an *universal* driver .
db2jcc.jar constitutes the DB2 "Universal JDBC Driver" which includes both type 2 and type 4 interfaces. The documentation states that db2jcct2.dll is needed for the type 2 driver. No mention about this for the type 4 driver interface. I'm trying to find out more internally from DB2 JDBC development.
Thanks.
I thought you were running on Windows. On Linux it should be:
java com.ibm.db2.jcc.DB2Jcc -configuration
which probably assumes that db2jcc is in your classpath.
Here you are:
java -cp db2jcc.jar com.ibm.db2.jcc.DB2Jcc -configuration
[ibm][db2][jcc] BEGIN TRACE_DRIVER_CONFIGURATION
[ibm][db2][jcc] Driver: IBM DB2 JDBC Universal Driver Architecture 2.8.46
[ibm][db2][jcc] Compatible JRE versions: { 1.3, 1.4, 1.5 }
[ibm][db2][jcc] Target server licensing restrictions: { z/OS: disabled; SQLDS: disabled; iSeries: disabled; DB2 for Unix/Windows: disabled; Cloudscape: disabled }
[ibm][db2][jcc] Range checking enabled: true
[ibm][db2][jcc] Bug check level: 0xff
[ibm][db2][jcc] Default fetch size: 64
[ibm][db2][jcc] Default isolation: 2
[ibm][db2][jcc] Collect performance statistics: false
[ibm][db2][jcc] No security manager detected.
[ibm][db2][jcc] Detected local client host: cranach/192.168.12.2
[ibm][db2][jcc] Access to package sun.io is permitted by security manager.
[ibm][db2][jcc] JDBC 1 system property jdbc.drivers = null
[ibm][db2][jcc] Java Runtime Environment version 1.4.2_07
[ibm][db2][jcc] Java Runtime Environment vendor = Sun Microsystems Inc.
[ibm][db2][jcc] Java vendor URL = http://java.sun.com/
[ibm][db2][jcc] Java installation directory = /j2sdk1.4.2_07/jre
[ibm][db2][jcc] Java Virtual Machine specification version = 1.0
[ibm][db2][jcc] Java Virtual Machine specification vendor = Sun Microsystems Inc.
[ibm][db2][jcc] Java Virtual Machine specification name = Java Virtual Machine Specification
[ibm][db2][jcc] Java Virtual Machine implementation version = 1.4.2_07-b05
[ibm][db2][jcc] Java Virtual Machine implementation vendor = Sun Microsystems Inc.
[ibm][db2][jcc] Java Virtual Machine implementation name = Java HotSpot(TM) Client VM
[ibm][db2][jcc] Java Runtime Environment specification version = 1.4
[ibm][db2][jcc] Java Runtime Environment specification vendor = Sun Microsystems Inc.
[ibm][db2][jcc] Java Runtime Environment specification name = Java Platform API Specification
[ibm][db2][jcc] Java class format version number = 48.0
[ibm][db2][jcc] Java class path = db2jcc.jar
[ibm][db2][jcc] Java native library path = /j2sdk1.4.2_07/jre/lib/i386/client:/j2sdk1.4.2_07/jre/lib/i386:/j2sdk1.4.2_07/jre/../lib/i386::/usr/local/apps/ArcIMS/lib:/usr/local/apps/ArcIMS/bin:/usr/local/apps/oracle/product/10.1.0/db_1/lib:/lib:/usr/libexport:/usr/local/apps/oracle/product/10.1.0/db_1/lib/gcc3
[ibm][db2][jcc] Path of extension directory or directories = /j2sdk1.4.2_07/jre/lib/ext
[ibm][db2][jcc] Operating system name = Linux
[ibm][db2][jcc] Operating system architecture = i386
[ibm][db2][jcc] Operating system version = 2.6.9-1.667
[ibm][db2][jcc] File separator ("/" on UNIX) = /
[ibm][db2][jcc] Path separator (":" on UNIX) = :
[ibm][db2][jcc] User's account name = root
[ibm][db2][jcc] User's home directory = /root
[ibm][db2][jcc] User's current working directory = /usr/local/apps/jettydev/webapps/geoserver/WEB-INF/lib
[ibm][db2][jcc] Dumping all system properties: { java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=/j2sdk1.4.2_07/jre/lib/i386, java.vm.version=1.4.2_07-b05, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=:, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/usr/local/apps/jettydev/webapps/geoserver/WEB-INF/lib, java.runtime.version=1.4.2_07-b05, java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment, java.endorsed.dirs=/j2sdk1.4.2_07/jre/lib/endorsed, os.arch=i386, java.io.tmpdir=/tmp, line.separator=\n, java.vm.specification.vendor=Sun Microsystems Inc., os.name=Linux, sun.java2d.fontpath=, java.library.path=/j2sdk1.4.2_07/jre/lib/i386/client:/j2sdk1.4.2_07/jre/lib/i386:/j2sdk1.4.2_07/jre/../lib/i386::/usr/local/apps/ArcIMS/lib:/usr/local/apps/ArcIMS/bin:/usr/local/apps/oracle/product/10.1.0/db_1/lib:/lib:/usr/libexport:/usr/local/apps/oracle/product/10.1.0/db_1/lib/gcc3, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferencesFactory, os.version=2.6.9-1.667, user.home=/root, user.timezone=, java.awt.printerjob=sun.print.PSPrinterJob, file.encoding=UTF-8, java.specification.version=1.4, java.class.path=db2jcc.jar, user.name=root, java.vm.specification.version=1.0, java.home=/j2sdk1.4.2_07/jre, sun.arch.data.model=32, user.language=en, java.specification.vendor=Sun Microsystems Inc., java.vm.info=mixed mode, java.version=1.4.2_07, java.ext.dirs=/j2sdk1.4.2_07/jre/lib/ext, sun.boot.class.path=/j2sdk1.4.2_07/jre/lib/rt.jar:/j2sdk1.4.2_07/jre/lib/i18n.jar:/j2sdk1.4.2_07/jre/lib/sunrsasign.jar:/j2sdk1.4.2_07/jre/lib/jsse.jar:/j2sdk1.4.2_07/jre/lib/jce.jar:/j2sdk1.4.2_07/jre/lib/charsets.jar:/j2sdk1.4.2_07/jre/classes, java.vendor=Sun Microsystems Inc., file.separator=/, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.cpu.isalist= }
[ibm][db2][jcc] END TRACE_DRIVER_CONFIGURATION
--------------------
Luca Morandini
www.lucamorandini.it
--------------------