Project:
View Revisions: Issue #36762 | [ Back to Issue ] | ||
Summary | 0036762: Window personalization list can not be loaded properly due to an error during its sorting | ||
Revision | 2017-09-05 18:31 by caristu | ||
Steps To Reproduce | Option A: ** Ask the environment to Support department ** 1) Open 'Window Personalization' window and set active every views for user 'Diego' and window 'Product' (there will be 21) 2) Open 'Product' window and click the 'Save View' button on the toolbar. The following error is fired in the log (see attached the full log): Caused by: org.openbravo.base.exception.OBException: Exception when getting personalization settings for window ADWindow(140) (name: Product) at org.openbravo.client.application.personalization.PersonalizationHandler.getPersonalizationsForWindow(PersonalizationHandler.java:254) at org.openbravo.client.application.personalization.PersonalizationHandler.getPersonalizationForWindow(PersonalizationHandler.java:98) ... 57 more Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.TimSort.mergeHi(TimSort.java:895) at java.util.TimSort.mergeAt(TimSort.java:512) at java.util.TimSort.mergeCollapse(TimSort.java:437) at java.util.TimSort.sort(TimSort.java:241) at java.util.Arrays.sort(Arrays.java:1512) at java.util.ArrayList.sort(ArrayList.java:1454) at java.util.Collections.sort(Collections.java:175) at org.openbravo.client.application.personalization.PersonalizationHandler.sortPersonalizations(PersonalizationHandler.java:270) at org.openbravo.client.application.personalization.PersonalizationHandler.getPersonalizationsForWindow(PersonalizationHandler.java:251) ... 58 more Option B: 1) Attached is patch with a test case that checks if the PersonalizationHandler is transitive. Apply it. 2) Run test. |
||
Revision | 2017-09-05 18:29 by caristu | ||
Steps To Reproduce | Option A: ** Ask the environment to Support department ** - Login as Diego/openbravo 1) Open 'Window Personalization' window and set active every views for user 'Diego' and window 'Product' (there will be 21) 2) Open 'Product' window and click the 'Save View' button on the toolbar. The following error is fired in the log (see attached the full log): Caused by: org.openbravo.base.exception.OBException: Exception when getting personalization settings for window ADWindow(140) (name: Product) at org.openbravo.client.application.personalization.PersonalizationHandler.getPersonalizationsForWindow(PersonalizationHandler.java:254) at org.openbravo.client.application.personalization.PersonalizationHandler.getPersonalizationForWindow(PersonalizationHandler.java:98) ... 57 more Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.TimSort.mergeHi(TimSort.java:895) at java.util.TimSort.mergeAt(TimSort.java:512) at java.util.TimSort.mergeCollapse(TimSort.java:437) at java.util.TimSort.sort(TimSort.java:241) at java.util.Arrays.sort(Arrays.java:1512) at java.util.ArrayList.sort(ArrayList.java:1454) at java.util.Collections.sort(Collections.java:175) at org.openbravo.client.application.personalization.PersonalizationHandler.sortPersonalizations(PersonalizationHandler.java:270) at org.openbravo.client.application.personalization.PersonalizationHandler.getPersonalizationsForWindow(PersonalizationHandler.java:251) ... 58 more Option B: 1) Attached is patch with a test case that checks if the PersonalizationHandler is transitive. Apply it. 2) Run test. |
||
Revision | 2017-09-05 18:29 by caristu | ||
Description | Window personalization list can not be loaded properly due to an error during its sorting. The list of personalizations for a tab is sorted[1] before returning it to the client. Since Java 7 Collections.sort uses TimSort. Using a non-transitive comparator for sorting in Java >= 7 will throw the following exception: java.lang.IllegalArgumentException: Comparison method violates its general contract! And the PersonalizationComparator is not transitive when checking the priority by client. [1] https://code.openbravo.com/erp/devel/pi/file/4fa54a2fb83d/modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationHandler.java#l270 [^] [2] https://code.openbravo.com/erp/devel/pi/file/4fa54a2fb83d/modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationHandler.java#l601 [^] |
||
Revision | 2017-09-01 12:10 by caristu | ||
Steps To Reproduce | ** Ask the environment to Support department ** - Login as Diego/openbravo 1) Open 'Window Personalization' window and set active every views for user 'Diego' and window 'Product' (there will be 21) 2) Open 'Product' window and click the 'Save View' button on the toolbar --> The following error is shown in developer tools: ISC_Combined.js:1410 Uncaught TypeError: Cannot read property 'canEdit' of undefined at _2.action (e4921c3….js:2702) at _2.isc_StatefulCanvas_handleActivate [as handleActivate] (ISC_Combined.js:3561) at _2.isc_StatefulCanvas_handleClick [as handleClick] (ISC_Combined.js:3562) at _2.isc_c_Class_invokeSuper [as invokeSuper] (ISC_Combined.js:245) at _2.isc_c_Class_Super [as Super] (ISC_Combined.js:237) at _2.handleClick (ISC_Combined.js:7346) at _2.isc_c_EventHandler_bubbleEvent [as bubbleEvent] (ISC_Combined.js:1336) at _2.isc_c_EventHandler_handleClick [as handleClick] (ISC_Combined.js:1202) at _2.isc_c_EventHandler__handleMouseUp [as $k5] (ISC_Combined.js:1191) at _2.isc_c_EventHandler_handleMouseUp [as handleMouseUp] (ISC_Combined.js:1185) **Notice that the problem stops happening when anyone of those views is marked as not active |
||
Revision | 2017-09-01 12:10 by caristu | ||
Description | 'Save button' on the toolbar is not showing when containing many views having its personalization too complex. In the case of the example, there are 21 views defined and its not working, but if we mark one of them as not active, the button works correctly. |
Copyright © 2000 - 2009 MantisBT Group |