jWebSocket Forum

[Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Android client, 1.0 RC3 - build 50113, websocketclient listerner not receiving packets  XML
Forum Index » Third Party Apps
Author Message
br_manjula@yahoo.com

jWebSocket Forum User

Joined: 15/03/2015 05:28:20
Messages: 1
Offline



I have developed simple Android client using jwebsocket. (target API 19) and it used some older verion of jwebsocket libraries (don't know the exact version)
The application has Intent service, which creates basetokenclient and adds websocketclient listener.
It exchanges json messages my web server.
The intent service also has a forever loop that checks for heartbeats received from my webserver
and if it misses 3 heartbeat, then it closes connection and reinitiates the connection.
If the device looses looses network connectivity then client trys to reconnect to the server every 2 seconds.
and in such scenario, I was hitting below error and application terminated.
Thread [<16> jWebSocket-Client 181] (Suspended (exception RejectedExecutionException))
ThreadPoolExecutor$AbortPolicy.rejectedExecution(Runnable, ThreadPoolExecutor) line: 1967
ThreadPoolExecutor.reject(Runnable) line: 782
ThreadPoolExecutor.execute(Runnable) line: 1303
ThreadPoolExecutor(AbstractExecutorService).submit(Runnable) line: 81
BaseTokenClient(BaseWebSocketClient).notifyClosed(WebSocketClientEvent) line: 960
BaseWebSocketClient$WebSocketReceiver.run() line: 1063

Hence , picked up jwebsocket jar files from 1.0 RC3 - build 50113
Here is the list of libraries in my project libs folder
android-support-v4.jar
jWebSocketJavaSEClient-1.0.jar
jWebSocketClientAPI-1.0.jar
jackson-databind-2.2.4.jar
jWebSocketCommon-1.0.jar
javolution-5.5.1.jar

After shifting to new libraries, I don't get any packet in processpacket() in my websocketclient listener
and see lot of run time errors. (App is built using eclipse) build and class path is set correctly and also see all libraries in dexed folder. Could you please help

I guess, the culprit is

---------------------------
03-14 10:06:23.334: E/dalvikvm(2040): Could not find class 'com.fasterxml.jackson.databind.ObjectMapper', referenced from method org.jwebsocket.packetProcessors.JSONProcessor.JSONStringToToken
03-14 10:06:23.334: W/dalvikvm(2040): VFY: unable to resolve new-instance 993 (Lcom/fasterxml/jackson/databind/ObjectMapper in Lorg/jwebsocket/packetProcessors/JSONProcessor;
03-14 10:06:23.334: D/dalvikvm(2040): VFY: replacing opcode 0x22 at 0x0005
03-14 10:06:23.344: W/dalvikvm(2040): Unable to resolve superclass of Lcom/fasterxml/jackson/databind/ObjectMapper; (929)
03-14 10:06:23.344: W/dalvikvm(2040): Link of class 'Lcom/fasterxml/jackson/databind/ObjectMapper;' failed
03-14 10:06:23.344: D/dalvikvm(2040): DexOpt: unable to opt direct call 0x1b0e at 0x07 in Lorg/jwebsocket/packetProcessors/JSONProcessor;.JSONStringToToken



----------------------------


Here is complete list of logs.

03-14 10:06:21.803: I/dalvikvm(2040): Could not find method org.springframework.util.Assert.isTrue, referenced from method org.jwebsocket.client.java.BaseClient.sendPacketInTransaction
03-14 10:06:21.803: W/dalvikvm(2040): VFY: unable to resolve static method 17834: Lorg/springframework/util/Assert;.isTrue (ZLjava/lang/StringV
03-14 10:06:21.803: D/dalvikvm(2040): VFY: replacing opcode 0x71 at 0x002f
03-14 10:06:21.823: I/dalvikvm(2040): Could not find method org.apache.commons.codec.binary.Base64.decodeBase64, referenced from method org.jwebsocket.util.Tools.base64Decode
03-14 10:06:21.823: W/dalvikvm(2040): VFY: unable to resolve static method 16297: Lorg/apache/commons/codec/binary/Base64;.decodeBase64 (Ljava/lang/String[B
03-14 10:06:21.823: D/dalvikvm(2040): VFY: replacing opcode 0x71 at 0x0000
03-14 10:06:21.823: I/dalvikvm(2040): Could not find method org.springframework.util.Assert.isTrue, referenced from method org.jwebsocket.util.Tools.compareVersions
03-14 10:06:21.823: W/dalvikvm(2040): VFY: unable to resolve static method 17834: Lorg/springframework/util/Assert;.isTrue (ZLjava/lang/StringV
03-14 10:06:21.823: D/dalvikvm(2040): VFY: replacing opcode 0x71 at 0x000b
03-14 10:06:21.833: E/dalvikvm(2040): Could not find class 'java.lang.management.OperatingSystemMXBean', referenced from method org.jwebsocket.util.Tools.getCpuUsage
03-14 10:06:21.833: W/dalvikvm(2040): VFY: unable to resolve const-class 1641 (Ljava/lang/management/OperatingSystemMXBean in Lorg/jwebsocket/util/Tools;
03-14 10:06:21.833: D/dalvikvm(2040): VFY: replacing opcode 0x1c at 0x001d
03-14 10:06:21.833: E/dalvikvm(2040): Could not find class 'org.hyperic.sigar.Sigar', referenced from method org.jwebsocket.util.Tools.getCpuUsage
03-14 10:06:21.833: W/dalvikvm(2040): VFY: unable to resolve new-instance 2142 (Lorg/hyperic/sigar/Sigar in Lorg/jwebsocket/util/Tools;
03-14 10:06:21.833: D/dalvikvm(2040): VFY: replacing opcode 0x22 at 0x002d
03-14 10:06:21.843: I/dalvikvm(2040): Could not find method org.apache.commons.io.FilenameUtils.separatorsToSystem, referenced from method org.jwebsocket.util.Tools.isParentPath
03-14 10:06:21.843: W/dalvikvm(2040): VFY: unable to resolve static method 16313: Lorg/apache/commons/io/FilenameUtils;.separatorsToSystem (Ljava/lang/StringLjava/lang/String;
03-14 10:06:21.843: D/dalvikvm(2040): VFY: replacing opcode 0x71 at 0x000b
03-14 10:06:21.843: E/dalvikvm(2040): Could not find class 'org.apache.commons.compress.archivers.zip.ZipArchiveInputStream', referenced from method org.jwebsocket.util.Tools.unzip
03-14 10:06:21.843: W/dalvikvm(2040): VFY: unable to resolve new-instance 2123 (Lorg/apache/commons/compress/archivers/zip/ZipArchiveInputStream in Lorg/jwebsocket/util/Tools;
03-14 10:06:21.843: D/dalvikvm(2040): VFY: replacing opcode 0x22 at 0x000f
03-14 10:06:21.843: E/dalvikvm(2040): Could not find class 'org.apache.commons.compress.archivers.ArchiveStreamFactory', referenced from method org.jwebsocket.util.Tools.zip
03-14 10:06:21.843: W/dalvikvm(2040): VFY: unable to resolve new-instance 2121 (Lorg/apache/commons/compress/archivers/ArchiveStreamFactory in Lorg/jwebsocket/util/Tools;
03-14 10:06:21.843: D/dalvikvm(2040): VFY: replacing opcode 0x22 at 0x0005
03-14 10:06:21.843: D/dalvikvm(2040): DexOpt: unable to opt direct call 0x3fc8 at 0x2f in Lorg/jwebsocket/util/Tools;.getCpuUsage
03-14 10:06:21.843: I/dalvikvm(2040): DexOpt: unable to optimize static field ref 0x1027 at 0x21 in Lorg/jwebsocket/util/Tools;.isParentPath
03-14 10:06:21.853: D/dalvikvm(2040): DexOpt: unable to opt direct call 0x3fb5 at 0x11 in Lorg/jwebsocket/util/Tools;.unzip
03-14 10:06:21.853: D/dalvikvm(2040): DexOpt: unable to opt direct call 0x3fb1 at 0x07 in Lorg/jwebsocket/util/Tools;.zip
03-14 10:06:21.853: D/dalvikvm(2040): DexOpt: unable to opt direct call 0x3fb3 at 0x14 in Lorg/jwebsocket/util/Tools;.zip
03-14 10:06:23.314: I/dalvikvm(2040): Could not find method org.apache.log4j.Logger.getLogger, referenced from method org.jwebsocket.util.JWSTimerTask.run
03-14 10:06:23.314: W/dalvikvm(2040): VFY: unable to resolve static method 16325: Lorg/apache/log4j/Logger;.getLogger (Ljava/lang/StringLorg/apache/log4j/Logger;
03-14 10:06:23.314: D/dalvikvm(2040): VFY: replacing opcode 0x71 at 0x000b
03-14 10:06:23.314: I/dalvikvm(2040): DexOpt: unable to optimize static field ref 0x1028 at 0x0f in Lorg/jwebsocket/util/JWSTimerTask;.run
03-14 10:06:23.324: D/info(2040): HBMonitor last heartBeat Received at : Sat Mar 14 10:06:23 GMT+00:00 2015 Interval : 60000ms
03-14 10:06:23.334: W/dalvikvm(2040): Unable to resolve superclass of Lcom/fasterxml/jackson/databind/ObjectMapper; (929)
03-14 10:06:23.334: W/dalvikvm(2040): Link of class 'Lcom/fasterxml/jackson/databind/ObjectMapper;' failed
03-14 10:06:23.334: E/dalvikvm(2040): Could not find class 'com.fasterxml.jackson.databind.ObjectMapper', referenced from method org.jwebsocket.packetProcessors.JSONProcessor.JSONStringToToken
03-14 10:06:23.334: W/dalvikvm(2040): VFY: unable to resolve new-instance 993 (Lcom/fasterxml/jackson/databind/ObjectMapper in Lorg/jwebsocket/packetProcessors/JSONProcessor;
03-14 10:06:23.334: D/dalvikvm(2040): VFY: replacing opcode 0x22 at 0x0005
03-14 10:06:23.344: W/dalvikvm(2040): Unable to resolve superclass of Lcom/fasterxml/jackson/databind/ObjectMapper; (929)
03-14 10:06:23.344: W/dalvikvm(2040): Link of class 'Lcom/fasterxml/jackson/databind/ObjectMapper;' failed
03-14 10:06:23.344: D/dalvikvm(2040): DexOpt: unable to opt direct call 0x1b0e at 0x07 in Lorg/jwebsocket/packetProcessors/JSONProcessor;.JSONStringToToken
03-14 10:07:23.333: D/info(2040): HBMonitor last heartBeat Received at : Sat Mar 14 10:06:23 GMT+00:00 2015 Interval : 60000ms
03-14 10:08:23.341: D/info(2040): Closing Connection : 3 Heartbeat Missed
03-14 10:08:23.641: D/WSListener(2040): socket closed
03-14 10:08:23.641: D/info(2040): Model Name Get unknown msm8960
03-14 10:08:23.651: D/info(2040): Hardware Id GetK143011101
03-14 10:08:26.354: D/info(2040): HBMonitor last heartBeat Received at : Sat Mar 14 10:08:26 GMT+00:00 2015 Interval : 60000ms
03-14 10:09:26.363: D/info(2040): HBMonitor last heartBeat Received at : Sat Mar 14 10:08:26 GMT+00:00 2015 Interval : 60000ms
vbarzana

jWebSocket Forum Fan
[Avatar]

Joined: 11/07/2011 09:13:42
Messages: 109
Offline

Hi br_manjula,
As far as I can see, your problem is a dependency problem, but we are not wrapping the dependencies within the release package, if you are attempting to use them just as they are I recommend you to use Maven and switch the jWebSocket-1.0-RC3 release client packages:


They will automatically download for you all the dependencies, more info here:
http://jwebsocket.org/downloads/maven

Otherwise, you may need to download every single dependency package by yourself from the following list of dependencies for jWebSocketCommon:


And for jWebSocketClientAPI:


Best Regards,
Victor
[WWW]
HireTablets

jWebSocket Forum User

Joined: 05/12/2017 12:45:06
Messages: 1
Location: USA
Offline

Thanks for the information, you always come with something new!

iPad Rental company
[WWW]
 
Forum Index » Third Party Apps
Go to:   
Powered by JForum 2.1.9 © JForum Team