V7 table hanging

Hi:

I have a simple test application that, with my data, is putting the Vaadin table loader into a loop. The RowCount at the top of the table shows 229 rows, but the table only displays 21 of them. When I put the Vaadin debugger on, I see messages going back and forth between the client and the server at a high rate, and they seem to be requesting the same group of rows over and over again.

I have attached the application, but I don’t know how to give you the database rows so you can see what I see? Here is a screenshot:

image

As you can see, the table is only partially loaded. If I scroll way down (to where I expect the 229th row would be), I see the buttons.

Running with Vaadin debug, I see these messages over and over:

6702ms	Starting layout phase
16712ms	Measured 4 non connector elements
16722ms	Pass 1 measured 55 elements, fired 0 listeners and did 0 layouts.
16722ms	No more changes in pass 2
16722ms	Total layout phase time: 19ms
16723ms	* Dumping state changes to the console
16723ms	UIDL: undefined
16724ms	Processing time was 37ms
16724ms	Referenced paintables: 140
16735ms	RPC invocations to be sent to the server:
16736ms	   554 (class com.haulmont.cuba.web.widgets.client.table.CubaScrollTableConnector) :
16736ms	      v.v(firstToBeRendered : 0)
16736ms	      v.v(lastToBeRendered : 228)
16736ms	      v.v(reqfirstrow : 21)
16737ms	      v.v(reqrows : 208)
16737ms	Sending xhr message to server: {"csrfToken":"cce61539-b7ae-4fb6-b51b-3bc23aec76f8","rpc":[["554","v","v",["firstToBeRendered",["i",0]]],["554","v","v",["lastToBeRendered",["i",228]]],["554","v","v",["reqfirstrow",["i",21]]],["554","v","v",["reqrows",["i",208]]]],"syncId":6307,"clientId":6306}
16752ms	Server visit took 14.165ms
16752ms	JSON parsing took 0.065ms
16753ms	Received xhr message: for(;;);[{"syncId": 6308, "clientId": 6307, "changes" : [["change",{"pid":"554"},["39",{"id":"554","selectmode":"single","measurehint":0,"cols":1,"rows":208,"firstrow":21,"totalrows":229,"colheaders":true,"colfooters":false,"vcolorder":["1"],"pb-ft":0,"pb-l":20,"v":{"selected":[],"sortcolumn":"null","sortascending":true,"reqrows":-1,"reqfirstrow":-1,"columnorder":["1"],"collapsedcolumns":[],"noncollapsiblecolumns":[]}},["rows",{}],["shortcuts",{},["action",{"key":"13697","caption":"tableEnter","kc":13,"mk":[]}],["action",{"key":"13698","caption":"tableSelectAll","kc":65,"mk":["17"]}]],["visiblecolumns",{},["column",{"cid":"1","caption":"Function","fcaption":"","sortable":true}]]]]], "state":{}, "types":{"554":"39"}, "hierarchy":{"554":["572","647","587","597","567","632","557","617","627","657","612","562","602","582","622","642","637","652","592","607","577","555"]}, "rpc" : [], "meta" : {}, "resources" : {}, "timings":[6054, 0]}]
16753ms	Handling message from server
16753ms	* Handling resources from server
16754ms	* Handling type inheritance map from server
16754ms	Handling type mappings from server
16754ms	Handling resource dependencies
16755ms	* Handling meta information
16755ms	* Creating connectors (if needed)
16756ms	* Updating connector states
16757ms	* Handling locales
16757ms	* Updating connector hierarchy
16758ms	* Running @DelegateToWidget
16758ms	* Sending state change events
16758ms	* Passing UIDL to Vaadin 6 style connectors
16765ms	* Performing server to client RPC calls
16765ms	* Unregistered 0 connectors
16766ms	handleUIDLMessage: 11 ms
16766ms	Starting layout phase
16773ms	Measured 4 non connector elements
16782ms	Pass 1 measured 55 elements, fired 0 listeners and did 0 layouts.
16782ms	No more changes in pass 2
16782ms	Total layout phase time: 16ms
16783ms	* Dumping state changes to the console
16783ms	UIDL: undefined
16784ms	Processing time was 31ms
16784ms	Referenced paintables: 140
16795ms	RPC invocations to be sent to the server:
16796ms	   554 (class com.haulmont.cuba.web.widgets.client.table.CubaScrollTableConnector) :
16796ms	      v.v(firstToBeRendered : 0)
16796ms	      v.v(lastToBeRendered : 228)
16797ms	      v.v(reqfirstrow : 21)
16797ms	      v.v(reqrows : 208)
16798ms	Sending xhr message to server: {"csrfToken":"cce61539-b7ae-4fb6-b51b-3bc23aec76f8","rpc":[["554","v","v",["firstToBeRendered",["i",0]]],["554","v","v",["lastToBeRendered",["i",228]]],["554","v","v",["reqfirstrow",["i",21]]],["554","v","v",["reqrows",["i",208]]]],"syncId":6308,"clientId":6307}
16814ms	Server visit took 15.86ms
16814ms	JSON parsing took 0.07ms
16815ms	Received xhr message: for(;;);[{"syncId": 6309, "clientId": 6308, "changes" : [["change",{"pid":"554"},["39",{"id":"554","selectmode":"single","measurehint":0,"cols":1,"rows":208,"firstrow":21,"totalrows":229,"colheaders":true,"colfooters":false,"vcolorder":["1"],"pb-ft":0,"pb-l":20,"v":{"selected":[],"sortcolumn":"null","sortascending":true,"reqrows":-1,"reqfirstrow":-1,"columnorder":["1"],"collapsedcolumns":[],"noncollapsiblecolumns":[]}},["rows",{}],["shortcuts",{},["action",{"key":"13699","caption":"tableEnter","kc":13,"mk":[]}],["action",{"key":"13700","caption":"tableSelectAll","kc":65,"mk":["17"]}]],["visiblecolumns",{},["column",{"cid":"1","caption":"Function","fcaption":"","sortable":true}]]]]], "state":{}, "types":{"554":"39"}, "hierarchy":{"554":["572","647","587","597","567","632","557","617","627","657","612","562","602","582","622","642","637","652","592","607","577","555"]}, "rpc" : [], "meta" : {}, "resources" : {}, "timings":[6054, 0]}]
16815ms	Handling message from server
16817ms	* Handling resources from server
16817ms	* Handling type inheritance map from server
16818ms	Handling type mappings from server
16818ms	Handling resource dependencies
16818ms	* Handling meta information
16818ms	* Creating connectors (if needed)
16819ms	* Updating connector states
16819ms	* Handling locales
16819ms	* Updating connector hierarchy
16819ms	* Running @DelegateToWidget
16820ms	* Sending state change events
16820ms	* Passing UIDL to Vaadin 6 style connectors
16826ms	* Performing server to client RPC calls
16827ms	* Unregistered 0 connectors
16827ms	handleUIDLMessage: 9 ms
16827ms	Starting layout phase
16832ms	Measured 4 non connector elements
16842ms	Pass 1 measured 55 elements, fired 0 listeners and did 0 layouts.
16842ms	No more changes in pass 2
16843ms	Total layout phase time: 16ms
16843ms	* Dumping state changes to the console
16843ms	UIDL: undefined
16844ms	Processing time was 29ms
16844ms	Referenced paintables: 140
16856ms	RPC invocations to be sent to the server:
16856ms	   554 (class com.haulmont.cuba.web.widgets.client.table.CubaScrollTableConnector) :
16857ms	      v.v(firstToBeRendered : 0)
16857ms	      v.v(lastToBeRendered : 228)
16857ms	      v.v(reqfirstrow : 21)
16858ms	      v.v(reqrows : 208)
16859ms	Sending xhr message to server: {"csrfToken":"cce61539-b7ae-4fb6-b51b-3bc23aec76f8","rpc":[["554","v","v",["firstToBeRendered",["i",0]]],["554","v","v",["lastToBeRendered",["i",228]]],["554","v","v",["reqfirstrow",["i",21]]],["554","v","v",["reqrows",["i",208]]]],"syncId":6309,"clientId":6308}
16878ms	Server visit took 18.87ms
16878ms	JSON parsing took 0.05ms
16878ms	Received xhr message: for(;;);[{"syncId": 6310, "clientId": 6309, "changes" : [["change",{"pid":"554"},["39",{"id":"554","selectmode":"single","measurehint":0,"cols":1,"rows":208,"firstrow":21,"totalrows":229,"colheaders":true,"colfooters":false,"vcolorder":["1"],"pb-ft":0,"pb-l":20,"v":{"selected":[],"sortcolumn":"null","sortascending":true,"reqrows":-1,"reqfirstrow":-1,"columnorder":["1"],"collapsedcolumns":[],"noncollapsiblecolumns":[]}},["rows",{}],["shortcuts",{},["action",{"key":"13701","caption":"tableEnter","kc":13,"mk":[]}],["action",{"key":"13702","caption":"tableSelectAll","kc":65,"mk":["17"]}]],["visiblecolumns",{},["column",{"cid":"1","caption":"Function","fcaption":"","sortable":true}]]]]], "state":{}, "types":{"554":"39"}, "hierarchy":{"554":["572","647","587","597","567","632","557","617","627","657","612","562","602","582","622","642","637","652","592","607","577","555"]}, "rpc" : [], "meta" : {}, "resources" : {}, "timings":[6054, 0]}]
16879ms	Handling message from server
16879ms	* Handling resources from server
16879ms	* Handling type inheritance map from server

Need an expert for this one. Thanks in advance.

test.zip (83.3 KB)

I managed to generate a trace log for the com.vaadin.v7.ui.Table object that is looping. See attached. It is full of this over and over:

2019-08-09 14:49:04.022 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Client wants rows 21-228
2019-08-09 14:49:04.022 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Render visible cells for rows 0-228
2019-08-09 14:49:04.022 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.022 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.022 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.022 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.022 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.022 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null
2019-08-09 14:49:04.023 TRACE [http-nio-8080-exec-15/app/admin] com.vaadin.v7.ui.Table - Registered EditableColumnFieldWrapper: null

Please let me know what else I can do to diagnose this.

app.log.zip (29.7 KB)

After many hours of debugging, I discovered that my Repdefs object did not have a unique primary key. :frowning:

Once I repaired that (adding fields to the composite key), the table started displaying properly.

It appears the pagination functions operate by comparing ID values. If they are not unique, it can’t tell where it is in the page count and how many entries to actually display.

Yet another mystery solved…

Don’t you have UUID column in your table? You could have avoided the problem with that.

Unfortunately, no. Legacy database.