Erlang/OTP Forums

Author Message

<  Erlang questions mailing list  ~  What's wrong, help please.

svg at disney.surnet.ru
Posted: Mon Sep 13, 1999 8:07 pm Reply with quote
Guest
Then I was trying to execute a mnesia query, based on two tables,
such as from eva/examples/simple_adaptation.erl :

Handle = query [{A.name, A.sender, A.cause, A.severity, AlarmDef.class} ||
A <- table(alarm),
AlarmDef <- table(alarmTable),
A.name = AlarmDef.name] end,
{atomic, Alarms} = mnesia:transaction(fun() -> mnemosyne:eval(Handle) end),
...

I had always got error, such as :
{'EXIT',{badarg,{ets,lookup,[db_get,[mnemosyne_catalog,{image,alarm}]]}}} ?

Query, based on one table, executed well.

My environment are RedHat Linux6.0 and Erlang47.4.1 installed from rpm distribution.

Regards.
---
Vladimir Sekissov svg_at_ptt.chel.su


Post generated using Mail2Forum (http://m2f.sourceforge.net)
dgud at erix.ericsson.se
Posted: Tue Sep 14, 1999 5:53 am Reply with quote
Guest
Try starting mnemosyne first.
application:start(mnemosyne).

The reason is that simple queries don't need the application
to be started, while more complex, in this case 2 tables,
queries requires mnemosyne.

/Dan


svg_at_disney.surnet.ru writes:
>
> Then I was trying to execute a mnesia query, based on two tables,
> such as from eva/examples/simple_adaptation.erl :
>
> Handle = query [{A.name, A.sender, A.cause, A.severity, AlarmDef.class} ||
> A <- table(alarm),
> AlarmDef <- table(alarmTable),
> A.name = AlarmDef.name] end,
> {atomic, Alarms} = mnesia:transaction(fun() -> mnemosyne:eval(Handle) end),
> ...
>
> I had always got error, such as :
> {'EXIT',{badarg,{ets,lookup,[db_get,[mnemosyne_catalog,{image,alarm}]]}}} ?
>
> Query, based on one table, executed well.
>
> My environment are RedHat Linux6.0 and Erlang47.4.1 installed from rpm distribution.
>
> Regards.
> ---
> Vladimir Sekissov svg_at_ptt.chel.su


Post generated using Mail2Forum (http://m2f.sourceforge.net)

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum