Topic
  • 7 replies
  • Latest Post - ‏2007-07-26T08:38:36Z by SystemAdmin
SystemAdmin
SystemAdmin
262 Posts

Pinned topic isql produces a trace: Can't open lib '/opt/ibm/iSeriesAccess/lib/libcwbodbc.so'

‏2007-01-12T18:59:19Z |
Hi,

Due to my former problem (sse previous post), I installed the 32 bit version.

I wa able to add a DSN and connect with DataManager tool.

Surprisingly the isql cannot connect:
ISQLERROR: Could not SQLConnect
Tracing shows:
ODBC24468http://SQLConnect.c1012Can't open lib '/opt/ibm/iSeriesAccess/lib/libcwbodbc.so' : /opt/ibm/iSeriesAccess/lib/libcwbodbc.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou répertoire de ce type

Wheras the trace with DataManager shows:
ODBC25080http://SQLConnect.c3549
Entry:
Connection = 0x80d54a0
Server Name = sahlmlength = 5 (SQL_NTS)
User Name = mrlength = 2 (SQL_NTS)
Authentication = *******length = 7 (SQL_NTS)
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'

Strange is not it ?

Help please !!!

Regards
Updated on 2007-07-26T08:38:36Z at 2007-07-26T08:38:36Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    262 Posts

    Re: isql produces a trace: Can't open lib '/opt/ibm/iSeriesAccess/lib/libcwbodbc.so'

    ‏2007-01-16T15:06:04Z  
    This looks like a mis-match with 32 and 64-bit drivers and applications.
    In your odbcinst.ini file (found by running "odbcinst -j" ), you will see how the ODBC drivers are configured. Also check to see which version of isql your running ("file /usr/bin/isql") 32 or 64-bit. From your description, it looks like your using the 64-bit isql and the 32-bit ODBC driver.
  • SystemAdmin
    SystemAdmin
    262 Posts

    Re: isql produces a trace: Can't open lib '/opt/ibm/iSeriesAccess/lib/libcwbodbc.so'

    ‏2007-01-20T16:36:08Z  
    This looks like a mis-match with 32 and 64-bit drivers and applications.
    In your odbcinst.ini file (found by running "odbcinst -j" ), you will see how the ODBC drivers are configured. Also check to see which version of isql your running ("file /usr/bin/isql") 32 or 64-bit. From your description, it looks like your using the 64-bit isql and the 32-bit ODBC driver.
    Thanks for your feedback.

    file `which isql` says its the 64 bits version. the iSeriesAccess installed is the 32 bits. If you check my former post, when I install the 64 bit version, I cannot use ODBCConfig to configure a DSN connection.
  • SystemAdmin
    SystemAdmin
    262 Posts

    Re: isql produces a trace: Can't open lib '/opt/ibm/iSeriesAccess/lib/libcwbodbc.so'

    ‏2007-05-08T03:24:24Z  
    Thanks for your feedback.

    file `which isql` says its the 64 bits version. the iSeriesAccess installed is the 32 bits. If you check my former post, when I install the 64 bit version, I cannot use ODBCConfig to configure a DSN connection.
    I'm facing the same problem, I actually installed 64bit ODBC driver.
    Are there any compatibility issues with RHEL4?
  • SystemAdmin
    SystemAdmin
    262 Posts

    Re: isql produces a trace: Can't open lib '/opt/ibm/iSeriesAccess/lib/libcwbodbc.so'

    ‏2007-05-08T18:14:53Z  
    Thanks for your feedback.

    file `which isql` says its the 64 bits version. the iSeriesAccess installed is the 32 bits. If you check my former post, when I install the 64 bit version, I cannot use ODBCConfig to configure a DSN connection.

    Which ever product version you install LAST will become the new default driver for unixODBC. Checkout the /etc/odbcinst.ini and the /etc/odbc.ini
    (use cmd "odbcinst -j" to verify those locations).

    You can have both 32 and 64-bit installed, but you then have to be careful which of the apps (ODBCConfig, isql, DataManagerII) you are also using and match them up with the right set of drivers.

    By default we create 2 types of driver entries:
    iSeries Access ODBC Driver
    and
    iSeries Access ODBC Driver 64-bit

    So, you can create DSN entries (in odbc.ini) that target a specific driver (32 or 64 bit) or you can use the first/default/generic one and have it point to both the 32 and 64-bit drivers if you have a later version (2.2.11) of unixODBC installed.
  • SystemAdmin
    SystemAdmin
    262 Posts

    Re: isql produces a trace: Can't open lib '/opt/ibm/iSeriesAccess/lib/libcwbodbc.so'

    ‏2007-05-08T21:30:07Z  
    Thanks for your feedback.

    file `which isql` says its the 64 bits version. the iSeriesAccess installed is the 32 bits. If you check my former post, when I install the 64 bit version, I cannot use ODBCConfig to configure a DSN connection.
    Problem was resolved for me after copying the lib files from
    /opt/ibm/iSeriesAccess/lib to /usr/lib64

    I believe it is some thing to do with the Library path variable. I tried adding the path to LD_LIBRATY_PATH but nothing changed. Any ways now I'm able to query AS400 files through this driver.
  • SystemAdmin
    SystemAdmin
    262 Posts

    Re: isql produces a trace: Can't open lib '/opt/ibm/iSeriesAccess/lib/libcwbodbc.so'

    ‏2007-05-09T14:24:18Z  
    Problem was resolved for me after copying the lib files from
    /opt/ibm/iSeriesAccess/lib to /usr/lib64

    I believe it is some thing to do with the Library path variable. I tried adding the path to LD_LIBRATY_PATH but nothing changed. Any ways now I'm able to query AS400 files through this driver.

    I would not recommend this copying as a solution as it will cause uninstall/upgrade issues later. It's better to simply fix up the odbcinst.ini file to point to the correct versions of the driver, or just install the products in the correct order (LAST one will be default driver) AND install the correct/matching bit-ness versions of the unixODBC driver manager.
  • SystemAdmin
    SystemAdmin
    262 Posts

    Re: isql produces a trace: Can't open lib '/opt/ibm/iSeriesAccess/lib/libcwbodbc.so'

    ‏2007-07-26T08:38:36Z  

    Which ever product version you install LAST will become the new default driver for unixODBC. Checkout the /etc/odbcinst.ini and the /etc/odbc.ini
    (use cmd "odbcinst -j" to verify those locations).

    You can have both 32 and 64-bit installed, but you then have to be careful which of the apps (ODBCConfig, isql, DataManagerII) you are also using and match them up with the right set of drivers.

    By default we create 2 types of driver entries:
    iSeries Access ODBC Driver
    and
    iSeries Access ODBC Driver 64-bit

    So, you can create DSN entries (in odbc.ini) that target a specific driver (32 or 64 bit) or you can use the first/default/generic one and have it point to both the 32 and 64-bit drivers if you have a later version (2.2.11) of unixODBC installed.
    Again the same problem with Fedora 7. So this time I un-installed all the unixODBC versions and installed the i386 versions only.

    First iSeriesAccess brings the following missing deps:
    rpm -Uvh iSeriesAccess-5.4.0-1.4.i386.rpm
    erreur: Dépendances requises:
    libstdc++.so.5 est nécessaire pour iSeriesAccess-5.4.0-1.4.i386
    libstdc++.so.5(CXXABI_1.2) est nécessaire pour iSeriesAccess-5.4.0-1.4.i386
    libstdc++.so.5(GLIBCPP_3.2) est nécessaire pour iSeriesAccess-5.4.0-1.4.i386
    libstdc++.so.5(GLIBCPP_3.2.2) est nécessaire pour iSeriesAccess-5.4.0-1.4.i386
    libXm.so.3 est nécessaire pour iSeriesAccess-5.4.0-1.4.i386

    My current versions are:
    rpm -q --qf '%{NAME}.%{VERSION}.%{ARCH}\n' libstdc++ lesstif
    libstdc++.4.1.2.x86_64
    libstdc++.4.1.2.i386
    lesstif.0.95.0.i386
    lesstif.0.95.0.x86_64

    I forced the installation (--nodeps).

    ODBCConfig refuses to create a DSN (see other post).

    I then created manually odbc.ini using the http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzatv/rzatvkickoff.htm example.
    iSeriesDSN
    Description = iSeries Access ODBC Driver DSN for iSeries
    Driver = iSeries Access ODBC Driver
    System = xxxx
    UserID = xxxx
    Password = xxxx
    Naming = 0
    DefaultLibraries = QGPL
    Database =
    ConnectionType = 0
    CommitMode = 2
    ExtendedDynamic = 0
    DefaultPkgLibrary = QGPL
    DefaultPackage = A/DEFAULT(IBM),2,0,1,0,512
    AllowDataCompression = 1
    LibraryView = 0
    AllowUnsupportedChar = 0
    ForceTranslation = 0
    Trace = 0

    isql -v iSeriesDSN
    01000unixODBCDriver ManagerCan't open lib '/opt/ibm/iSeriesAccess/lib/libcwbodbc.so' : libstdc++.so.5: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou répertoire de ce type
    ISQLERROR: Could not SQLConnect

    file /opt/ibm/iSeriesAccess/lib/libcwbodbc.so
    /opt/ibm/iSeriesAccess/lib/libcwbodbc.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped

    file /usr/bin/isql
    /usr/bin/isql: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

    What is wrong this time ?

    Many thanks