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

Document ID : KB000047019
Last Modified Date : 14/02/2018
Show Technical Document Details

 Symptoms:

Trying to access Jaspersoft login page getting error 500 caused by es_419 and can't login but is working fine in Firefox and IE.

2016-09-30 13:16:02,844 ERROR [http-8091-1] [xxx.xxx.container.ContainerResponse] logException Mapped exception to response: 500 (Internal Server Error)
 -- referer: http://test.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.xxx.server.impl.model.HttpHelper.clientError(HttpHelper.java:265)
    at com.sun.xxx.server.impl.model.HttpHelper.getAcceptLanguage(HttpHelper.java:222)
    at com.sun.xxx.server.impl.VariantSelector.selectVariant(VariantSelector.java:290)
    at com.sun.xxx.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.xxx.core.header.LanguageTag.parse(LanguageTag.java:122)
    at com.sun.xxx.core.header.AcceptableLanguageTag.<init>(AcceptableLanguageTag.java:69)
    at com.sun.xxx.core.header.reader.HttpHeaderReader$8.create(HttpHeaderReader.java:418)
    at com.sun.xxx.core.header.reader.HttpHeaderReader$8.create(HttpHeaderReader.java:416)
    at com.sun.xxx.core.header.reader.HttpHeaderReader.readList(HttpHeaderReader.java:465)
    at com.sun.xxx.core.header.reader.HttpHeaderReader.readList(HttpHeaderReader.java:457)
    at com.sun.xxx.core.header.reader.HttpHeaderReader.readAcceptableList(HttpHeaderReader.java:436)
    at com.sun.xxx.core.header.reader.HttpHeaderReader.readAcceptLanguage(HttpHeaderReader.java:423)
    at com.sun.xxx.server.impl.model.HttpHelper.getAcceptLanguage(HttpHelper.java:220)
    ... 151 more

Environment: 

Jaspersoft 6.2

GoogleChrome version 48.x,--> 53.x


Cause: 

 If Spanish - Latin America (es-419) is selected as the preferred language in Chrome browser this error can occur and at the moment Jaspersoft is compatible with English Language in Chrome.

Resolution:

In Chrome, in the right corner on top please navigate to

1) Settings
2) under Languages click on "Language and Input Settings"
3) 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.
4) Click on "DONE"
5)Delete Google Chrome cache

Note: if issue remains, delete also chache from  Jaspersoft Tomcat by deleting "catalina" folder.
         Example path: C:\Program Files\Apache Software Foundation\Tomcat 8.0\Work