<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’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 <preetha.ayyappan@gmail.com><BR>
<B>Reply-To: </B><freeswitch-users@lists.freeswitch.org><BR>
<B>Date: </B>Mon, 29 Sep 2008 12:44:40 +0530<BR>
<B>To: </B><freeswitch-users@lists.freeswitch.org><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> 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 <mike@jerris.com> 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 the unixodbc and put it in usr/local/freeswitch.<BR>
step2:-I have installed like the following from the /usr/local/freeswitch<BR>
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>
b)</SPAN></FONT><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>./configure --enable-gui=no<BR>
c)make<BR>
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>
is not a valid FreeSWITCH module dir, skipping it.....<BR>
<BR>
is not a valid FreeSWITCH module dir, skipping it.....<BR>
<BR>
<BR>
<BR>
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> 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() 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 conf/autoload_configs/spidermonkey.conf.xml<BR>
<BR>
uncomment <load module="mod_spidermonkey_odbc"/><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? When it builds, do you see it building mod_spidermonkey_odbc? 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'> <BR>
<BR>
On Fri, Sep 26, 2008 at 3:16 PM, David Knell <dave@3c.co.uk> wrote:<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> <BR>
Hi Preetha,<BR>
<BR>
You've probably not compiled the module. Have a look in /usr/src/freeswitch (or wherever your source is); you'll<BR>
find a modules.conf there. Uncomment the line 'langages/mod_spidermonkey_odbc', rebuild, reinstall and things<BR>
might get better.<BR>
<BR>
--Dave<BR>
<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> <BR>
yes, I did ./configure --enable-core-odbc-support && make && make install.When i gave make install during installation,i found the following error:<BR>
<BR>
<BR>
<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>
**/usr/local/freeswitch/mod/mod_spidermonkey_odbc.so: cannot open shared object file: No such file or directory**<BR>
<BR>
Thanks<BR>
<BR>
<BR>
On 9/25/08, <B>Raymond Chandler</B> <intralanman@freeswitch.org> wrote: <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>
<BR>
like so<BR>
./configure --enable-core-odbc-support && make && make install<BR>
<BR>
-Ray<BR>
<BR>
<BR>
preetha Ayyappan wrote: <BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> <BR>
<BR>
You mean i have to uncomment the line <load module="mod_spidermonkey_odbc"/>.?<BR>
yes.I have uncommented that line.eventhough the same error occurs<BR>
<BR>
<BR>
On Thu, Sep 25, 2008 at 2:33 PM, Michael Jerris <mike@jerris.com> wrote:<BR>
<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> <BR>
<BR>
On Sep 25, 2008, at 4:47 AM, preetha wrote:<BR>
<BR>
><BR>
> Hi,<BR>
> when i try to run a sample odbc code from freeswitch console like<BR>
> freeswitch@localhost> jsrun odbc.js<BR>
><BR>
> I found the following error:<BR>
> API CALL [jsrun(odbc.js)] output:<BR>
> OK<BR>
><BR>
> freeswitch@localhost> 2008-09-25 19:44:35 [ERR] mod_spidermonkey.c:<BR>
> 3303<BR>
> js_api_use() Error loading ODBC<BR>
> 2008-09-25 19:44:35 [ERR] odbc.js:11 mod_spidermonkey()<BR>
> ReferenceError:<BR>
> ODBC is not defined<BR>
><BR>
<BR>
<BR>
Make sure you have mod_spidermonkey_odbc loaded in your<BR>
spidermonkey.conf.xml file<BR>
<BR>
Mike<BR>
<BR>
<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>