[jboss-jira] [JBoss JIRA] (AS7-4301) JBOSS 7.1.1 turkish locale problem at startup

Kabir Khan (JIRA) jira-events at lists.jboss.org
Thu Apr 5 10:07:47 EDT 2012


    [ https://issues.jboss.org/browse/AS7-4301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682093#comment-12682093 ] 

Kabir Khan commented on AS7-4301:
---------------------------------

Setting the following seems to set the locale. 
{code}
export LANG=tr_TR.UTF-8
export LC_ALL=tr_TR.UTF-8
{code}
I've fixed all the occurrances in the AS code base to use String.toUpperCase(Locale) and String.toLowerCase(Locale) and am currently running the tests with these settings set. There are however, lots of occurrances of the non-Locale varieties of these methods in third party projects, both JBoss ones and from elsewhere.



                
> JBOSS 7.1.1 turkish locale problem at startup
> ---------------------------------------------
>
>                 Key: AS7-4301
>                 URL: https://issues.jboss.org/browse/AS7-4301
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Domain Management
>    Affects Versions: 7.1.1.Final
>         Environment: Windows 7 x64
> Java 1.6 update 26
> Locale: Turkish
>            Reporter: Serkan Yıldırım
>            Assignee: Brian Stansberry
>              Labels: locale, server, toUpperCase
>             Fix For: 7.1.2.Final-redhat1
>
>
> Hi,
> When i run standalone.bat with turkish locale, i got exception below. If I change locale to english, it starts with no problem. However, it is not a good solution to give locale as parameter at startup I think. Our environment works in Turkish locale for example. We want JBOSS AS to run in turkish locale also.
> When i looked at the exception, i saw that in ThreadsParser class at line 882, there is a code piece like:
> 882   unit = Enum.valueOf(TimeUnit.class, value.toUpperCase());
> At this line in upperCase method, 'i' is converted to capital letter I with dot above when locale is turkish due to information at "http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/String.html#toUpperCase%28java.util.Locale%29"
> Therefore enum is not found and we got exception. If we give locale english as parameter to jboss as at startup, conversion is done correctly at the code above and enum is found.
> Calling "D:\Development\Servers\jboss-as-7.1.1.Final\bin\standalone.conf.bat"
> ===============================================================================
>   JBoss Bootstrap Environment
>   JBOSS_HOME: D:\Development\Servers\jboss-as-7.1.1.Final
>   JAVA: C:\Program Files (x86)\Java\jdk1.6.0_26\bin\java
>   JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.
> rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djb
> oss.server.default.config=standalone.xml -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
> ===============================================================================
> Listening for transport dt_socket at address: 8787
> 13:42:59,798 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA
> 13:43:00,496 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA
> 13:43:00,532 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
> 13:43:02,146 ERROR [org.jboss.as.server] JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceExcepti
> on: JBAS014676: Failed to parse configuration
>         at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:141) [jboss-as-controller-7.1.1.Final.jar
> :7.1.1.Final]
>         at org.jboss.as.server.ServerService.boot(ServerService.java:266) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
>         at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:155) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Fina
> l]
>         at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
> Caused by: java.lang.IllegalArgumentException: No enum const class java.util.concurrent.TimeUnit.M¦LL¦SECONDS
>         at java.lang.Enum.valueOf(Enum.java:196) [rt.jar:1.6.0_26]
>         at org.jboss.as.threads.ThreadsParser.parseTimeSpec(ThreadsParser.java:874)
>         at org.jboss.as.threads.ThreadsParser.parseUnboundedQueueThreadPool(ThreadsParser.java:518)
>         at org.jboss.as.ejb3.subsystem.EJB3Subsystem12Parser.parseThreadPools(EJB3Subsystem12Parser.java:1103)
>         at org.jboss.as.ejb3.subsystem.EJB3Subsystem12Parser.readElement(EJB3Subsystem12Parser.java:297)
>         at org.jboss.as.ejb3.subsystem.EJB3Subsystem12Parser.readElement(EJB3Subsystem12Parser.java:55)
>         at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
>         at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
>         at org.jboss.as.server.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:894) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
>         at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_1(StandaloneXml.java:330) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
>         at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:127) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
>         at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:100) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
>         at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
>         at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
>         at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:133) [jboss-as-controller-7.1.1.Final.jar
> :7.1.1.Final]
>         ... 3 more
> 13:43:02,160 FATAL [org.jboss.as.server] JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
> 13:43:02,179 INFO  [org.jboss.as] JBAS015950: JBoss AS 7.1.1.Final "Brontes" stopped in 2ms
> Press any key to continue . . .

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jboss-jira mailing list