Bad Arg

Michelle Burns <>
Tue Sep 26 17:29:57 CEST 2000


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:

()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