You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Nicolas Paris <ni...@gmail.com> on 2016/08/30 17:07:50 UTC

odbc connection with unixODBC

Hello,

I am testing ODBC connexion thought Drill Explorer.
It works ok with iodbc installed.

However I cannot make it working with unixODBC.
I get this error :
 Unable to load library 'iodbc': Native library (linux-x86-64/libiodbc.so)

I have specified in the mapr.drillodbc.ini  to use unixODBC
ODBCInstLib=libodbcinst.so.1

Does it mean iodbc is the only working client ?
Or does it mean Drill Explorer only works with iodbc ?

Thanks by advance

Re: odbc connection with unixODBC

Posted by Nicolas Paris <ni...@gmail.com>.
Thanks Lee for this confirmation. This could be added in the documentation,
as it suggests DrillExplorer can work with it.

I traced isql and it appears I wasn't pointing the environment variable
MAPRDRILLINI to the good place.
Does it mean MAPRDRILLINI is usefull for the driver ?
Because I guess ODBC is not aware of such variable.

So I am now able to query drill from isql (and libreofficeBase too), and my
unixODBC configuration is ok.

My initial goal was to query drill from postgresql thanks to the odbc_fdw (
https://github.com/CartoDB/odbc_fdw) . I mean creating a virtual table in
postgresql that actually uses drill under the hood.
For now, I have it working with other odbc sources (by eg an other
postgresql database). I am not able to connect to drill.
discussion here https://github.com/CartoDB/odbc_fdw/issues/35

Have you any thought about that ?

Thanks


Le jeu. 1 sept. 2016 à 18:22, Norris Lee <no...@simba.com> a écrit :

> Correct, DrillExplorer requires iodbc and does not work with unixODBC.
>
> Norris
>
> -----Original Message-----
> From: Sékine Coulibaly [mailto:scoulibaly@gmail.com]
> Sent: Wednesday, August 31, 2016 12:58 PM
> To: dev@drill.apache.org
> Subject: Re: odbc connection with unixODBC
>
> Should be confirmed but yes, dDrillExplorer most likely makes use of iodbc
> only and not unixODBC.
>
> Regarding the unixODBC stuff, my guess is that libodbcinst.so is not in
> your LD_LIBRARY_PATH. But you most likely have libodbcinst.so.1.
> So, please give it a try changing your .mapr.drillodbc.ini :
>
> #   SimbaDM / unixODBC
> ODBCInstLib=libodbcinst.so.1
>
> You should then be able to use isql :
>
> isql "Sample MapR Drill DSN 64"
>
> Result being :
>
> | Connected!                            |
> |                                       |
> | sql-statement                         |
> | help [tablename]                      |
> | quit                                  |
> |                                       |
> +---------------------------------------+
> SQL>
>
> +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
> | SCHEMA_NAME
>
>
>                                                                           |
>
> +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
> | INFORMATION_SCHEMA
>
>
>
>  |
> | cp.default
>
>
>
>  |
> | dfs.default
>
>
>                                                                           |
> | dfs.root
>
>
>
>  |
> | dfs.tmp
>
>
>                                                                           |
> | sys
>
>
>                                                                           |
>
> +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
> SQLRowCount returns -1
> 6 rows fetched
>
> To investigate dynamic linking, you can use the following :
> strace isql "Sample MapR Drill DSN 64"
>
> This show where the libraries are actually searched at execution time.
>
>
>
> 2016-08-31 12:50 GMT+02:00 Nicolas Paris <ni...@gmail.com>:
>
> > Krystal, Sékine, thanks for your help. Pease find more informations :
> >
> > *$dpkg -s unixodbc*
> > Package: unixodbc
> > Status: install ok installed
> > Priority: optional
> > Section: database
> > Installed-Size: 111
> > Maintainer: Ubuntu Developers <ub...@lists.ubuntu.com>
> > Architecture: amd64
> > Multi-Arch: foreign
> > Version: 2.2.14p2-5ubuntu5
> > Depends: libc6 (>= 2.14), libreadline6 (>= 6.0), odbcinst1debian2 (>=
> > 2.2.11-3), libodbc1 (>= 2.2.14p2-3)
> > Conflicts: unixodbc-bin (<< 2.2.4-1)
> >
> > *$locate libodbcinst*
> > /usr/lib/x86_64-linux-gnu/libodbcinst.a
> > /usr/lib/x86_64-linux-gnu/libodbcinst.so
> > /usr/lib/x86_64-linux-gnu/libodbcinst.so.1
> > /usr/lib/x86_64-linux-gnu/libodbcinst.so.1.0.0
> >
> > *$echo $LD_LIBRARY_PATH *
> > /usr/local/lib:/usr/lib/:/opt/mapr/drillodbc/lib/64/:/usr/
> > lib/x86_64-linux-gnu/
> >
> > *$head -100 /etc/mapr.drillodbc.ini*
> > [Driver]
> > DisableAsync=0
> > DriverManagerEncoding=UTF-16
> > ErrorMessagesPath=/opt/mapr/drillodbc/ErrorMessages
> > LogLevel=2
> > LogPath=/tmp/drilllog/
> > SwapFilePath=/tmp
> > #   SimbaDM / unixODBC
> > ODBCInstLib=libodbcinst.so
> >
> > *$sudo ldconfig -v | grep "odbc"*
> > /sbin/ldconfig.real: Ne peut évaluer par stat /lib/i686-linux-gnu:
> > Aucun fichier ou dossier de ce type
> > /sbin/ldconfig.real: Ne peut évaluer par stat /usr/lib/i686-linux-gnu:
> > Aucun fichier ou dossier de ce type
> > /sbin/ldconfig.real: Chemin « /lib/x86_64-linux-gnu » donné plus d'une
> > fois
> > /sbin/ldconfig.real: Chemin « /usr/lib/x86_64-linux-gnu » donné plus
> > d'une fois
> > /sbin/ldconfig.real: /lib/i386-linux-gnu/ld-2.19.so is the dynamic
> > linker, ignoring
> >
> > /sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.19.so is the dynamic
> > linker, ignoring
> >
> >     libodbccr.so.1 -> libodbccr.so.1.0.0
> >     libodbc.so.1 -> libodbc.so.1.0.0
> >     libodbcinst.so.1 -> libodbcinst.so.1.0.0
> >
> > *$/opt/mapr/drillodbc/DrillExplorer/DrillExplorer*
> > Java Classpath:
> > /opt/mapr/drillodbc/DrillExplorer/app/DrillExplorer.jar:libs/hadoop-
> > common-0.23.9.jar:libs/jna.jar:libs/json-20141113.jar:
> > resources/Version.txt:resources/images/cftable.ico:
> > resources/images/cftable2.png:resources/images/csv.png:
> > resources/images/database.ico:resources/images/database.png:
> > resources/images/file.ico:resources/images/folder.ico:
> > resources/images/json.png:resources/images/parquet.png:
> > resources/images/table.ico:resources/images/tsv.png:
> > resources/images/view.ico
> > Exception in thread "JavaFX Application Thread"
> java.lang.RuntimeException:
> > java.lang.reflect.InvocationTargetException
> >     at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1762)
> >     at
> > javafx.fxml.FXMLLoader$ControllerMethodEventHandler.
> > handle(FXMLLoader.java:1645)
> >     at
> > com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(
> > CompositeEventHandler.java:86)
> >     at
> > com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(
> > EventHandlerManager.java:238)
> >     at
> > com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(
> > EventHandlerManager.java:191)
> >     at
> > com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(
> > CompositeEventDispatcher.java:59)
> >     at
> > com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> > BasicEventDispatcher.java:58)
> >     at
> > com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> > EventDispatchChainImpl.java:114)
> >     at
> > com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> > BasicEventDispatcher.java:56)
> >     at
> > com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> > EventDispatchChainImpl.java:114)
> >     at
> > com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> > BasicEventDispatcher.java:56)
> >     at
> > com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> > EventDispatchChainImpl.java:114)
> >     at
> > com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> > BasicEventDispatcher.java:56)
> >     at
> > com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> > EventDispatchChainImpl.java:114)
> >     at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
> >     at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
> >     at javafx.event.Event.fireEvent(Event.java:198)
> >     at javafx.scene.Node.fireEvent(Node.java:8216)
> >     at javafx.scene.control.Button.fire(Button.java:185)
> >     at
> > com.sun.javafx.scene.control.behavior.ButtonBehavior.
> > mouseReleased(ButtonBehavior.java:182)
> >     at
> > com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.
> > handle(BehaviorSkinBase.java:96)
> >     at
> > com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.
> > handle(BehaviorSkinBase.java:89)
> >     at
> > com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.
> > handleBubblingEvent(CompositeEventHandler.java:218)
> >     at
> > com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(
> > CompositeEventHandler.java:80)
> >     at
> > com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(
> > EventHandlerManager.java:238)
> >     at
> > com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(
> > EventHandlerManager.java:191)
> >     at
> > com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(
> > CompositeEventDispatcher.java:59)
> >     at
> > com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> > BasicEventDispatcher.java:58)
> >     at
> > com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> > EventDispatchChainImpl.java:114)
> >     at
> > com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> > BasicEventDispatcher.java:56)
> >     at
> > com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> > EventDispatchChainImpl.java:114)
> >     at
> > com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> > BasicEventDispatcher.java:56)
> >     at
> > com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> > EventDispatchChainImpl.java:114)
> >     at
> > com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> > BasicEventDispatcher.java:56)
> >     at
> > com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> > EventDispatchChainImpl.java:114)
> >     at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
> >     at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
> >     at javafx.event.Event.fireEvent(Event.java:198)
> >     at javafx.scene.Scene$MouseHandler.process(Scene.java:3724)
> >     at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3452)
> >     at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1728)
> >     at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2461)
> >     at
> > com.sun.javafx.tk.quantum.GlassViewEventHandler$
> > MouseEventNotification.run(GlassViewEventHandler.java:348)
> >     at
> > com.sun.javafx.tk.quantum.GlassViewEventHandler$
> > MouseEventNotification.run(GlassViewEventHandler.java:273)
> >     at java.security.AccessController.doPrivileged(Native Method)
> >     at
> > com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(
> > GlassViewEventHandler.java:382)
> >     at com.sun.glass.ui.View.handleMouseEvent(View.java:553)
> >     at com.sun.glass.ui.View.notifyMouse(View.java:925)
> >     at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
> >     at
> > com.sun.glass.ui.gtk.GtkApplication.lambda$null$45(
> > GtkApplication.java:126)
> >     at com.sun.glass.ui.gtk.GtkApplication$$Lambda$43/
> > 202720134.run(Unknown
> > Source)
> >     at java.lang.Thread.run(Thread.java:745)
> > Caused by: java.lang.reflect.InvocationTargetException
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 62)
> >     at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:43)
> >     at java.lang.reflect.Method.invoke(Method.java:483)
> >     at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
> >     at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
> >     at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:43)
> >     at java.lang.reflect.Method.invoke(Method.java:483)
> >     at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
> > at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1759)
> >     ... 51 more
> > *Caused by: java.lang.UnsatisfiedLinkError: Unable to load library
> > 'iodbc':
> > Native library (linux-x86-64/libiodbc.so)* not found in resource path
> > ([file:/opt/mapr/drillodbc/DrillExplorer/app/DrillExplorer.jar,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/libs/hadoop-common-0.23.9.j
> > ar, file:/opt/mapr/drillodbc/DrillExplorer/app/libs/jna.jar,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/libs/json-20141113.jar,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/Version.txt,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/cftable.ic
> > o,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/cftable2.p
> > ng,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/csv.png,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/database.i
> > co,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/database.p
> > ng,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/file.ico,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/folder.ico
> > ,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/json.png,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/parquet.pn
> > g,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/table.ico,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/tsv.png,
> > file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/view.ico])
> >     at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
> >     at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
> >     at com.sun.jna.Library$Handler.<init>(Library.java:147)
> >     at com.sun.jna.Native.loadLibrary(Native.java:414)
> >     at com.sun.jna.Native.loadLibrary(Native.java:393)
> >     at com.simba.odbc.ODBCConnection$DrillODBC.<clinit>(Unknown Source)
> >     at com.simba.odbc.ODBCUtils.getDataSources(Unknown Source)
> >     at com.simba.drill.DRConnection.getDataSources(Unknown Source)
> >     at
> > com.simba.schemaexplorer.ConnectionPaneController.populateDSNList(Unkn
> > own
> > Source)
> >     at
> > com.simba.schemaexplorer.SchemaExplorerController.connect(Unknown
> > Source)
> >
> >
> >
> > Le mar. 30 août 2016 à 22:58, Sékine Coulibaly <sc...@gmail.com>
> > a écrit :
> >
> > > Nicolas,
> > >
> > > Additionally to what Krystal pointed at, on Linux platforms you can
> > > try this :
> > > sudo ldconfig -v | grep "odbc"
> > >
> > > This will yield a non-empty result if dynamic linker can find the
> > > dynamic library related to odbc. If nothing is returned, issuing the
> > > following command will help refresh ldconfig's cache :
> > > sudo ldconfig
> > >
> > > Sekine
> > >
> > > 2016-08-30 19:18 GMT+02:00 Krystal Nguyen <kn...@maprtech.com>:
> > >
> > > > Hi Nicolas,
> > > >
> > > > ODBC should work with unixODBC driver manager.  Does the
> > > "libodbcinst.so.1"
> > > > library file exists on your node and it's path specified in the
> > > > "LD_LIBRARY_PATH" variable.  I am using unixODBC-2.2.14 it is
> > > > working
> > > fine
> > > > for me.  I use the following setting in mapr.drillodbc.ini:
> > > >
> > > > #   SimbaDM / unixODBC
> > > > ODBCInstLib=libodbcinst.so
> > > >
> > > > Thanks,
> > > > Krystal
> > > >
> > > > On Tue, Aug 30, 2016 at 10:07 AM, Nicolas Paris
> > > > <ni...@gmail.com>
> > > > wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > I am testing ODBC connexion thought Drill Explorer.
> > > > > It works ok with iodbc installed.
> > > > >
> > > > > However I cannot make it working with unixODBC.
> > > > > I get this error :
> > > > >  Unable to load library 'iodbc': Native library
> > > > (linux-x86-64/libiodbc.so)
> > > > >
> > > > > I have specified in the mapr.drillodbc.ini  to use unixODBC
> > > > > ODBCInstLib=libodbcinst.so.1
> > > > >
> > > > > Does it mean iodbc is the only working client ?
> > > > > Or does it mean Drill Explorer only works with iodbc ?
> > > > >
> > > > > Thanks by advance
> > > > >
> > > >
> > >
> >
>

RE: odbc connection with unixODBC

Posted by Norris Lee <no...@simba.com>.
Correct, DrillExplorer requires iodbc and does not work with unixODBC.

Norris

-----Original Message-----
From: Sékine Coulibaly [mailto:scoulibaly@gmail.com] 
Sent: Wednesday, August 31, 2016 12:58 PM
To: dev@drill.apache.org
Subject: Re: odbc connection with unixODBC

Should be confirmed but yes, dDrillExplorer most likely makes use of iodbc only and not unixODBC.

Regarding the unixODBC stuff, my guess is that libodbcinst.so is not in your LD_LIBRARY_PATH. But you most likely have libodbcinst.so.1.
So, please give it a try changing your .mapr.drillodbc.ini :

#   SimbaDM / unixODBC
ODBCInstLib=libodbcinst.so.1

You should then be able to use isql :

isql "Sample MapR Drill DSN 64"

Result being :

| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| SCHEMA_NAME


                                                                          |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| INFORMATION_SCHEMA


                                                                           |
| cp.default


                                                                           |
| dfs.default


                                                                          |
| dfs.root


                                                                           |
| dfs.tmp


                                                                          |
| sys


                                                                          |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
SQLRowCount returns -1
6 rows fetched

To investigate dynamic linking, you can use the following :
strace isql "Sample MapR Drill DSN 64"

