How to debug a "Communication Problem"

Hi there,

I am having a hard time trying to debug a CommunicationProblem.

From my understanding it has to do with a presumed synchronization failure between the client and the server ui model.

I have tried to identify the source of the error, but I am not having a single error in the console log.

Can anybody give me a hint on how to find the root of this error? I have tried appending ?debug in the browser url textfield, but that seems not to help.

Many thanks in advance.

Carlos Conti.

Hi,

Are you using a servlet container like Tomcat? Often times I go ahead and log on the server to discover things like that.

Another option might be to use a tool like TCPView (Windows, free with sysinternals tools) or whatever the linux equivalent is (netstat? ethereal?) on the server side and see what the server is sending and receiving.

On the client side there are also tools like Fiddler which captures browser traffic, and lets you see everything about. Of course the built in browser tools do this as well.

By using tools like this, you can see what your client is sending and receiving, as well as see what the server is sending and receiving. It should give you a place to start.

Hope it helps.

Hi thanks for your insights.

The point is that I don’t truly know how to deal with problems like that. I can monitor communication, and I see some error messages like “could not determine application connection for overlay”, but don’t know exactly what to do…

If this has to do with a version conflict with Tomcat, I would take the most straightforward decision and switch the version.

I have not much experience in developing widgets, so I wouldn’t know where to start… just know the very basics.

On the other hand, the server throws this exception:

java.lang.NoClassDefFoundError: org/atmosphere/HeartbeatAtmosphereResourceEvent

which is infact present in the classpath via atmosphere-runtime-2.2.7.vaadin1.jar introduced in the classpath by Maven via vaadin-push-7.5.3.

On the client side I see the following log from the client debugger:

27755msStarting application ROOT-2521314
27762msUsing theme: runo
27763msVaadin application servlet version: 7.5.3
27770msSetting hearbeat interval to 5sec.
27776msJSON parsing took 3ms
27778msHandling message from server
27779ms* Handling resources from server
27780ms* Handling type inheritance map from server
27781msHandling type mappings from server
27789msHandling resource dependencies
27790ms* Handling meta information
27792ms* Creating connectors (if needed)
27870ms* Updating connector states
27910ms* Handling locales
27911ms* Updating connector hierarchy
27915ms* Sending hierarchy change events
28008ms* Running @DelegateToWidget
28011ms* Sending state change events
28115ms* Passing UIDL to Vaadin 6 style connectors
28213ms* Performing server to client RPC calls
28217ms* Unregistered 0 connectors
28217mshandleUIDLMessage: 425 ms
28218msStarting layout phase
28247msMeasured 34 non connector elements
28329msPass 1 measured 185 elements, fired 21 listeners and did 25 layouts.
28389msPass 2 measured 131 elements, fired 16 listeners and did 10 layouts.
28435msPass 3 measured 96 elements, fired 5 listeners and did 24 layouts.
28469msPass 4 measured 91 elements, fired 0 listeners and did 22 layouts.
28486msDid overflow fix for 2 elements
28504msPass 5 measured 3 elements, fired 0 listeners and did 1 layouts.
28510msPass 6 measured 1 elements, fired 0 listeners and did 0 layouts.
28519msDid overflow fix for 1 elements
28529msPass 7 measured 1 elements, fired 0 listeners and did 0 layouts.
28531msNo more changes in pass 8
28532msTotal layout phase time: 313ms
28533ms* Dumping state changes to the console
28533msUIDL: undefined
28701msProcessing time was 922ms for 56291 characters of JSON
28702msReferenced paintables: 247
28784msEstablishing push connection
28820msStarting layout phase
28836msMeasured 34 non connector elements
28857msPass 1 measured 21 elements, fired 0 listeners and did 3 layouts.
28869msPass 2 measured 4 elements, fired 1 listeners and did 1 layouts.
28875msDid overflow fix for 1 elements
28881msPass 3 measured 2 elements, fired 0 listeners and did 0 layouts.
28883msDid overflow fix for 1 elements
28884msPass 4 measured 1 elements, fired 0 listeners and did 0 layouts.
28884msNo more changes in pass 5
28890msTotal layout phase time: 69ms
29152msReceived push message: for(;;);[{“changes”:{},“resources”:{},“locales”:{},“meta”:{“appError”:{“caption”:“Communication problem”,“url”:null,“message”:“Take note of any unsaved data, and click here or press ESC to continue.”,“details”:null}},“syncId”:-1}]

29166msJSON parsing took 0ms
29167msHandling message from server
29168ms* Handling resources from server
29168ms* Handling type inheritance map from server
29168msHandling type mappings from server
29169msHandling resource dependencies
29169ms* Handling meta information
29170ms* Creating connectors (if needed)
29170ms* Updating connector states
29170ms* Handling locales
29170ms* Updating connector hierarchy
29171ms* Running @DelegateToWidget
29171ms* Sending state change events
29172ms* Passing UIDL to Vaadin 6 style connectors
29173ms* Unregistered 0 connectors
29174mshandleUIDLMessage: 4 ms
29175msStarting layout phase
29182msMeasured 34 non connector elements
29230msPass 1 measured 174 elements, fired 3 listeners and did 17 layouts.
29238msPass 2 measured 9 elements, fired 5 listeners and did 2 layouts.
29241msDid overflow fix for 1 elements
29247msPass 3 measured 3 elements, fired 0 listeners and did 0 layouts.
29252msDid overflow fix for 1 elements
29254msPass 4 measured 1 elements, fired 0 listeners and did 0 layouts.
29254msNo more changes in pass 5
29255msTotal layout phase time: 79ms
29255ms* Dumping state changes to the console
29255msUIDL: undefined
29262msSetting hearbeat interval to -1sec.
29262msProcessing time was 96ms for 227 characters of JSON
29263msReferenced paintables: 247
29263msNo active request

What are the bets?, is it everything coming from the jars conflict? Or presumably anything else.

Any help is greatly appreciated.

Many thanks for your time.

Regards,

Carlos Conti.

Found the solution. My problem was that I had set the heartbeat interval to 5 seconds (obviously in the assumption that they were minutes). Once I removed the setting, the default value (300 seconds) the problem disappeared.

Hope this helps someone.
Carlos.