Weird issue.

When it comes to ODBC, MSDN has answers to many questions.
Also, you may take a look at the following links:

http://www.easysoft.com/developer/languages/c/odbc_tutorial.html
http://www.easysoft.com/developer/languages/c/odbc-tutorial-fetching-results.html
http://www.easysoft.com/developer/languages/c/examples/index.html

Best Regards,
Igor

On Thu, Jun 15, 2017 at 4:28 PM, Riccardo Iacomini <
riccardo.iacom...@rdslab.com> wrote:

> The env command confirmed that the variable was correctly set. I tried to
> go over the installation process again, and now I managed to get it
> working. I do not actually know the exact reason, but let's say I am happy
> with it.
>
> I've now configured a Cassandra backed cache, and wanted to query it using
> the odbc driver. Any useful resource about the subject is really
> appreciated.
>
> Thank you for your help so far.
>
> Best regards
>
> Riccardo Iacomini
>
>
> *RDSLab*
>
> On Thu, Jun 15, 2017 at 11:45 AM, Igor Sapego <isap...@gridgain.com>
> wrote:
>
>> Have you restarted your terminal after that? What does env command show?
>> Is it set?
>>
>> Best Regards,
>> Igor
>>
>> On Wed, Jun 14, 2017 at 6:18 PM, Riccardo Iacomini <
>> riccardo.iacom...@rdslab.com> wrote:
>>
>>> Yes, I've set the env variable, globally in /etc/environment. Just for
>>> completeness, I am running Ubuntu 16.04.
>>>
>>> Best
>>>
>>> Riccardo Iacomini
>>>
>>>
>>> *RDSLab*
>>>
>>> On Wed, Jun 14, 2017 at 1:02 PM, Igor Sapego <isap...@gridgain.com>
>>> wrote:
>>>
>>>> Do you set LD_LIBRARY_PATH to /usr/local/lib? If 'yes' then
>>>> can you describe in details how you do that? This may help
>>>> to identify an issue.
>>>>
>>>> Best Regards,
>>>> Igor
>>>>
>>>> On Wed, Jun 14, 2017 at 12:30 PM, Riccardo Iacomini <
>>>> riccardo.iacom...@rdslab.com> wrote:
>>>>
>>>>> Hello Igor,
>>>>> I double checked the documentation and went over the steps again to be
>>>>> sure everything is ok. I tried running your command, that's the output:
>>>>>
>>>>>                  linux-vdso.so.1 =>  (0x00007fff75dd6000)
>>>>>> libignite-binary-2.0.0.19668.so.0 => 
>>>>>> /usr/local/lib/libignite-binary-2.0.0.19668.so.0
>>>>>> (0x00007f40e5349000)
>>>>>> libodbcinst.so.2 => /usr/local/lib/libodbcinst.so.2
>>>>>> (0x00007f40e5134000)
>>>>>> libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
>>>>>> (0x00007f40e4d8a000)
>>>>>> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f40e49c1000)
>>>>>> libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
>>>>>> (0x00007f40e47ab000)
>>>>>> libignite-common-2.0.0.19668.so.0 => 
>>>>>> /usr/local/lib/libignite-common-2.0.0.19668.so.0
>>>>>> (0x00007f40e4594000)
>>>>>> libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7
>>>>>> (0x00007f40e438a000)
>>>>>> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
>>>>>> (0x00007f40e416d000)
>>>>>> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f40e3e63000)
>>>>>> /lib64/ld-linux-x86-64.so.2 (0x0000555643691000)
>>>>>> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f40e3c5f000)
>>>>>
>>>>>
>>>>>
>>>>> however, I still get the same error from python:
>>>>>
>>>>> *pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open
>>>>>> lib 'Apache Ignite' : file not found (0) (SQLDriverConnect)")*
>>>>>
>>>>>
>>>>>
>>>>> Best
>>>>>
>>>>> Riccardo Iacomini
>>>>>
>>>>>
>>>>> *RDSLab*
>>>>>
>>>>> On Wed, Jun 14, 2017 at 11:10 AM, Igor Sapego <isap...@gridgain.com>
>>>>> wrote:
>>>>>
>>>>>> So, setting LD_LIBRARY_PATH to /usr/local/lib should definetly help.
>>>>>> Are you sure your did everything right? Try the following command (in
>>>>>> one line):
>>>>>> LD_LIBRARY_PATH=/usr/local/lib ldd /usr/local/lib/libignite-odbc.so
>>>>>>
>>>>>> Best Regards,
>>>>>> Igor
>>>>>>
>>>>>> On Wed, Jun 14, 2017 at 10:15 AM, Riccardo Iacomini <
>>>>>> riccardo.iacom...@rdslab.com> wrote:
>>>>>>
>>>>>>> As asked:
>>>>>>>
>>>>>>>>
>>>>>>>> linux-vdso.so.1 =>  (0x00007ffca6776000)
>>>>>>>> libignite-binary-2.0.0.19668.so.0 => not found
>>>>>>>> libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2
>>>>>>>> (0x00007fb92ead4000)
>>>>>>>> libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
>>>>>>>> (0x00007fb92e751000)
>>>>>>>> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb92e388000)
>>>>>>>> libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
>>>>>>>> (0x00007fb92e172000)
>>>>>>>> libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7
>>>>>>>> (0x00007fb92df67000)
>>>>>>>> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
>>>>>>>> (0x00007fb92dd4a000)
>>>>>>>> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb92da41000)
>>>>>>>> /lib64/ld-linux-x86-64.so.2 (0x0000560f6c5b0000)
>>>>>>>> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb92d83c000)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> seems like libignite-binary is not found, but if you look at the
>>>>>>> directory listing I previously posted, it should be there.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Riccardo Iacomini
>>>>>>>
>>>>>>>
>>>>>>> *RDSLab*
>>>>>>>
>>>>>>> On Tue, Jun 13, 2017 at 6:20 PM, Igor Sapego <isap...@gridgain.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Well, try running the following command:
>>>>>>>> ldd /usr/local/lib/libignite-odbc.so
>>>>>>>>
>>>>>>>> This may help us see which library can't be found.
>>>>>>>>
>>>>>>>> Best Regards,
>>>>>>>> Igor
>>>>>>>>
>>>>>>>> On Tue, Jun 13, 2017 at 6:10 PM, Riccardo Iacomini <
>>>>>>>> riccardo.iacom...@rdslab.com> wrote:
>>>>>>>>
>>>>>>>>> Thank you for the reply Igor,
>>>>>>>>>
>>>>>>>>> the error just changed into:
>>>>>>>>>
>>>>>>>>> *pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't
>>>>>>>>>> open lib 'Apache Ignite' : file not found (0) (SQLDriverConnect)")*
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> The Ignite Driver seems to be installed. Here's my
>>>>>>>>> /etc/odbcinst.ini :
>>>>>>>>>
>>>>>>>>> [Apache Ignite]
>>>>>>>>>> Description=Apache Ignite
>>>>>>>>>> Driver=/usr/local/lib/libignite-odbc.so
>>>>>>>>>> Setup=/usr/local/lib/libignite-odbc.so
>>>>>>>>>> DriverODBCVer=03.00
>>>>>>>>>> FileUsage=0
>>>>>>>>>> UsageCount=3
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Riccardo Iacomini
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *RDSLab*
>>>>>>>>>
>>>>>>>>> On Tue, Jun 13, 2017 at 4:31 PM, Igor Sapego <isap...@gridgain.com
>>>>>>>>> > wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> Try adding /usr/local/lib/ to LD_LIBRARY_PATH evn variable.
>>>>>>>>>>
>>>>>>>>>> Best Regards,
>>>>>>>>>> Igor
>>>>>>>>>>
>>>>>>>>>> On Tue, Jun 13, 2017 at 4:54 PM, Riccardo Iacomini <
>>>>>>>>>> riccardo.iacom...@rdslab.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hello,
>>>>>>>>>>> I am trying to access Ignite 2.0 using the ODBC driver. I've
>>>>>>>>>>> followed the guide
>>>>>>>>>>> <https://apacheignite.readme.io/docs/odbc-driver>, and tried to
>>>>>>>>>>> access Ignite via Python using the pyodbc module:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> *import pyodbc**ignite = pyodbc.connect('DRIVER={Apache
>>>>>>>>>>>> Ignite};ADDRESS=localhost:10800;CACHE=cache1')*
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> however I get:
>>>>>>>>>>>
>>>>>>>>>>> *pyodbc.Error: ('01000', "[01000] [unixODBC][Driver
>>>>>>>>>>>> Manager]Can't open lib '/usr/local/lib/libignite-odbc.so' : file 
>>>>>>>>>>>> not found
>>>>>>>>>>>> (0) (SQLDriverConnect)")*
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> The library is instead located the path; this is the directory
>>>>>>>>>>> listing of */usr/local/lib:*
>>>>>>>>>>>
>>>>>>>>>>> drwxr-xr-x  5 root     root         4096 giu 13 15:26 ./
>>>>>>>>>>>> drwxr-xr-x 12 root     root         4096 nov 22  2016 ../
>>>>>>>>>>>> lrwxrwxrwx  1 root     root           37 giu 13 15:24
>>>>>>>>>>>> libignite-binary-2.0.0.19668.so.0 ->
>>>>>>>>>>>> libignite-binary-2.0.0.19668.so.0.0.0*
>>>>>>>>>>>> -rwxr-xr-x  1 root     root      1777000 giu 13 15:24
>>>>>>>>>>>> libignite-binary-2.0.0.19668.so.0.0.0*
>>>>>>>>>>>> -rw-r--r--  1 root     root      4617182 giu 13 15:24
>>>>>>>>>>>> libignite-binary.a
>>>>>>>>>>>> -rwxr-xr-x  1 root     root         1089 giu 13 15:24
>>>>>>>>>>>> libignite-binary.la*
>>>>>>>>>>>> lrwxrwxrwx  1 root     root           37 giu 13 15:24
>>>>>>>>>>>> libignite-binary.so -> libignite-binary-2.0.0.19668.so.0.0.0*
>>>>>>>>>>>> lrwxrwxrwx  1 root     root           37 giu 13 15:24
>>>>>>>>>>>> libignite-common-2.0.0.19668.so.0 ->
>>>>>>>>>>>> libignite-common-2.0.0.19668.so.0.0.0*
>>>>>>>>>>>> -rwxr-xr-x  1 root     root       648856 giu 13 15:24
>>>>>>>>>>>> libignite-common-2.0.0.19668.so.0.0.0*
>>>>>>>>>>>> -rw-r--r--  1 root     root      1493756 giu 13 15:24
>>>>>>>>>>>> libignite-common.a
>>>>>>>>>>>> -rwxr-xr-x  1 root     root         1054 giu 13 15:24
>>>>>>>>>>>> libignite-common.la*
>>>>>>>>>>>> lrwxrwxrwx  1 root     root           37 giu 13 15:24
>>>>>>>>>>>> libignite-common.so -> libignite-common-2.0.0.19668.so.0.0.0*
>>>>>>>>>>>> lrwxrwxrwx  1 root     root           35 giu 13 15:24
>>>>>>>>>>>> libignite-odbc-2.0.0.19668.so.0 ->
>>>>>>>>>>>> libignite-odbc-2.0.0.19668.so.0.0.0*
>>>>>>>>>>>> -rwxr-xr-x  1 root     root      6581160 giu 13 15:24
>>>>>>>>>>>> libignite-odbc-2.0.0.19668.so.0.0.0*
>>>>>>>>>>>> -rw-r--r--  1 root     root     18307190 giu 13 15:24
>>>>>>>>>>>> libignite-odbc.a
>>>>>>>>>>>> -rwxr-xr-x  1 root     root         1121 giu 13 15:24
>>>>>>>>>>>> libignite-odbc.la*
>>>>>>>>>>>> lrwxrwxrwx  1 root     root           35 giu 13 15:24
>>>>>>>>>>>> libignite-odbc.so -> libignite-odbc-2.0.0.19668.so.0.0.0*
>>>>>>>>>>>> -rw-rw-r--  1 riccardo riccardo 46518354 feb 20 12:53 libntl.a
>>>>>>>>>>>> -rwxr-xr-x  1 root     root          966 giu 13 15:26
>>>>>>>>>>>> libodbccr.la*
>>>>>>>>>>>> lrwxrwxrwx  1 root     root           18 giu 13 15:26
>>>>>>>>>>>> libodbccr.so -> libodbccr.so.2.0.0*
>>>>>>>>>>>> lrwxrwxrwx  1 root     root           18 giu 13 15:26
>>>>>>>>>>>> libodbccr.so.2 -> libodbccr.so.2.0.0*
>>>>>>>>>>>> -rwxr-xr-x  1 root     root       507264 giu 13 15:26
>>>>>>>>>>>> libodbccr.so.2.0.0*
>>>>>>>>>>>> -rwxr-xr-x  1 root     root         1015 giu 13 15:26
>>>>>>>>>>>> libodbcinst.la*
>>>>>>>>>>>> lrwxrwxrwx  1 root     root           20 giu 13 15:26
>>>>>>>>>>>> libodbcinst.so -> libodbcinst.so.2.0.0*
>>>>>>>>>>>> lrwxrwxrwx  1 root     root           20 giu 13 15:26
>>>>>>>>>>>> libodbcinst.so.2 -> libodbcinst.so.2.0.0*
>>>>>>>>>>>> -rwxr-xr-x  1 root     root       463392 giu 13 15:26
>>>>>>>>>>>> libodbcinst.so.2.0.0*
>>>>>>>>>>>> -rwxr-xr-x  1 root     root          991 giu 13 15:26
>>>>>>>>>>>> libodbc.la*
>>>>>>>>>>>> lrwxrwxrwx  1 root     root           16 giu 13 15:26
>>>>>>>>>>>> libodbc.so -> libodbc.so.2.0.0*
>>>>>>>>>>>> lrwxrwxrwx  1 root     root           16 giu 13 15:26
>>>>>>>>>>>> libodbc.so.2 -> libodbc.so.2.0.0*
>>>>>>>>>>>> -rwxr-xr-x  1 root     root      2274544 giu 13 15:26
>>>>>>>>>>>> libodbc.so.2.0.0*
>>>>>>>>>>>> drwxrwsr-x  4 root     staff        4096 nov 29  2016 python2.7/
>>>>>>>>>>>> drwxrwsr-x  3 root     staff        4096 ott 21  2015 python3.5/
>>>>>>>>>>>> drwxr-xr-x  3 root     root         4096 giu 12 23:38 site_ruby/
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Any suggestion on how to procede?
>>>>>>>>>>>
>>>>>>>>>>> Thank you
>>>>>>>>>>>
>>>>>>>>>>> Riccardo Iacomini
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> *RDSLab*
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Reply via email to