500 Internal Server Error due to ParseException es-419 is not a valid language tag

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

Symptoms

Certain functionality in JIRA can cause an Internal Server Error and throw a java.text.ParseException in the log files.

The following appears in the atlassian-jira.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2013-06-12 09:33:46,648 http-bio-9060-exec-11 ERROR admin 573x398x1 15465ge 127.0.0.1 /rest/project-templates/1.0/templates [jersey.spi.container.ContainerResponse] Mapped exception to response: 500 (Internal Server Error) javax.ws.rs.WebApplicationException: java.text.ParseException: String, es-419, is not a valid language tag at com.sun.jersey.server.impl.model.HttpHelper.clientError(HttpHelper.java:265) at com.sun.jersey.server.impl.model.HttpHelper.getAcceptLanguage(HttpHelper.java:222) at com.sun.jersey.server.impl.VariantSelector.selectVariant(VariantSelector.java:290) at com.sun.jersey.spi.container.ContainerRequest.selectVariant(ContainerRequest.java:679) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <+2> (NativeMethodAccessorImpl.java:39) (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) <+1> (WebApplicationImpl.java:287) at com.sun.proxy.$Proxy1948.selectVariant(Unknown Source) <+3> (Status.java:347) (SecurityExceptionMapper.java:23) (SecurityExceptionMapper.java:15) at com.sun.jersey.spi.container.ContainerResponse.mapException(ContainerResponse.java:452) <+5> (WebApplicationImpl.java:1406) (WebApplicationImpl.java:1349) (WebApplicationImpl.java:1339) (WebComponent.java:416) (ServletContainer.java:537) ... Caused by: java.text.ParseException: String, es-419, is not a valid language tag at com.sun.jersey.core.header.LanguageTag.parse(LanguageTag.java:122) at com.sun.jersey.core.header.AcceptableLanguageTag.<init>(AcceptableLanguageTag.java:69) at com.sun.jersey.core.header.reader.HttpHeaderReader$8.create(HttpHeaderReader.java:418) at com.sun.jersey.core.header.reader.HttpHeaderReader$8.create(HttpHeaderReader.java:416) at com.sun.jersey.core.header.reader.HttpHeaderReader.readList(HttpHeaderReader.java:465) at com.sun.jersey.core.header.reader.HttpHeaderReader.readAcceptableList(HttpHeaderReader.java:436) at com.sun.jersey.core.header.reader.HttpHeaderReader.readAcceptLanguage(HttpHeaderReader.java:423) <+1> (HttpHelper.java:220)  

Cause

This error can be caused by a bug in JIRA if Spanish - Latin America (es-419) is selected as the preferred language in Chrome browser.

Work-around

  • In Chrome, please navigate to Preferences > Language and Input Settings > Ensure that Spanish (Latin America) is not the preferred language by making sure it is not at the top of the list of user languages.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.