Using Chrome, Getting 500 Internal Server Error due to ParseException es-419 is not a Valid Language Tag

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Using the Chrome browser, certain functionality in Confluence can cause an Internal Server Error and throw a "java.text.ParseException" in the log files.

The following appears in the atlassian-confluence.log:

2013-07-11 11:04:37,844 ERROR [http-8091-1] [jersey.spi.container.ContainerResponse] logException Mapped exception to response: 500 (Internal Server Error)
 -- referer: http://confluence.example.com:8091/display/FOO/FOO+Home | url: /rest/mywork/latest/status/notification/count | userName: anonymous
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)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
...
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.readList(HttpHeaderReader.java:457)
    at com.sun.jersey.core.header.reader.HttpHeaderReader.readAcceptableList(HttpHeaderReader.java:436)
    at com.sun.jersey.core.header.reader.HttpHeaderReader.readAcceptLanguage(HttpHeaderReader.java:423)
    at com.sun.jersey.server.impl.model.HttpHelper.getAcceptLanguage(HttpHelper.java:220)
    ... 151 more

Cause

If Spanish - Latin America (es-419) is selected as the preferred language in Chrome browser this error can occur.  This bug is tracked here and has been resolved in Confluence 5.5.4.

Workaround

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.

Resolution

Upgrade to Confluence 5.5.6 or newer. CONF-29922 - Getting issue details... STATUS

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.