我们遇到了基于IBM Bluemix上的移动客户端访问服务的移动APP问题。之前它工作正常,但是现在,我们在启动APP后发现了以下失败。
http://www.ibm.com/developerworks/library/mo-android-mobiledata-app/
10-13 11:19:04.194 2721-2978/com.ibm.bluelist E/SplashActivityLoginFail: Failed to login: Response: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;;;
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="content">
<div id="page">
<div id="box">
<div id="error"> Exception thrown by application class 'com.worklight.applications.bean.ApplicationManagementServiceBeanOnCloud.getApplication:120'
</div>
<div id="code">
java.lang.IllegalStateException: Bluemix can't find application with tenantId 6dfe3edc-2c3f-4117-a2b7-8cade0a527ec and id iOSnative.<br>
<div id="stack">at com.worklight.applications.bean.ApplicationManagementServiceBeanOnCloud.getApplication(ApplicationManagementServiceBeanOnCloud.java:120)<br>at com.worklight.applications.bean.ApplicationManagementServiceBeanOnCloud.getApplicationEnvironment(ApplicationManagementServiceBeanOnCloud.java:140)<br>at com.worklight.authorization.AuthorizationServer.getApplicationEnvironmentRuntime(AuthorizationServer.java:217)<br>at com.worklight.authorization.AuthorizationServer.getApplicationEnvironmentRuntime(AuthorizationServer.java:182)<br>at com.worklight.authorization.AuthorizationEndpoint.authorizeClient(AuthorizationEndpoint.java:170)<br>at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)<br>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br>at java.lang.reflect.Method.invoke(Unknown Source)<br>at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)<br>at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:33)<br>at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)<br>at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)<br>at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)<br>at org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest(CreateInvocationParametersHandler.java:54)<br>at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)<br>at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)<br>at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)<br>at org.apache.wink.server.handlers.AbstractHandl
从错误消息中看,上面的失败似乎是由于tenantID无效:
java.lang.IllegalStateException: Bluemix can't find application with tenantId xxxx
实际上我们在MCA服务的仪表板中从 AppGuid 获得了tenantID,ID应该是正确的...
我们正在寻求帮助来调试此问题。任何评论都表示赞赏。
答案 0 :(得分:0)
我无法重现此问题。我建议重新启动应用程序或尝试其他MCA服务,看看是否能解决问题。
如果您仍然遇到问题,请告诉我们,我们可以进行更多调试,或者您可以打开Bluemix支持服务单,其中包含有关您的实例的更多信息,以帮助服务团队修复您的错误。
答案 1 :(得分:0)
我们正在使用MCA和自定义身份验证,它的工作方式是MCA android客户端SDK将在App GUID和RELAM名称的帮助下连接到MCA Bluemix服务。
您需要确保它们在前端和后端都匹配。两者都是强制性参数。
MCAAuthorizationManager mcaAuthorizationManager = MCAAuthorizationManager.createInstance(this.getApplicationContext(),"<App GUID>");
mcaAuthorizationManager.registerAuthenticationListener("<relam Name>", new CustomAuthenticationListener());
BMSClient.getInstance().setAuthorizationManager(mcaAuthorizationManager);