Bug 973030

Summary: Exception on login page when user logs in with locale different from "en" or "es"
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jan Hrcek <jhrcek>
Component: BAMAssignee: David Gutierrez <dgutierr>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Hrcek <jhrcek>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: rrajasek, rzhang
Target Milestone: ER2   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The login page was trying to get a bundle for the system. Consequence: Bundle not found raises an exception. Fix: Read the bundle in one of the application supported locales. Result: The login page is displayed in the default supported locale (english)
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:08:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Exception on login page
none
Server log with exception none

Description Jan Hrcek 2013-06-11 06:14:56 UTC
Created attachment 759436 [details]
Exception on login page

Description of problem:
On a system, where system language is set to something different then EN (english) or ES (Spanish) the following exception is thrown when going to login page of dashbuilder:

09:41:50,237 WARN  [org.apache.catalina.authenticator] (http-/127.0.0.1:8080-1) JBWEB000008: Unexpected error forwarding to login page: 

org.apache.jasper.JasperException: java.util.MissingResourceException: Can't find bundle for base name org.jboss.dashboard.login, locale cs_CZ





Version-Release number of selected component (if applicable):
Dashbuilder DR5 on EAP 6.1

How reproducible:
Always on system with different locale

Steps to Reproduce:
1. Setup different system language in you operating system (e.g. czech)
2. Deploy the dashbuilder build DR5 on JBoss EAP 6.1 GA
3. Navigate to login page (http://localhost:8080/bam-app/ in the productized DR5 build)

Actual results:
The exception is shown (see printscreen and server log attached)

Expected results:
The login page should be displayed.

Additional info:

The exception is caused by line:
ResourceBundle i18nBundle = ResourceBundle.getBundle("org.jboss.dashboard.login");

in the file dashboard-builder/modules/dashboard-showcase/src/main/webapp/login.jsp

Because only 2 resource files are present in dashboard-builder/modules/dashboard-showcase/src/main/resources/org/jboss/dashboard:

login_en.properties  login_es.properties

Comment 1 Jan Hrcek 2013-06-11 06:17:23 UTC
Created attachment 759437 [details]
Server log with exception

Comment 2 David Gutierrez 2013-07-05 16:18:17 UTC
The application supports a specified list of locales (See dashboard-builder/modules/dashboard-commons/src/main/java/org/jboss/dashboard/LocaleManager.java). It also defines a default locale. No matter what is the locale of the host machine where it's installed, the app will always use the supported locales. 

Github commit: https://github.com/droolsjbpm/dashboard-builder/commit/454199b56d9ac362c97927c8c596f476a198cf12

Comment 3 David Gutierrez 2013-07-16 14:43:50 UTC
Currently only the english (default) and spanish languages are supported.
For the BPMS 6 release we'll support other languages such as Japanase or German.

From the user perspective you can start a session in a given language by invoking dashbuilder with the following URL: http://host:port?locale=en (it accepts any of the supported locales: en, en_US, es, ja, etc).

Comment 4 Jan Hrcek 2013-09-06 08:20:43 UTC
Verified with BPMS 6.0.0.ER2