Something you can check out are:
  - Did you compiled and deployed your code in different environment (Linux/C 
compier version)? If so there might incompatibility issues in the kernel/C .so 
files
  - Can you check 'ldd isql' and see which .so files it loads? Particularly 
libodbc.so should be the one coming with unixODBC. If you installed other ODBC 
driver manager and their LD paths are before unixODBC's, isql may got linked to 
the correct .so file. In addition, you can 'ldd' libodbchive.so etc. to see if 
there are missing dependent .so files as well.

On Sep 7, 2010, at 12:44 PM, Ariel Leiva wrote:

> All three .so files can be found in LD_LIBRARY_PATH and i am still getting 
> the same error. Thanks for your suggestion.
> 
> On Tue, Sep 7, 2010 at 1:41 AM, Ning Zhang <nzh...@facebook.com> wrote:
> It looks like isql cannot load libodbchive.so. Please make sure that all 
> three .so files libodbchive.so, libhiveclient.so, and libthrift.so can be 
> found in LD_LIBRARY_PATH. 
> 
> 
> On Sep 4, 2010, at 1:31 PM, Ariel Leiva wrote:
> 
>> Hi, i built Hive odbc driver following 
>> http://wiki.apache.org/hadoop/Hive/HiveODBC and wanted to test it with isql, 
>> but i get the following error:
>> 
>> [ISQL]ERROR: Could not SQLAllocEnv
>> 
>> I set LD_LIBRARY_PATH so libhiveclient.so can be found correctly. 
>> I also tried,
>> dltest libodbchive.so SQLAllocEnv which succeeds with 
>> dltest libodbchive.so SQLAllocEnv
>> SUCCESS: Loaded libodbchive.so
>> SUCCESS: Found SQLAllocEnv
>> 
>> Location of odbc.ini in my system is /usr/local/unixODBC/etc/odbc.ini and 
>> its content is  
>> [Hive]
>> Driver = /usr/local/unixODBC/lib/libodbchive.so
>> Description = Hive Driver v1
>> DATABASE = default
>> HOST = localhost
>> PORT = 10000
>> FRAMED = 0
>> 
>> Ouput of odbcinst -j is
>> unixODBC 2.2.14
>> DRIVERS............: /usr/local/unixODBC/etc/odbcinst.ini
>> SYSTEM DATA SOURCES: /usr/local/unixODBC/etc/odbc.ini
>> FILE DATA SOURCES..: /usr/local/unixODBC/etc/ODBCDataSources
>> USER DATA SOURCES..: /root/.odbc.ini
>> SQLULEN Size.......: 4
>> SQLLEN Size........: 4
>> SQLSETPOSIROW Size.: 2
>> 
>> And output of odbcinst -q -s -n Hive is:
>> [Hive]
>> Driver=/usr/local/unixODBC/lib/libodbchive.so
>> Description=Hive Driver v1
>> DATABASE=default
>> HOST=localhost
>> PORT=10000
>> FRAMED=0
>> 
>> Can anybody help me with this error?
>> Thanks in advance
>> Ariel
> 
> 

Reply via email to