Bug 793253 (JBEPP-338)

Summary: OrganizationService failed to start when EPP5 is executed with different value of LANG environment variable
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: mposolda
Component: unspecifiedAssignee: Thomas Heute <theute>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.0.0.CR01CC: epp-bugs
Target Milestone: ---   
Target Release: 5.0.0.GA   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBEPP-338
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
EPP5 GA SNAPSHOT 100503, Sun JDK 1.6, Ubuntu 9.10, Embedded HSQLDB and MySQL 5 as databases
Last Closed: 2010-05-06 16:02:40 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:
Attachments:
Description Flags
lang_orgService-exception.txt none

Description mposolda 2010-05-06 12:12:32 UTC
project_key: JBEPP

Problem with OrganizationService occurs when EPP5 is executed with different LANG environment variables. Steps to reproduce:

1) export LANG=cs_CZ.UTF8
2) Start EPP5 against clean database (verified with default HSQLDB and with MySQL)
3) Wait until portal is started.
4) Kill portal
5) export LANG=en_US.UTF8
6) Start EPP5 again. Now portal is started but with exception in server log (Failed start Organization Service org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl, Caused by: java.text.ParseException: Unparseable date: "6.5.10 13:47" ). Full stacktrace is attached. Now EPP5 home page (/portal/public/classic) can be open but it's not possible to login because of OrganizationService failed to start.

I am not sure if this can be considered as bug or as a feature ( limitation that EPP5 should be always started with same LANG )

Comment 1 mposolda 2010-05-06 12:14:40 UTC
And when EPP5 is started with cs_CZ.UTF8 agains clean DB, then I am seeing this in MySQL database:

mysql> select * from jbid_io_attr, jbid_io_attr_text_values where jbid_io_attr.NAME='createdDate' and jbid_io_attr.ATTRIBUTE_ID=jbid_io_attr_text_values.TEXT_ATTR_VALUE_ID;
+--------------+--------------------+-------------+----------------+--------------+--------------------+--------------+
| ATTRIBUTE_ID | IDENTITY_OBJECT_ID | NAME        | ATTRIBUTE_TYPE | BIN_VALUE_ID | TEXT_ATTR_VALUE_ID | ATTR_VALUE   |
+--------------+--------------------+-------------+----------------+--------------+--------------------+--------------+
|           35 |                 18 | createdDate | text           |         NULL |                 35 | 6.5.10 13:04 | 
|           39 |                 19 | createdDate | text           |         NULL |                 39 | 6.5.10 13:04 | 
|           43 |                 20 | createdDate | text           |         NULL |                 43 | 6.5.10 13:04 | 
|           52 |                 21 | createdDate | text           |         NULL |                 52 | 6.5.10 13:04 | 
+--------------+--------------------+-------------+----------------+--------------+--------------------+--------------+


When EPP5  is started with en_US.UTF8 agains clean DB, then I am seeing this in MySQL database:

mysql> select * from jbid_io_attr, jbid_io_attr_text_values where jbid_io_attr.NAME='createdDate' and jbid_io_attr.ATTRIBUTE_ID=jbid_io_attr_text_values.TEXT_ATTR_VALUE_ID;
+--------------+--------------------+-------------+----------------+--------------+--------------------+----------------+
| ATTRIBUTE_ID | IDENTITY_OBJECT_ID | NAME        | ATTRIBUTE_TYPE | BIN_VALUE_ID | TEXT_ATTR_VALUE_ID | ATTR_VALUE     |
+--------------+--------------------+-------------+----------------+--------------+--------------------+----------------+
|           33 |                 18 | createdDate | text           |         NULL |                 33 | 5/6/10 1:24 PM | 
|           39 |                 19 | createdDate | text           |         NULL |                 39 | 5/6/10 1:24 PM | 
|           46 |                 20 | createdDate | text           |         NULL |                 46 | 5/6/10 1:24 PM | 
|           49 |                 21 | createdDate | text           |         NULL |                 49 | 5/6/10 1:24 PM | 
+--------------+--------------------+-------------+----------------+--------------+--------------------+----------------+


So format of saved data is dependent on environment variable LANG.

Comment 2 mposolda 2010-05-06 12:16:19 UTC
Attachment: Added: lang_orgService-exception.txt


Comment 3 Thomas Heute 2010-05-06 15:55:04 UTC
Link: Added: This issue is related to GTNPORTAL-1166


Comment 4 mposolda 2010-05-13 09:37:49 UTC
Retest OK with EPP5 GA signed version. I tested with HSQLDB and MySQL and I verified that date is daved in Picketlink DB as "long" now, so it's independent on Locale.