How to Fix 500 Error in Jira User Picker when profile language is set to Spanish
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
The User picker results in error 500 when the Profile language is set to Spanish in versions 8.19.0 and later. A bug ticket has been raised for this behaviour:
Environment
Jira 8.19.0 and later
Diagnosis
Profile language is set to Spanish.
Clicking on any user picker:
Go to User management → Groups
Bulk edit group members
Click on the user picker under 'Add members to selected group(s)' throws error 500.
Following error will be logged in atlassian-jira.log:
2021-11-24 16:42:03,388+0530 http-nio-48201-exec-13 ERROR admin 1002x3307x1 1wmzm6p 127.0.0.1 /secure/popups/UserPickerBrowser.jspa [o.a.c.c.C.[.[.[.[.secure.popups.userpicker_jsp]] Servlet.service() for servlet [jsp.secure.popups.userpicker_jsp] threw exception java.lang.IllegalArgumentException: can't parse argument number: {0 at java.base/java.text.MessageFormat.makeFormat(MessageFormat.java:1451) at java.base/java.text.MessageFormat.applyPattern(MessageFormat.java:491) at java.base/java.text.MessageFormat.<init>(MessageFormat.java:390) at com.atlassian.jira.i18n.BackingI18n.formatI18nMsg(BackingI18n.java:246) at com.atlassian.jira.i18n.BackingI18n.getText(BackingI18n.java:224) at com.atlassian.jira.web.tags.TextTag.doEndTag(TextTag.java:81) at jsp.secure.popups.userpicker_jsp._jspx_meth_ww_005ftext_005f2(userpicker_jsp.java:297) at jsp.secure.popups.userpicker_jsp._jspx_meth_ui_005fparam_005f0(userpicker_jsp.java:246) at jsp.secure.popups.userpicker_jsp._jspx_meth_ui_005fsoy_005f0(userpicker_jsp.java:205) at jsp.secure.popups.userpicker_jsp._jspService(userpicker_jsp.java:146) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:71) at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ... 48 filtered ... Caused by: java.lang.NumberFormatException: For input string: "{0" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.base/java.lang.Integer.parseInt(Integer.java:652) at java.base/java.lang.Integer.parseInt(Integer.java:770) at java.base/java.text.MessageFormat.makeFormat(MessageFormat.java:1449) ... 475 more
User will also be seeing error 500 from Jira's UI: "Sorry, we had some technical problems during your last operation."
Cause
The error is thrown when a translation for a key is being incorrectly rendered. In Spanish, while translating there are double curly brackets in the code, which are causing the error during rendering.
The message for Spanish translation is kept in jira-core-language-pack-es_ES-8.15.0.20210809004541.jar package.
Solution
ℹ️ Java Development Kit (JDK) is required to apply this workaround.
The solution for this bug is to remove doubled curly braces inside the mentioned Spanish translation file on the Jira instance.
For Linux
Stop Jira
Create a new folder and copy the jar file 'jira-core-language-pack-es_ES-8.15.0.20210809004541.jar' from $jira_install/atlassian-jira/WEB-INF/atlassian-bundled-plugins/ to the new directory.
Extract the contents of the jar 'jira-core-language-pack-es_ES-8.15.0.20210809004541.jar'. Users may use any tools (eg: Terminal/Zip tools) to extract the jar file.
From the extracted jar file, access <Extracted JAR folder>/com/atlassian/jira/web/action/ and open the JiraWebActionSupport_es_ES.properties' file with a text editor.
Search for 'userpicker.displayingusers', keyword in the file above and you should see 2 lines below:
userpicker.displayingusers=Mostrando usuarios del {0} al {1} de {2}. userpicker.displayingusers.brief=N.\u00ba de resultados encontrados\: <a href\="\#search-results">{{0,choice,0\#{{0}} resultados|1\#{{0}} resultado|1<{{0}} resultados}}</a>.
Remove the additional doubled curly braces from the second line above, which makes it look like:
userpicker.displayingusers.brief=N.\u00ba de resultados encontrados\: <a href\="\#search-results">{0,choice,0\#{0} resultados|1\#{0} resultado|1<{0} resultados}</a>.
Save the edited file.
Open a terminal and navigate to the folder where the "jira-core-language-pack-es_ES-8.15.0.20210809004541.jar" was extracted.
Recompile the files in the folder to a jar file using the command below:
jar uf jira-core-language-pack-es_ES-8.15.0.20210809004541.jar com
Copy the jar file into the $jira_install/atlassian-jira/WEB-INF/atlassian-bundled-plugins/folder
Start Jira ⚠️ Backup the language file before making modifications.
For Windows
Stop Jira
Create a new folder and copy the jar file 'jira-core-language-pack-es_ES-8.15.0.20210809004541.jar' from jira_install\atlassian-jira\WEB-INF\atlassian-bundled-plugins\ to the new directory.
Extract the contents of the jar 'jira-core-language-pack-es_ES-8.15.0.20210809004541.jar'. Users may use any tools (eg: Terminal/Zip tools) to extract the jar file.
From the extracted jar file, access <Extracted JAR folder>\com\atlassian\jira\web\action\ and open the
JiraWebActionSupport_es_ES.properties' file with a text editor.
Search for 'userpicker.displayingusers', keyword in the file above and you should see 2 lines below:
userpicker.displayingusers=Mostrando usuarios del {0} al {1} de {2}. userpicker.displayingusers.brief=N.\u00ba de resultados encontrados\: <a href\="\#search-results">{{0,choice,0\#{{0}} resultados|1\#{{0}} resultado|1<{{0}} resultados}}</a>.
Remove the additional doubled curly braces from the second line above, which makes it look like:
userpicker.displayingusers.brief=N.\u00ba de resultados encontrados\: <a href\="\#search-results">{0,choice,0\#{0} resultados|1\#{0} resultado|1<{0} resultados}</a>.
Save the edited file.
Open a terminal and navigate to the folder where the "jira-core-language-pack-es_ES-8.15.0.20210809004541.jar" was extracted.
Recompile the files in the folder to a jar file using the command below:
jar uf jira-core-language-pack-es_ES-8.15.0.20210809004541.jar com
Copy the jar file into the $jira_install/atlassian-jira/WEB-INF/atlassian-bundled-plugins/folder
Start Jira ⚠️ Backup the language file before making modifications.
Was this helpful?