【发布时间】:2011-12-06 21:18:06
【问题描述】:
我正在尝试更新我的 riak 数据库中的客户,但收到以下错误消息: 而且我不知道是什么导致了这个错误,这个错误信息是什么意思。
而我使用的模块是:
allowed_methods(Request, State) ->
{['PUT'], Request, State}.
content_types_accepted(Request, State) ->
{[{"application/json",to_json}], Request, State}.
错误
webmachine 错误:path="/customer/cus/update" {error, {error,undef, [{customer_update,to_json, [{wm_reqdata,'PUT',http, {1,1}, "127.0.0.1", {wm_reqstate,#Port, {dict,4,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[],[],[], [[mediaparams,{"charset","UTF-8"}]], [], [[资源模块|客户更新], ['内容类型',116,101,120,116,47,104,116,109, 108]], [], [['内容编码',105,100,101,110,116,105,116, 121]], [],[],[],[],[],[],[],[]}}}, 未定义,“127.0.0.1”,'REQDATA',未定义,未定义, {wm_log_data,undefined, {1322,989559,450145}, 'PUT', {6, {“内容长度”,{“内容长度”,“121”}, {"connection",{'Connection',"Keep-Alive"},nil,nil}, {"content-type", {'Content-Type', "application/json; charset=UTF-8"}, nil, {"host", {'主机',"localhost:8000"}, {"expect",{"Expect","100-Continue"},nil,nil}, {"user-agent", {'User-Agent', "Apache-HttpClient/4.0.1 (java 1.5)"}, nil,nil}}}}}, "127.0.0.1","/updatecustomer", {1,1}, 404,0,未定义,未定义,未定义}}, [],"/customer/cus/update","//customer/cus/update", {dict,0,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}, {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]} }}, [],".",500,1073741824,67108864,[],[], {6, {"内容长度", {'内容长度',"121"}, {"connection",{'Connection',"Keep-Alive"},nil,nil}, {"content-type", {'Content-Type',"application/json; charset=UTF-8"}, nil, {"host", {'主机',"localhost:8000"}, {"expect",{"Expect","100-Continue"},nil,nil}, {"user-agent", {'User-Agent',"Apache-HttpClient/4.0.1 (java 1.5)"}, nil,nil}}}}}, not_fetched_yet,false, {1,{"content-type",{"Content-Type","text/html"},nil,nil}}, >, ["localhost"], 8000,[]}, 未定义]}, {webmachine_resource,resource_call,3}, {webmachine_resource,do,3}, {webmachine_decision_core,resource_call,1}, {webmachine_decision_core,accept_helper,0}, {webmachine_decision_core,decision,1}, {webmachine_decision_core,handle_request,2}, {webmachine_mochiweb,loop,1}]}}
【问题讨论】: