Bad Arg

Michelle Burns Michelle.Burns@REDACTED
Tue Sep 26 18:40:49 CEST 2000


Hello again!

I worked out the problem. I had recomplied one of the modules with a 
new version of my header file, where had I added a new field to the
record 
lsp_xconnect. Hence, there was a record definition inconsistency.

/ Michelle

Michelle Burns wrote:
> 
> Hello,
> 
> I am working with MPLS on the AXD301 and I get the following error "Bad
> Type"
> when I try to write to a mnesia table:
> 
> (mich@REDACTED)295>
> mnesia:dirty_write(lsp_xconnect,{lsp_xconnect,{[10,10,10,10],1,[20,20,20,20],2},1,2,3}).
> ** exited: {aborted,{bad_type,{lsp_xconnect,
>                                   {"\n\n\n\n",1,[20,20,20,20],2},
>                                   1,
>                                   2,
>                                   3}}} **
> 
> I register the mnesia table at initialisation with a four tuple Key:
> 
>     ok = rcmI:create_mnesia_table(lsp_xconnect,
>                                   [{disc_copies,base}],
>                                   [{type,set},
>                                    {snmp, [{key, {fix_string,       % incipaddr
>                                                   integer,          % inclabel
>                                                   fix_string,       % outgipaddr
>                                                   integer           % outglabel
>                                                  }}]},
>                                    {attributes,
>                                     record_info(fields, lsp_xconnect)}]).
> 
> My lsp_xconnect record is defined:
> 
> -record(lsp_xconnect,
>         {%% cross connection for provisioned lsps
>            key_tuple,                 %% {IncIpAddr, IncLabel, OutgIpAddr,
> OutgLabel}
>            traff_descr=0,             %% defaults to TdIndex of 0 (best effort)
>            lsp_name,                  %% string
>            admin_status
>         }).
> 
> Could you please help to explain why this error occurs. As far as I can
> see, I am using
> the correct key ?
> 
> Thanks,
>   Michelle



More information about the erlang-questions mailing list