0
votes

I've developed a small application for testing whether the app works properly or not after deploying it in worklight server. I deployed the app and adapter file in worklight server in another machine and my web service war file in my localhost. When i test this in a browser, its properly fetching the data from the webservice. Even it is working on android phone browser. But its not fetching any data when i test it in android phone by deploying its apk file. In logcat its giving me this error,

"request time failed: java.net.SocketException : Address family not supported by protocol"

My Server version: 5.0.2.407 Developed the app in the studio version : 5.0.6.20130311-0918

Pls help me to solve the problem. We dont have the recent Worklight server. So, trying to install the new app in older server version.

This is the info content of my logcat:

06-20 12:44:18.463: I/dalvikvm(415): Could not find method android.webkit.WebView., referenced from method org.apache.cordova.CordovaWebView.

06-20 12:44:18.463: W/dalvikvm(415): VFY: unable to resolve direct method 529: Landroid/webkit/WebView;. (Landroid/content/Context;Landroid/util/AttributeSet;IZ)V

06-20 12:44:18.753: W/ActivityManager(59): Activity destroy timeout for HistoryRecord{4403f778 com.Server/.Server}

06-20 12:44:18.783: I/CordovaLog(415): Changing log level to DEBUG(3)

06-20 12:44:18.803: I/CordovaLog(415): Found preference for exit-on-suspend=false

06-20 12:44:18.963: I/CordovaWebView(415): Disabled addJavascriptInterface() bridge since Android version is old.

06-20 12:44:19.503: I/ActivityManager(59): Displayed activity com.Server/.Server: 2080 ms (total 2080 ms)

06-20 12:44:30.552: I/Web Console(415): jquery was called at file:///data/data/com.Server/files/www/default/js/jquery_1.7_min.js:4

06-20 12:44:33.483: I/Database(415): sqlite returned: error code = 14, msg = cannot open file at source line 25467

06-20 12:44:34.053: I/Web Console(415): Falling back on PROMPT mode since _cordovaNative is missing. at file:///data/data/com.Server/files/www/default/wlclient/js/cordova.js:1112

06-20 12:44:34.843: I/dalvikvm(415): Could not find method java.util.Calendar.getDisplayNames, referenced from method org.apache.cordova.Globalization.getDateNames

06-20 12:44:34.843: W/dalvikvm(415): VFY: unable to resolve virtual method 9874: Ljava/util/Calendar;.getDisplayNames (IILjava/util/Locale;)Ljava/util/Map;

06-20 12:44:34.853: I/dalvikvm(415): Could not find method java.util.Calendar.getDisplayNames, referenced from method org.apache.cordova.Globalization.getDateNames

06-20 12:44:34.853: W/dalvikvm(415): VFY: unable to resolve virtual method 9874: Ljava/util/Calendar;.getDisplayNames (IILjava/util/Locale;)Ljava/util/Map;

06-20 12:44:34.863: I/dalvikvm(415): Could not find method java.util.Calendar.getDisplayNames, referenced from method org.apache.cordova.Globalization.getDateNames

06-20 12:44:34.863: W/dalvikvm(415): VFY: unable to resolve virtual method 9874: Ljava/util/Calendar;.getDisplayNames (IILjava/util/Locale;)Ljava/util/Map;

06-20 12:44:34.863: I/dalvikvm(415): Could not find method java.util.Calendar.getDisplayNames, referenced from method org.apache.cordova.Globalization.getDateNames

06-20 12:44:34.863: W/dalvikvm(415): VFY: unable to resolve virtual method 9874: Ljava/util/Calendar;.getDisplayNames (IILjava/util/Locale;)Ljava/util/Map;

06-20 12:44:38.113: I/Web Console(415): jquery was called at :4

06-20 12:45:54.934: I/java.net.Socket(342): www.google.com/74.125.235.52(80): java.net.SocketException: The operation timed out

06-20 12:46:08.009: I/java.net.Socket(342): www.google.com/74.125.235.52(80): java.net.SocketException: The operation timed out

06-20 12:49:04.162: I/java.net.Socket(342): www.google.com/74.125.235.51(80): java.net.SocketException: The operation timed out

06-20 12:49:17.184: I/java.net.Socket(342): www.google.com/74.125.235.51(80): java.net.SocketException: The operation timed out

1

1 Answers

1
votes

This will never work.

The communication protocol as well as entire authentication framework was changed in Worklight v5.0.0.3.

You cannot use a newer app created in Worklight 5.0.6 with this specific old Worklight Server version (5.0.0.2).

You will have to upgrade the server version.