Search code examples
ibm-mobilefirstwebsphere-libertymobilefirst-adaptersmobilefirst-server

Mobilefirst 7.1 adapter call fails from a Mobile Web Application


Im working in a mobilefirst 7.1 web mobile app and a liberty server, my app works fine in my development server, but when ive deployed the same application pointing to my remoter server (with ip not a domain), but the app gives me a 403 error. my adapters has a

securityTest="wl_unprotected" 

if ive run my adapter as a rest service from his url directly it runs ok.

Client log

Request [/worklight/apps/services/api/TestConexion/mobilewebapp/query]
worklight.js:5349 Application details header: {"applicationDetails":{"platformVersion":"7.1.0.0","nativeVersion":""}}WL.Logger.__log @ worklight.js:5349
http://xxx.xxx.xx.xx:xxxx/worklight/apps/services/api/TestConexion/mobilewebapp/query Failed to load resource: the server responded with a status of 403 (Forbidden)

server log:

[11/4/15 11:41:16:877 ART] 0000006e com.ibm.ws.webcontainer.extension                            W SRVE0190E: File not found: /201509231601/login/nls/redirection.js

More Logs

 Cannot find application environment, application=TestConexion, version=null, environment=mobilewebapp
      Error code: 1, error description: INTERNAL_ERROR, error message: FWLSE0062E: An internal error occurred during browser request.  [project worklight]Cannot find application environment, application=TestConexion, version=null, environment=mobilewebapp, User Identity {wl_directUpdateRealm=null, SubscribeServlet=null, wl_authenticityRealm=null, AuthRealm=null, wl_remoteDisableRealm=null, SampleAppRealm=null, wl_antiXSRFRealm=null, wl_deviceAutoProvisioningRealm=null, wl_deviceNoProvisioningRealm=null, FarmalinkRealm=null, WASLTPARealm=null, wl_anonymousUserRealm=null}. [project worklight]

and an error of independent mode:

FWLSE0373W: Deployment of application 'TestConexion': The server is running in session independent mode, which the environment 'mobilewebapp' does not support.

Any thoughts?


Solution

  • To me, this:

    Deployment of application 'TestConexion': The server is running in session independent mode, which the environment 'mobilewebapp' does not support.
    

    Tells me that you are working on Token based sessions not HTTP sessions. IF you go to your worklight.properties you can make the changes there to run with HTTP sessions.

    worklight.properties is located under server>conf. The properties are:

    mfp.session.independent=false
    mfp.attrStore.type=HttpSession