This show where the libraries are actually searched at execution time.



2016-08-31 12:50 GMT+02:00 Nicolas Paris <ni...@gmail.com>:

> Krystal, Sékine, thanks for your help. Pease find more informations :
>
> *$dpkg -s unixodbc*
> Package: unixodbc
> Status: install ok installed
> Priority: optional
> Section: database
> Installed-Size: 111
> Maintainer: Ubuntu Developers <ub...@lists.ubuntu.com>
> Architecture: amd64
> Multi-Arch: foreign
> Version: 2.2.14p2-5ubuntu5
> Depends: libc6 (>= 2.14), libreadline6 (>= 6.0), odbcinst1debian2 (>= 
> 2.2.11-3), libodbc1 (>= 2.2.14p2-3)
> Conflicts: unixodbc-bin (<< 2.2.4-1)
>
> *$locate libodbcinst*
> /usr/lib/x86_64-linux-gnu/libodbcinst.a
> /usr/lib/x86_64-linux-gnu/libodbcinst.so
> /usr/lib/x86_64-linux-gnu/libodbcinst.so.1
> /usr/lib/x86_64-linux-gnu/libodbcinst.so.1.0.0
>
> *$echo $LD_LIBRARY_PATH *
> /usr/local/lib:/usr/lib/:/opt/mapr/drillodbc/lib/64/:/usr/
> lib/x86_64-linux-gnu/
>
> *$head -100 /etc/mapr.drillodbc.ini*
> [Driver]
> DisableAsync=0
> DriverManagerEncoding=UTF-16
> ErrorMessagesPath=/opt/mapr/drillodbc/ErrorMessages
> LogLevel=2
> LogPath=/tmp/drilllog/
> SwapFilePath=/tmp
> #   SimbaDM / unixODBC
> ODBCInstLib=libodbcinst.so
>
> *$sudo ldconfig -v | grep "odbc"*
> /sbin/ldconfig.real: Ne peut évaluer par stat /lib/i686-linux-gnu: 
> Aucun fichier ou dossier de ce type
> /sbin/ldconfig.real: Ne peut évaluer par stat /usr/lib/i686-linux-gnu:
> Aucun fichier ou dossier de ce type
> /sbin/ldconfig.real: Chemin « /lib/x86_64-linux-gnu » donné plus d'une 
> fois
> /sbin/ldconfig.real: Chemin « /usr/lib/x86_64-linux-gnu » donné plus 
> d'une fois
> /sbin/ldconfig.real: /lib/i386-linux-gnu/ld-2.19.so is the dynamic 
> linker, ignoring
>
> /sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.19.so is the dynamic 
> linker, ignoring
>
>     libodbccr.so.1 -> libodbccr.so.1.0.0
>     libodbc.so.1 -> libodbc.so.1.0.0
>     libodbcinst.so.1 -> libodbcinst.so.1.0.0
>
> *$/opt/mapr/drillodbc/DrillExplorer/DrillExplorer*
> Java Classpath:
> /opt/mapr/drillodbc/DrillExplorer/app/DrillExplorer.jar:libs/hadoop-
> common-0.23.9.jar:libs/jna.jar:libs/json-20141113.jar:
> resources/Version.txt:resources/images/cftable.ico:
> resources/images/cftable2.png:resources/images/csv.png:
> resources/images/database.ico:resources/images/database.png:
> resources/images/file.ico:resources/images/folder.ico:
> resources/images/json.png:resources/images/parquet.png:
> resources/images/table.ico:resources/images/tsv.png:
> resources/images/view.ico
> Exception in thread "JavaFX Application Thread" java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException
>     at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1762)
>     at
> javafx.fxml.FXMLLoader$ControllerMethodEventHandler.
> handle(FXMLLoader.java:1645)
>     at
> com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(
> CompositeEventHandler.java:86)
>     at
> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(
> EventHandlerManager.java:238)
>     at
> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(
> EventHandlerManager.java:191)
>     at
> com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(
> CompositeEventDispatcher.java:59)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:58)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:56)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:56)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:56)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
>     at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
>     at javafx.event.Event.fireEvent(Event.java:198)
>     at javafx.scene.Node.fireEvent(Node.java:8216)
>     at javafx.scene.control.Button.fire(Button.java:185)
>     at
> com.sun.javafx.scene.control.behavior.ButtonBehavior.
> mouseReleased(ButtonBehavior.java:182)
>     at
> com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.
> handle(BehaviorSkinBase.java:96)
>     at
> com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.
> handle(BehaviorSkinBase.java:89)
>     at
> com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.
> handleBubblingEvent(CompositeEventHandler.java:218)
>     at
> com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(
> CompositeEventHandler.java:80)
>     at
> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(
> EventHandlerManager.java:238)
>     at
> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(
> EventHandlerManager.java:191)
>     at
> com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(
> CompositeEventDispatcher.java:59)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:58)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:56)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:56)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:56)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
>     at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
>     at javafx.event.Event.fireEvent(Event.java:198)
>     at javafx.scene.Scene$MouseHandler.process(Scene.java:3724)
>     at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3452)
>     at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1728)
>     at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2461)
>     at
> com.sun.javafx.tk.quantum.GlassViewEventHandler$
> MouseEventNotification.run(GlassViewEventHandler.java:348)
>     at
> com.sun.javafx.tk.quantum.GlassViewEventHandler$
> MouseEventNotification.run(GlassViewEventHandler.java:273)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at
> com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(
> GlassViewEventHandler.java:382)
>     at com.sun.glass.ui.View.handleMouseEvent(View.java:553)
>     at com.sun.glass.ui.View.notifyMouse(View.java:925)
>     at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
>     at
> com.sun.glass.ui.gtk.GtkApplication.lambda$null$45(
> GtkApplication.java:126)
>     at com.sun.glass.ui.gtk.GtkApplication$$Lambda$43/
> 202720134.run(Unknown
> Source)
>     at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.reflect.InvocationTargetException
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 62)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:483)
>     at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
>     at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:483)
>     at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
> at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1759)
>     ... 51 more
> *Caused by: java.lang.UnsatisfiedLinkError: Unable to load library
> 'iodbc':
> Native library (linux-x86-64/libiodbc.so)* not found in resource path 
> ([file:/opt/mapr/drillodbc/DrillExplorer/app/DrillExplorer.jar,
> file:/opt/mapr/drillodbc/DrillExplorer/app/libs/hadoop-common-0.23.9.j
> ar, file:/opt/mapr/drillodbc/DrillExplorer/app/libs/jna.jar,
> file:/opt/mapr/drillodbc/DrillExplorer/app/libs/json-20141113.jar,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/Version.txt,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/cftable.ic
> o, 
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/cftable2.p
> ng, 
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/csv.png,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/database.i
> co, 
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/database.p
> ng, 
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/file.ico,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/folder.ico
> , 
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/json.png,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/parquet.pn
> g, 
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/table.ico,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/tsv.png,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/view.ico])
>     at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
>     at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
>     at com.sun.jna.Library$Handler.<init>(Library.java:147)
>     at com.sun.jna.Native.loadLibrary(Native.java:414)
>     at com.sun.jna.Native.loadLibrary(Native.java:393)
>     at com.simba.odbc.ODBCConnection$DrillODBC.<clinit>(Unknown Source)
>     at com.simba.odbc.ODBCUtils.getDataSources(Unknown Source)
>     at com.simba.drill.DRConnection.getDataSources(Unknown Source)
>     at
> com.simba.schemaexplorer.ConnectionPaneController.populateDSNList(Unkn
> own
> Source)
>     at 
> com.simba.schemaexplorer.SchemaExplorerController.connect(Unknown
> Source)
>
>
>
> Le mar. 30 août 2016 à 22:58, Sékine Coulibaly <sc...@gmail.com> 
> a écrit :
>
> > Nicolas,
> >
> > Additionally to what Krystal pointed at, on Linux platforms you can 
> > try this :
> > sudo ldconfig -v | grep "odbc"
> >
> > This will yield a non-empty result if dynamic linker can find the 
> > dynamic library related to odbc. If nothing is returned, issuing the 
> > following command will help refresh ldconfig's cache :
> > sudo ldconfig
> >
> > Sekine
> >
> > 2016-08-30 19:18 GMT+02:00 Krystal Nguyen <kn...@maprtech.com>:
> >
> > > Hi Nicolas,
> > >
> > > ODBC should work with unixODBC driver manager.  Does the
> > "libodbcinst.so.1"
> > > library file exists on your node and it's path specified in the 
> > > "LD_LIBRARY_PATH" variable.  I am using unixODBC-2.2.14 it is 
> > > working
> > fine
> > > for me.  I use the following setting in mapr.drillodbc.ini:
> > >
> > > #   SimbaDM / unixODBC
> > > ODBCInstLib=libodbcinst.so
> > >
> > > Thanks,
> > > Krystal
> > >
> > > On Tue, Aug 30, 2016 at 10:07 AM, Nicolas Paris 
> > > <ni...@gmail.com>
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > > I am testing ODBC connexion thought Drill Explorer.
> > > > It works ok with iodbc installed.
> > > >
> > > > However I cannot make it working with unixODBC.
> > > > I get this error :
> > > >  Unable to load library 'iodbc': Native library
> > > (linux-x86-64/libiodbc.so)
> > > >
> > > > I have specified in the mapr.drillodbc.ini  to use unixODBC
> > > > ODBCInstLib=libodbcinst.so.1
> > > >
> > > > Does it mean iodbc is the only working client ?
> > > > Or does it mean Drill Explorer only works with iodbc ?
> > > >
> > > > Thanks by advance
> > > >
> > >
> >
>

Re: odbc connection with unixODBC

Posted by Sékine Coulibaly <sc...@gmail.com>.
Should be confirmed but yes, dDrillExplorer most likely makes use of iodbc
only and not unixODBC.

Regarding the unixODBC stuff, my guess is that libodbcinst.so is not in
your LD_LIBRARY_PATH. But you most likely have libodbcinst.so.1.
So, please give it a try changing your .mapr.drillodbc.ini :

#   SimbaDM / unixODBC
ODBCInstLib=libodbcinst.so.1

You should then be able to use isql :

isql "Sample MapR Drill DSN 64"

Result being :

| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| SCHEMA_NAME


                                                                          |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| INFORMATION_SCHEMA


                                                                           |
| cp.default


                                                                           |
| dfs.default


                                                                          |
| dfs.root


                                                                           |
| dfs.tmp


                                                                          |
| sys


                                                                          |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
SQLRowCount returns -1
6 rows fetched

To investigate dynamic linking, you can use the following :
strace isql "Sample MapR Drill DSN 64"

This show where the libraries are actually searched at execution time.



2016-08-31 12:50 GMT+02:00 Nicolas Paris <ni...@gmail.com>:

> Krystal, Sékine, thanks for your help. Pease find more informations :
>
> *$dpkg -s unixodbc*
> Package: unixodbc
> Status: install ok installed
> Priority: optional
> Section: database
> Installed-Size: 111
> Maintainer: Ubuntu Developers <ub...@lists.ubuntu.com>
> Architecture: amd64
> Multi-Arch: foreign
> Version: 2.2.14p2-5ubuntu5
> Depends: libc6 (>= 2.14), libreadline6 (>= 6.0), odbcinst1debian2 (>=
> 2.2.11-3), libodbc1 (>= 2.2.14p2-3)
> Conflicts: unixodbc-bin (<< 2.2.4-1)
>
> *$locate libodbcinst*
> /usr/lib/x86_64-linux-gnu/libodbcinst.a
> /usr/lib/x86_64-linux-gnu/libodbcinst.so
> /usr/lib/x86_64-linux-gnu/libodbcinst.so.1
> /usr/lib/x86_64-linux-gnu/libodbcinst.so.1.0.0
>
> *$echo $LD_LIBRARY_PATH *
> /usr/local/lib:/usr/lib/:/opt/mapr/drillodbc/lib/64/:/usr/
> lib/x86_64-linux-gnu/
>
> *$head -100 /etc/mapr.drillodbc.ini*
> [Driver]
> DisableAsync=0
> DriverManagerEncoding=UTF-16
> ErrorMessagesPath=/opt/mapr/drillodbc/ErrorMessages
> LogLevel=2
> LogPath=/tmp/drilllog/
> SwapFilePath=/tmp
> #   SimbaDM / unixODBC
> ODBCInstLib=libodbcinst.so
>
> *$sudo ldconfig -v | grep "odbc"*
> /sbin/ldconfig.real: Ne peut évaluer par stat /lib/i686-linux-gnu: Aucun
> fichier ou dossier de ce type
> /sbin/ldconfig.real: Ne peut évaluer par stat /usr/lib/i686-linux-gnu:
> Aucun fichier ou dossier de ce type
> /sbin/ldconfig.real: Chemin « /lib/x86_64-linux-gnu » donné plus d'une fois
> /sbin/ldconfig.real: Chemin « /usr/lib/x86_64-linux-gnu » donné plus d'une
> fois
> /sbin/ldconfig.real: /lib/i386-linux-gnu/ld-2.19.so is the dynamic linker,
> ignoring
>
> /sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.19.so is the dynamic
> linker, ignoring
>
>     libodbccr.so.1 -> libodbccr.so.1.0.0
>     libodbc.so.1 -> libodbc.so.1.0.0
>     libodbcinst.so.1 -> libodbcinst.so.1.0.0
>
> *$/opt/mapr/drillodbc/DrillExplorer/DrillExplorer*
> Java Classpath:
> /opt/mapr/drillodbc/DrillExplorer/app/DrillExplorer.jar:libs/hadoop-
> common-0.23.9.jar:libs/jna.jar:libs/json-20141113.jar:
> resources/Version.txt:resources/images/cftable.ico:
> resources/images/cftable2.png:resources/images/csv.png:
> resources/images/database.ico:resources/images/database.png:
> resources/images/file.ico:resources/images/folder.ico:
> resources/images/json.png:resources/images/parquet.png:
> resources/images/table.ico:resources/images/tsv.png:
> resources/images/view.ico
> Exception in thread "JavaFX Application Thread" java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException
>     at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1762)
>     at
> javafx.fxml.FXMLLoader$ControllerMethodEventHandler.
> handle(FXMLLoader.java:1645)
>     at
> com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(
> CompositeEventHandler.java:86)
>     at
> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(
> EventHandlerManager.java:238)
>     at
> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(
> EventHandlerManager.java:191)
>     at
> com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(
> CompositeEventDispatcher.java:59)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:58)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:56)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:56)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:56)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
>     at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
>     at javafx.event.Event.fireEvent(Event.java:198)
>     at javafx.scene.Node.fireEvent(Node.java:8216)
>     at javafx.scene.control.Button.fire(Button.java:185)
>     at
> com.sun.javafx.scene.control.behavior.ButtonBehavior.
> mouseReleased(ButtonBehavior.java:182)
>     at
> com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.
> handle(BehaviorSkinBase.java:96)
>     at
> com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.
> handle(BehaviorSkinBase.java:89)
>     at
> com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.
> handleBubblingEvent(CompositeEventHandler.java:218)
>     at
> com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(
> CompositeEventHandler.java:80)
>     at
> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(
> EventHandlerManager.java:238)
>     at
> com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(
> EventHandlerManager.java:191)
>     at
> com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(
> CompositeEventDispatcher.java:59)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:58)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:56)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:56)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at
> com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(
> BasicEventDispatcher.java:56)
>     at
> com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(
> EventDispatchChainImpl.java:114)
>     at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
>     at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
>     at javafx.event.Event.fireEvent(Event.java:198)
>     at javafx.scene.Scene$MouseHandler.process(Scene.java:3724)
>     at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3452)
>     at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1728)
>     at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2461)
>     at
> com.sun.javafx.tk.quantum.GlassViewEventHandler$
> MouseEventNotification.run(GlassViewEventHandler.java:348)
>     at
> com.sun.javafx.tk.quantum.GlassViewEventHandler$
> MouseEventNotification.run(GlassViewEventHandler.java:273)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at
> com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(
> GlassViewEventHandler.java:382)
>     at com.sun.glass.ui.View.handleMouseEvent(View.java:553)
>     at com.sun.glass.ui.View.notifyMouse(View.java:925)
>     at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
>     at
> com.sun.glass.ui.gtk.GtkApplication.lambda$null$45(
> GtkApplication.java:126)
>     at com.sun.glass.ui.gtk.GtkApplication$$Lambda$43/
> 202720134.run(Unknown
> Source)
>     at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.reflect.InvocationTargetException
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 62)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:483)
>     at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
>     at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:483)
>     at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
> at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1759)
>     ... 51 more
> *Caused by: java.lang.UnsatisfiedLinkError: Unable to load library
> 'iodbc':
> Native library (linux-x86-64/libiodbc.so)* not found in resource path
> ([file:/opt/mapr/drillodbc/DrillExplorer/app/DrillExplorer.jar,
> file:/opt/mapr/drillodbc/DrillExplorer/app/libs/hadoop-common-0.23.9.jar,
> file:/opt/mapr/drillodbc/DrillExplorer/app/libs/jna.jar,
> file:/opt/mapr/drillodbc/DrillExplorer/app/libs/json-20141113.jar,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/Version.txt,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/cftable.ico,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/cftable2.png,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/csv.png,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/database.ico,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/database.png,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/file.ico,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/folder.ico,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/json.png,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/parquet.png,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/table.ico,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/tsv.png,
> file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/view.ico])
>     at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
>     at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
>     at com.sun.jna.Library$Handler.<init>(Library.java:147)
>     at com.sun.jna.Native.loadLibrary(Native.java:414)
>     at com.sun.jna.Native.loadLibrary(Native.java:393)
>     at com.simba.odbc.ODBCConnection$DrillODBC.<clinit>(Unknown Source)
>     at com.simba.odbc.ODBCUtils.getDataSources(Unknown Source)
>     at com.simba.drill.DRConnection.getDataSources(Unknown Source)
>     at
> com.simba.schemaexplorer.ConnectionPaneController.populateDSNList(Unknown
> Source)
>     at com.simba.schemaexplorer.SchemaExplorerController.connect(Unknown
> Source)
>
>
>
> Le mar. 30 août 2016 à 22:58, Sékine Coulibaly <sc...@gmail.com> a
> écrit :
>
> > Nicolas,
> >
> > Additionally to what Krystal pointed at, on Linux platforms you can try
> > this :
> > sudo ldconfig -v | grep "odbc"
> >
> > This will yield a non-empty result if dynamic linker can find the dynamic
> > library related to odbc. If nothing is returned, issuing the following
> > command will help refresh ldconfig's cache :
> > sudo ldconfig
> >
> > Sekine
> >
> > 2016-08-30 19:18 GMT+02:00 Krystal Nguyen <kn...@maprtech.com>:
> >
> > > Hi Nicolas,
> > >
> > > ODBC should work with unixODBC driver manager.  Does the
> > "libodbcinst.so.1"
> > > library file exists on your node and it's path specified in the
> > > "LD_LIBRARY_PATH" variable.  I am using unixODBC-2.2.14 it is working
> > fine
> > > for me.  I use the following setting in mapr.drillodbc.ini:
> > >
> > > #   SimbaDM / unixODBC
> > > ODBCInstLib=libodbcinst.so
> > >
> > > Thanks,
> > > Krystal
> > >
> > > On Tue, Aug 30, 2016 at 10:07 AM, Nicolas Paris <ni...@gmail.com>
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > > I am testing ODBC connexion thought Drill Explorer.
> > > > It works ok with iodbc installed.
> > > >
> > > > However I cannot make it working with unixODBC.
> > > > I get this error :
> > > >  Unable to load library 'iodbc': Native library
> > > (linux-x86-64/libiodbc.so)
> > > >
> > > > I have specified in the mapr.drillodbc.ini  to use unixODBC
> > > > ODBCInstLib=libodbcinst.so.1
> > > >
> > > > Does it mean iodbc is the only working client ?
> > > > Or does it mean Drill Explorer only works with iodbc ?
> > > >
> > > > Thanks by advance
> > > >
> > >
> >
>

