Using Twoorl With a different MySQL port

23 views
Skip to first unread message

Steven Lohrenz

unread,
Mar 30, 2009, 7:41:45 AM3/30/09
to erlyweb
I'm new to Erlang and I have setup and run successfully the 'music'
introduction application using and instance of MySQL on port 3305.

I was trying to get Twoorl to work on my Vista machine. I have added: -
define(PORT, 3305). to twoorl_app.hrl and compiled it. I have the
twoorl database setup and the rest of the definitions in
twoorl_app.hrl set to the correct values.

When I am in yaws and run: twoorl:start(). I get the following
message:

twoorl:109 "creating schema"
twoorl:112 "schema already exists"
twoorl:135 {"waiting for tables",[session]}

=ERROR REPORT==== 30-Mar-2009::11:28:58 ===
Error in process <0.129.0> with exit value: {undef,[{twoorl_util,log,
[mysql_recv,108,error,#Fun<mysql_recv.1.31365121>]},{mysql_recv,init,
4}]}

** exception exit: {noproc,{gen_server,call,
[mysql_dispatcher,get_logfun]}}
in function gen_server:call/2
in call from mysql:connect/9
in call from lists:foreach/2
in call from twoorl:start/0

Does anyone have any ideas on how to fix this or how to setup twoorl
with a different database port?

Thanks,
Steve

Davide Marquês

unread,
Mar 30, 2009, 10:23:44 AM3/30/09
to erl...@googlegroups.com
Hi Steven,

Welcome to the wonderful world of erlang! :)

This error:

Error in process <0.129.0> with exit value: {undef,[{twoorl_util,log,
[mysql_recv,108,error,#Fun<
mysql_recv.1.31365121>]},{mysql_recv,init,
4}]}
Should read as: the log function of the twoorl_util module is not defined.
In this case this happens because the twoorl_util module was not compiled when you ran make.

You can fix the problem by editing the file Emakefile and adding the line:
{"src/twoorl_util.erl", [{outdir, "./ebin"}]}.
and then running make again.

For more details on building erlang programs check this page:
http://medevyoujane.com/blog/2008/8/21/erlang-make-rake-and-emake.html

Cheers,
Davide

Steven Lohrenz

unread,
Mar 30, 2009, 12:10:05 PM3/30/09
to erlyweb
I understood from the README.txt that I downloaded with twoorl that
all I needed to do was setup the database, modify twoorl_app.hrl,
compile twoorl.erl, and then run twoorl:start(). in yaws - and the
twoorl:start() was going to compile the rest of the app. I see there
are compile functions in the twoorl module and the last line of
twoorl:start calls one of them. I'll try to run the make file first,
then.

Cheers,
Steve

On Mar 30, 3:23 pm, Davide Marquês <nesr...@gmail.com> wrote:
> Hi Steven,
>
> Welcome to the wonderful world of erlang! :)
>
> This error:
>
> > Error in process <0.129.0> with exit value: {undef,[{twoorl_util,log,
> > [mysql_recv,108,error,#Fun<
>
> >> mysql_recv.1.31365121>]},{mysql_recv,init,
> >> 4}]}
>
> > Should read as: the log function of the twoorl_util module is not defined.
>
> In this case this happens because the twoorl_util module was not compiled
> when you ran make.
>
> You can fix the problem by editing the file Emakefile and adding the line:
> {"src/twoorl_util.erl", [{outdir, "./ebin"}]}.
> and then running make again.
>
> For more details on building erlang programs check this page:http://medevyoujane.com/blog/2008/8/21/erlang-make-rake-and-emake.html
>
> Cheers,
> Davide
>
> On Mon, Mar 30, 2009 at 12:41 PM, Steven Lohrenz
> <steven.lohr...@gmail.com>wrote:
Reply all
Reply to author
Forward
0 new messages