A lot of Russian language on Login panel

Description

Please see attached screenshot

Environment

None

Activity

Show:
Norbert Bede
October 27, 2014, 9:11 PM

Test Result: Confirm. Test Case: 20 restarts 0 error.
Environment: our private installation (refx: forum thread)

thanks for all
norbert

Carlos Ruiz
October 26, 2014, 2:20 PM

Thanks for the feedback.

Thanks , I installed auto-refresh plugins in firefox and chrome and started 4 sessions auto-refreshed every second and the issue you described became reproducible each time.

Added synchronization to getLanguage and it seems now is safe.

Hiep Lq
October 26, 2014, 3:00 AM

I also encounter this issue in my server.
it's can redo as below:

clear all cache in browse (history, data app, cooki,...)
+ restart server
+ when server restart open two browse (or new chrome in incognito mode)
+ don't wait server complete start, from two browse access to idempiere. continue refresh (because server is not ready)
+ when server ready, we has two (or more) request to server at same time
+ when page load complete, we can confirm this bug
it's easy to proceduce, but not 100%, about 90%. rely we can make multi request at same time when start server

maybe code to access s_languages need synchronized.

Norbert Bede
October 25, 2014, 1:56 PM

. apply your patch to our installation. Im restarted idempiere server today approx 20 times.

I cant confirm patch resolve the issue.

LOG WHEN languages Are OK [THE SAME ID at end of line 83!!!!]
------------------------------------------------------------------------------------------
15:51:29.806 WebUIServlet.init: iDempiere Web Client started successfully [84]
15:52:22.078 Language.getLanguage: Adding Language=sy, Country=SY, Locale=sy_SY [83]
15:52:22.094 Language.getLanguage: Adding Language=en, Country=US, Locale=en_US [83]
15:52:22.160 Language.getLanguage: Adding Language=ja, Country=JP, Locale=ja_JP [83]
15:52:22.167 Language.getLanguage: Adding Language=es, Country=CO, Locale=es_CO [83]
15:52:22.176 Language.getLanguage: Adding Language=sk, Country=SK, Locale=sk_SK [83]
15:52:22.184 Language.getLanguage: Adding Language=hu, Country=HU, Locale=hu_HU [83]
15:52:22.190 Language.getLanguage: Adding Language=cs, Country=CZ, Locale=cs_CZ [83]
15:52:22.194 Language.getLanguage: Adding Language=ar, Country=SA, Locale=ar_SA [83]
15:52:22.199 Language.getLanguage: Adding Language=ko, Country=KR, Locale=ko_KR [83]

LOG WHEN languages Are OK [THE DIFFERENT ID at end of line]
------------------------------------------------------------------------------------------
14:15:27.141 WebUIServlet.init: iDempiere Web Client started successfully [79]
14:15:54.655 Language.getLanguage: Adding Language=sy, Country=SY, Locale=sy_SY [60]
14:15:54.678 Language.getLanguage: Adding Language=sk, Country=SK, Locale=sk_SK [56]
14:15:54.678 Language.getLanguage: Adding Language=sk, Country=SK, Locale=sk_SK [58]
14:15:54.682 Language.getLanguage: Adding Language=sk, Country=SK, Locale=sk_SK [60]
14:15:54.686 Language.getLanguage: Adding Language=sk, Country=SK, Locale=sk_SK [57]
14:19:36.214 Language.getLanguage: Adding Language=en, Country=US, Locale=en_US [125]
14:19:36.269 Language.getLanguage: Adding Language=ja, Country=JP, Locale=ja_JP [125]
14:19:36.276 Language.getLanguage: Adding Language=es, Country=CO, Locale=es_CO [125]
14:19:36.285 Language.getLanguage: Adding Language=hu, Country=HU, Locale=hu_HU [125]
14:19:36.290 Language.getLanguage: Adding Language=cs, Country=CZ, Locale=cs_CZ [125]
14:19:36.298 Language.getLanguage: Adding Language=ko, Country=KR, Locale=ko_KR [125]

ANOTHER WRONG ID
15:54:41.005 WebUIServlet.init: iDempiere Web Client started successfully [78]
15:55:30.956 Language.getLanguage: Adding Language=sy, Country=SY, Locale=sy_SY [33]
15:55:30.993 Language.getLanguage: Adding Language=sk, Country=SK, Locale=sk_SK [33]
15:55:30.994 Language.getLanguage: Adding Language=sk, Country=SK, Locale=sk_SK [45]
15:55:31.001 Language.getLanguage: Adding Language=sk, Country=SK, Locale=sk_SK [46]
15:55:31.322 Language.getLanguage: Adding Language=en, Country=US, Locale=en_US [109]
15:55:31.484 Language.getLanguage: Adding Language=ja, Country=JP, Locale=ja_JP [109]
15:55:31.491 Language.getLanguage: Adding Language=es, Country=CO, Locale=es_CO [109]
15:55:31.499 Language.getLanguage: Adding Language=hu, Country=HU, Locale=hu_HU [109]
15:55:31.505 Language.getLanguage: Adding Language=cs, Country=CZ, Locale=cs_CZ [109]
15:55:31.510 Language.getLanguage: Adding Language=ar, Country=SA, Locale=ar_SA [109]
15:55:31.514 Language.getLanguage: Adding Language=ko, Country=KR, Locale=ko_KR [109]

Carlos Ruiz
October 22, 2014, 5:20 PM
Edited

Twilight zone bug

I'm trying to trace the code.
The list of login languages is based on the array Language.s_languages

The s_languages array is incremented in the method Language.getLanguage.

The issue I see is that the s_language is a primitive array so it needs to be dropped and recreated to add a new language, changing that to an ArrayList that stays really "static" on time could be helpful.

I'm attaching the patch IDEMPIERE-939.patch that replaces the primitive array by an ArrayList, the tests went fine in the seed database - but maybe you can confirm if it works for your installation with more languages, and also if there is an improvement in performance maybe.

Regards,

Carlos Ruiz

Fixed

Assignee

Carlos Ruiz

Reporter

Nicolas Micoud

Labels

Tested By

None

Components

Priority

Major