Re: odbc connection with unixODBC

Posted by Nicolas Paris <ni...@gmail.com>.
Krystal, Sékine, thanks for your help. Pease find more informations :

*$dpkg -s unixodbc*
Package: unixodbc
Status: install ok installed
Priority: optional
Section: database
Installed-Size: 111
Maintainer: Ubuntu Developers <ub...@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: foreign
Version: 2.2.14p2-5ubuntu5
Depends: libc6 (>= 2.14), libreadline6 (>= 6.0), odbcinst1debian2 (>=
2.2.11-3), libodbc1 (>= 2.2.14p2-3)
Conflicts: unixodbc-bin (<< 2.2.4-1)

*$locate libodbcinst*
/usr/lib/x86_64-linux-gnu/libodbcinst.a
/usr/lib/x86_64-linux-gnu/libodbcinst.so
/usr/lib/x86_64-linux-gnu/libodbcinst.so.1
/usr/lib/x86_64-linux-gnu/libodbcinst.so.1.0.0

*$echo $LD_LIBRARY_PATH *
/usr/local/lib:/usr/lib/:/opt/mapr/drillodbc/lib/64/:/usr/lib/x86_64-linux-gnu/

*$head -100 /etc/mapr.drillodbc.ini*
[Driver]
DisableAsync=0
DriverManagerEncoding=UTF-16
ErrorMessagesPath=/opt/mapr/drillodbc/ErrorMessages
LogLevel=2
LogPath=/tmp/drilllog/
SwapFilePath=/tmp
#   SimbaDM / unixODBC
ODBCInstLib=libodbcinst.so

*$sudo ldconfig -v | grep "odbc"*
/sbin/ldconfig.real: Ne peut évaluer par stat /lib/i686-linux-gnu: Aucun
fichier ou dossier de ce type
/sbin/ldconfig.real: Ne peut évaluer par stat /usr/lib/i686-linux-gnu:
Aucun fichier ou dossier de ce type
/sbin/ldconfig.real: Chemin « /lib/x86_64-linux-gnu » donné plus d'une fois
/sbin/ldconfig.real: Chemin « /usr/lib/x86_64-linux-gnu » donné plus d'une
fois
/sbin/ldconfig.real: /lib/i386-linux-gnu/ld-2.19.so is the dynamic linker,
ignoring

/sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.19.so is the dynamic
linker, ignoring

    libodbccr.so.1 -> libodbccr.so.1.0.0
    libodbc.so.1 -> libodbc.so.1.0.0
    libodbcinst.so.1 -> libodbcinst.so.1.0.0

*$/opt/mapr/drillodbc/DrillExplorer/DrillExplorer*
Java Classpath:
/opt/mapr/drillodbc/DrillExplorer/app/DrillExplorer.jar:libs/hadoop-common-0.23.9.jar:libs/jna.jar:libs/json-20141113.jar:resources/Version.txt:resources/images/cftable.ico:resources/images/cftable2.png:resources/images/csv.png:resources/images/database.ico:resources/images/database.png:resources/images/file.ico:resources/images/folder.ico:resources/images/json.png:resources/images/parquet.png:resources/images/table.ico:resources/images/tsv.png:resources/images/view.ico
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
    at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1762)
    at
javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1645)
    at
com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
    at
com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at
com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at
com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at
com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at
com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at
com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at
com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at
com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at
com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at
com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at
com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.Node.fireEvent(Node.java:8216)
    at javafx.scene.control.Button.fire(Button.java:185)
    at
com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
    at
com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
    at
com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
    at
com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
    at
com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
    at
com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at
com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at
com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at
com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at
com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at
com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at
com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at
com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at
com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at
com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at
com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.Scene$MouseHandler.process(Scene.java:3724)
    at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3452)
    at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1728)
    at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2461)
    at
com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:348)
    at
com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:273)
    at java.security.AccessController.doPrivileged(Native Method)
    at
com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:382)
    at com.sun.glass.ui.View.handleMouseEvent(View.java:553)
    at com.sun.glass.ui.View.notifyMouse(View.java:925)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at
com.sun.glass.ui.gtk.GtkApplication.lambda$null$45(GtkApplication.java:126)
    at com.sun.glass.ui.gtk.GtkApplication$$Lambda$43/202720134.run(Unknown
Source)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1759)
    ... 51 more
*Caused by: java.lang.UnsatisfiedLinkError: Unable to load library 'iodbc':
Native library (linux-x86-64/libiodbc.so)* not found in resource path
([file:/opt/mapr/drillodbc/DrillExplorer/app/DrillExplorer.jar,
file:/opt/mapr/drillodbc/DrillExplorer/app/libs/hadoop-common-0.23.9.jar,
file:/opt/mapr/drillodbc/DrillExplorer/app/libs/jna.jar,
file:/opt/mapr/drillodbc/DrillExplorer/app/libs/json-20141113.jar,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/Version.txt,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/cftable.ico,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/cftable2.png,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/csv.png,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/database.ico,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/database.png,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/file.ico,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/folder.ico,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/json.png,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/parquet.png,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/table.ico,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/tsv.png,
file:/opt/mapr/drillodbc/DrillExplorer/app/resources/images/view.ico])
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
    at com.sun.jna.Library$Handler.<init>(Library.java:147)
    at com.sun.jna.Native.loadLibrary(Native.java:414)
    at com.sun.jna.Native.loadLibrary(Native.java:393)
    at com.simba.odbc.ODBCConnection$DrillODBC.<clinit>(Unknown Source)
    at com.simba.odbc.ODBCUtils.getDataSources(Unknown Source)
    at com.simba.drill.DRConnection.getDataSources(Unknown Source)
    at
com.simba.schemaexplorer.ConnectionPaneController.populateDSNList(Unknown
Source)
    at com.simba.schemaexplorer.SchemaExplorerController.connect(Unknown
Source)



Le mar. 30 août 2016 à 22:58, Sékine Coulibaly <sc...@gmail.com> a
écrit :

> Nicolas,
>
> Additionally to what Krystal pointed at, on Linux platforms you can try
> this :
> sudo ldconfig -v | grep "odbc"
>
> This will yield a non-empty result if dynamic linker can find the dynamic
> library related to odbc. If nothing is returned, issuing the following
> command will help refresh ldconfig's cache :
> sudo ldconfig
>
> Sekine
>
> 2016-08-30 19:18 GMT+02:00 Krystal Nguyen <kn...@maprtech.com>:
>
> > Hi Nicolas,
> >
> > ODBC should work with unixODBC driver manager.  Does the
> "libodbcinst.so.1"
> > library file exists on your node and it's path specified in the
> > "LD_LIBRARY_PATH" variable.  I am using unixODBC-2.2.14 it is working
> fine
> > for me.  I use the following setting in mapr.drillodbc.ini:
> >
> > #   SimbaDM / unixODBC
> > ODBCInstLib=libodbcinst.so
> >
> > Thanks,
> > Krystal
> >
> > On Tue, Aug 30, 2016 at 10:07 AM, Nicolas Paris <ni...@gmail.com>
> > wrote:
> >
> > > Hello,
> > >
> > > I am testing ODBC connexion thought Drill Explorer.
> > > It works ok with iodbc installed.
> > >
> > > However I cannot make it working with unixODBC.
> > > I get this error :
> > >  Unable to load library 'iodbc': Native library
> > (linux-x86-64/libiodbc.so)
> > >
> > > I have specified in the mapr.drillodbc.ini  to use unixODBC
> > > ODBCInstLib=libodbcinst.so.1
> > >
> > > Does it mean iodbc is the only working client ?
> > > Or does it mean Drill Explorer only works with iodbc ?
> > >
> > > Thanks by advance
> > >
> >
>

Re: odbc connection with unixODBC

Posted by Sékine Coulibaly <sc...@gmail.com>.
Nicolas,

Additionally to what Krystal pointed at, on Linux platforms you can try
this :
sudo ldconfig -v | grep "odbc"

This will yield a non-empty result if dynamic linker can find the dynamic
library related to odbc. If nothing is returned, issuing the following
command will help refresh ldconfig's cache :
sudo ldconfig

Sekine

2016-08-30 19:18 GMT+02:00 Krystal Nguyen <kn...@maprtech.com>:

> Hi Nicolas,
>
> ODBC should work with unixODBC driver manager.  Does the "libodbcinst.so.1"
> library file exists on your node and it's path specified in the
> "LD_LIBRARY_PATH" variable.  I am using unixODBC-2.2.14 it is working fine
> for me.  I use the following setting in mapr.drillodbc.ini:
>
> #   SimbaDM / unixODBC
> ODBCInstLib=libodbcinst.so
>
> Thanks,
> Krystal
>
> On Tue, Aug 30, 2016 at 10:07 AM, Nicolas Paris <ni...@gmail.com>
> wrote:
>
> > Hello,
> >
> > I am testing ODBC connexion thought Drill Explorer.
> > It works ok with iodbc installed.
> >
> > However I cannot make it working with unixODBC.
> > I get this error :
> >  Unable to load library 'iodbc': Native library
> (linux-x86-64/libiodbc.so)
> >
> > I have specified in the mapr.drillodbc.ini  to use unixODBC
> > ODBCInstLib=libodbcinst.so.1
> >
> > Does it mean iodbc is the only working client ?
> > Or does it mean Drill Explorer only works with iodbc ?
> >
> > Thanks by advance
> >
>

Re: odbc connection with unixODBC

Posted by Krystal Nguyen <kn...@maprtech.com>.
Hi Nicolas,

ODBC should work with unixODBC driver manager.  Does the "libodbcinst.so.1"
library file exists on your node and it's path specified in the
"LD_LIBRARY_PATH" variable.  I am using unixODBC-2.2.14 it is working fine
for me.  I use the following setting in mapr.drillodbc.ini:

#   SimbaDM / unixODBC
ODBCInstLib=libodbcinst.so

Thanks,
Krystal

On Tue, Aug 30, 2016 at 10:07 AM, Nicolas Paris <ni...@gmail.com> wrote:

> Hello,
>
> I am testing ODBC connexion thought Drill Explorer.
> It works ok with iodbc installed.
>
> However I cannot make it working with unixODBC.
> I get this error :
>  Unable to load library 'iodbc': Native library (linux-x86-64/libiodbc.so)
>
> I have specified in the mapr.drillodbc.ini  to use unixODBC
> ODBCInstLib=libodbcinst.so.1
>
> Does it mean iodbc is the only working client ?
> Or does it mean Drill Explorer only works with iodbc ?
>
> Thanks by advance
>