2016-11-29 27 views
0

美好的一天!MobileFirst管理数据库中不存在运行时“mfp”。数据库可能已损坏:HTTP 404 - 未找到

我已经从Github运行简单的Cordova Mobile App - ResourceRequestCordova,并且我在使用示例JavaAdapter时,在提交表单时出现了一些问题。但问题是,它显示为

错误:MobileFirst管理数据库中不存在运行时“mfp”。数据库可能已损坏:HTTP 404 - 未找到

..我正在使用新的MobileFirst Foundation 8.0开发工具包。

1)我的科尔多瓦代码index.js:

submitRequest:function() { 
    var first = document.getElementById("first").value; 
    var middle = document.getElementById("middle").value; 
    var last = document.getElementById("last").value; 
    var age = document.getElementById("age").value; 
    var birthdate = document.getElementById("birthdate").value; 
    var height = document.getElementById("height").value; 

    //JavaAdapter expects first, middle and last to be part of the POST URL path. 
    var url = "/adapters/javaAdapter/users/"+first+"/"+middle+"/"+last; 
    var resourceRequest = new WLResourceRequest(url, WLResourceRequest.POST); 

    //JavaAdapter expects age to be a query parameter. 
    resourceRequest.setQueryParameter("age", age); 

    //JavaAdapter expects birthdate to be a header parameter. 
    resourceRequest.setHeader("birthdate",birthdate); 

    //JavaAdapter expects height to be a form parameter. 
    var formParameters = {}; 
    formParameters.height = height; 

    resourceRequest.sendFormParameters(formParameters).then(app.onSuccess, app.onFailure); 
    window.plugins.spinnerDialog.show(null,null,function(){/*no callback - force the use of SpinnerDialog.hide() */ }); 
}, 

错误

Errors: 
{ getAdapterError: FWLSE3002E: The resource is not found. : FWLSE3038E: The adapter "javaAdapter" of the runtime "mfp" does not exist in the MobileFirst administration database. The database may be corrupted.: HTTP 404 - Not Found 
    at _processResponse (C:\Users\XXX\AppData\Roaming\npm\node_modules\mfpdev-cli\node_modules\mdo-server-support\lib\rest-client-api\adapter.js:550:23) 
    at C:\Users\XXX\AppData\Roaming\npm\node_modules\mfpdev-cli\node_modules\mdo-server-support\lib\rest-client-api\adapter.js:464:22 
    at _fulfilled (C:\Users\XXX\AppData\Roaming\npm\node_modules\mfpdev-cli\node_modules\q\q.js:834:54) 
    at self.promiseDispatch.done (C:\Users\XXX\AppData\Roaming\npm\node_modules\mfpdev-cli\node_modules\q\q.js:863:30) 
    at Promise.promise.promiseDispatch (C:\Users\XXX\AppData\Roaming\npm\node_modules\mfpdev-cli\node_modules\q\q.js:796:13) 
    at C:\Users\XXX\AppData\Roaming\npm\node_modules\mfpdev-cli\node_modules\q\q.js:604:44 
    at runSingle (C:\Users\XXX\AppData\Roaming\npm\node_modules\mfpdev-cli\node_modules\q\q.js:137:13) 
    at flush (C:\Users\XXX\AppData\Roaming\npm\node_modules\mfpdev-cli\node_modules\q\q.js:125:13) 
    at _combinedTickCallback (internal/process/next_tick.js:67:7) 
    at process._tickCallback (internal/process/next_tick.js:98:9) 
jse_shortmsg: 'FWLSE3002E: The resource is not found. : FWLSE3038E: The adapter "javaAdapter" of the runtime "mfp" does not exist in the MobileFirst administration database. The database may be corrupted.', 
jse_summary: 'FWLSE3002E: The resource is not found. : FWLSE3038E: The adapter "javaAdapter" of the runtime "mfp" does not exist in the MobileFirst administration database. The database may be corrupted.: HTTP 404 - Not Found', 
jse_cause: 
    { NotFound: HTTP 404 - Not Found 
     at FormData.<anonymous> (C:\Users\XXX\AppData\Roaming\npm\node_modules\mfpdev-cli\node_modules\mdo-server-support\lib\rest-client\get.js:93:25) 
     at emitOne (events.js:96:13) 
     at ClientRequest.emit (events.js:188:7) 
     at HTTPParser.parserOnIncomingClient (_http_client.js:474:21) 
     at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23) 
     at Socket.socketOnData (_http_client.js:363:20) 
     at emitOne (events.js:96:13) 
     at Socket.emit (events.js:188:7) 
     at readableAddChunk (_stream_readable.js:176:18) 
     at Socket.Readable.push (_stream_readable.js:134:10) name: 'NotFound' }, 
+0

你有解决上述问题的方法吗? –

+0

是的,我明白了,首先就是构建适配器程序。 – fndong

回答

0

FWLSE3038E:适配器运行时 “MFP” 的 “JavaAdapter的” 不在MobileFirst管理存在数据库。数据库可能已损坏。'

这听起来像你没有正确地构建和部署你的适配器。

生成并部署适配器后,加载MobileFirst控制台并验证适配器列表中是否存在适配器。