<HTML>
<HEAD>
<TITLE>Re: [Freeswitch-users] Error loading ODBC</TITLE>
</HEAD>
<BODY>
<FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Actually on closer look... Theres your problem looks like you don&#8217;t have a DSN configured in your odbc.ini... Make sure your unixODBC installtion is correctly configured and isql can connect to the dsn<BR>
<BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"><B>From: </B>preetha Ayyappan &lt;preetha.ayyappan@gmail.com&gt;<BR>
<B>Reply-To: </B>&lt;freeswitch-users@lists.freeswitch.org&gt;<BR>
<B>Date: </B>Mon, 29 Sep 2008 12:44:40 +0530<BR>
<B>To: </B>&lt;freeswitch-users@lists.freeswitch.org&gt;<BR>
<B>Subject: </B>Re: [Freeswitch-users] Error loading ODBC<BR>
<BR>
Thanks.I have uncommented the line yoy specified and run the program sample.js from the freeswitch console.It shows the following error:<BR>
freeswitch@localhost&gt; 2008-09-29 18:13:03 [ERR] switch_odbc.c:160 switch_odbc_handle_connect() STATE: IM002 CODE 0 ERROR: [unixODBC][Driver Manager]Data source name not found, and no default driver specified<BR>
<BR>
2008-09-29 18:13:03 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<BR>
2008-09-29 18:13:03 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<BR>
2008-09-29 18:13:03 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<BR>
2008-09-29 18:13:03 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<BR>
2008-09-29 18:13:03 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<BR>
2008-09-29 18:13:03 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<BR>
2008-09-29 18:13:03 [NOTICE] sample.js:1 console_log() ==============================<BR>
2008-09-29 18:13:03 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<BR>
2008-09-29 18:13:03 [ERR] mod_spidermonkey_odbc.c:266 odbc_num_rows() Database is not connected!<BR>
2008-09-29 18:13:03 [ERR] mod_spidermonkey_odbc.c:314 odbc_next_row() Database is not connected!<BR>
2008-09-29 18:13:03 [NOTICE] sample.js:1 console_log() ==============================<BR>
2008-09-29 18:13:03 [ERR] mod_spidermonkey_odbc.c:235 odbc_exec() Database is not connected!<BR>
<BR>
Thanks<BR>
<BR>
<BR>
On Mon, Sep 29, 2008 at 12:29 PM, Michael Jerris &lt;mike@jerris.com&gt; wrote:<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
On Sep 29, 2008, at 2:45 AM, preetha Ayyappan wrote:<BR>
<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I have uncommented the line <B>'langages/mod_spidermonkey_odbc' </B>from /usr/local/freeswitch/modules.conf and installed like the following<BR>
<BR>
step1:-I have downloaded &nbsp;the unixodbc and put it in usr/local/freeswitch.<BR>
&nbsp;step2:-I have installed like the following from the /usr/local/freeswitch<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a)</SPAN></FONT><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>tar -xvzf unixODBC-2.2.12.tar.gz<BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>step3:-In the path /usr/local/freeswitch/unixodbc-2.2.12 ,i have done<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b)</SPAN></FONT><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>./configure --enable-gui=no<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c)make<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d)make install<BR>
<BR>
step3:-In the path /usr/local/freeswitch,I have done <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>a)./configure --enable-core-odbc-support<BR>
b)make all install<BR>
<BR>
when doing the above steps <BR>
<BR>
a)./configure --enable-core-odbc-support<BR>
b)make all install, I am getting the lines <BR>
<BR>
Making install in src<BR>
Making install in mod<BR>
<BR>
&nbsp;is not a valid FreeSWITCH module dir, skipping it.....<BR>
<BR>
&nbsp;is not a valid FreeSWITCH module dir, skipping it.....<BR>
<BR>
<BR>
<BR>
&nbsp;After making all the above I have put a sample odbc.js in /usr/local/javascript/scripts and tried to run from the freeswitch console like jsrun odbc.js.<BR>
<BR>
I am getting the following error:<BR>
<BR>
freeswitch@localhost&gt; 2008-09-29 17:44:12 [ERR] mod_spidermonkey.c:3303 js_api_use() Error loading ODBC<BR>
<BR>
<BR>
2008-09-29 17:44:12 [ERR] sample.js:11 mod_spidermonkey() &nbsp;ReferenceError: ODBC is not defined<BR>
<BR>
please let me know where i am wrong here.<BR>
<BR>
Thanks.<BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
in the file &nbsp;conf/autoload_configs/spidermonkey.conf.xml<BR>
<BR>
uncomment &lt;load module=&quot;mod_spidermonkey_odbc&quot;/&gt;<BR>
<BR>
I know you said you did before but double check... are you still getting the error that it can not open mod_spidermonkey_odbc.so? &nbsp;When it builds, do you see it building mod_spidermonkey_odbc? &nbsp;Does it actually create the so?<BR>
<BR>
Mike<BR>
<BR>
<BR>
<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> &nbsp;&nbsp;&nbsp;&nbsp;<BR>
<BR>
&nbsp;On Fri, Sep 26, 2008 at 3:16 PM, David Knell &lt;dave@3c.co.uk&gt; wrote:<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> &nbsp;&nbsp;<BR>
&nbsp;Hi Preetha,<BR>
&nbsp;<BR>
&nbsp;You've probably not compiled the module. &nbsp;Have a look in /usr/src/freeswitch (or wherever your source is); you'll<BR>
&nbsp;find a modules.conf there. &nbsp;Uncomment the line 'langages/mod_spidermonkey_odbc', rebuild, reinstall and things<BR>
&nbsp;might get better.<BR>
&nbsp;<BR>
&nbsp;--Dave<BR>
&nbsp;<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> &nbsp;<BR>
yes, I did ./configure --enable-core-odbc-support &amp;&amp; make &amp;&amp; make install.When i gave make install during installation,i found the following error:<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;&nbsp;<BR>
2008-09-26 19:37:19 [CRIT] switch_loadable_module.c:767 switch_loadable_module_load_file() Error Loading module /usr/local/freeswitch/mod/mod_spidermonkey_odbc.so<BR>
&nbsp;**/usr/local/freeswitch/mod/mod_spidermonkey_odbc.so: cannot open shared object file: No such file or directory**<BR>
&nbsp;<BR>
&nbsp;Thanks<BR>
&nbsp;&nbsp;<BR>
&nbsp;&nbsp;<BR>
On 9/25/08, <B>Raymond Chandler</B> &lt;intralanman@freeswitch.org&gt; wrote: &nbsp;<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> <BR>
if you built from source, make sure you use the --enable-core-odbc-support option on your ./configure<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;like so<BR>
&nbsp;./configure --enable-core-odbc-support &amp;&amp; make &amp;&amp; make install<BR>
&nbsp;<BR>
-Ray<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;preetha Ayyappan wrote: &nbsp;&nbsp;&nbsp;<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
You mean i have to uncomment the line &nbsp;&lt;load module=&quot;mod_spidermonkey_odbc&quot;/&gt;.?<BR>
&nbsp;yes.I have uncommented that line.eventhough the same error occurs<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
On Thu, Sep 25, 2008 at 2:33 PM, Michael Jerris &lt;mike@jerris.com&gt; wrote:<BR>
&nbsp;<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<BR>
&nbsp;On Sep 25, 2008, at 4:47 AM, preetha wrote:<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&gt;<BR>
&nbsp;&gt; Hi,<BR>
&nbsp;&gt; when i try to run a sample odbc code from freeswitch console like<BR>
&nbsp;&gt; freeswitch@localhost&gt; jsrun odbc.js<BR>
&nbsp;&gt;<BR>
&nbsp;&gt; I found the following error:<BR>
&nbsp;&gt; API CALL [jsrun(odbc.js)] output:<BR>
&nbsp;&gt; OK<BR>
&nbsp;&gt;<BR>
&nbsp;&gt; freeswitch@localhost&gt; 2008-09-25 19:44:35 [ERR] mod_spidermonkey.c:<BR>
&nbsp;&gt; 3303<BR>
&nbsp;&gt; js_api_use() Error loading ODBC<BR>
&nbsp;&gt; 2008-09-25 19:44:35 [ERR] odbc.js:11 mod_spidermonkey()<BR>
&nbsp;&gt; ReferenceError:<BR>
&nbsp;&gt; ODBC is not defined<BR>
&nbsp;&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;<BR>
&nbsp;Make sure you have mod_spidermonkey_odbc loaded in your<BR>
&nbsp;spidermonkey.conf.xml file<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;Mike<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
<BR>
</SPAN></FONT></FONT></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
_______________________________________________<BR>
Freeswitch-users mailing list<BR>
Freeswitch-users@lists.freeswitch.org<BR>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><BR>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><BR>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><BR>
<BR>
<BR>
<BR>
<BR>
-- <BR>
Preetha.A<BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN></FONT></FONT></BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_______________________________________________<BR>
Freeswitch-users mailing list<BR>
Freeswitch-users@lists.freeswitch.org<BR>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><BR>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><BR>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><BR>
</SPAN></FONT></FONT>
</BODY>
</HTML>