When starting JBoss as a service $LANG is not preserved

Solution Unverified - Updated -

Issue

  • The Java system property of sun.jnu.encoding being set to ANSI_X3.4-1968 on prod and UTF-8 on non-prod.  The issue is caused by the way that JBoss is started.  If "/etc/init.d/jboss start" is called manually then it works fine (which is how JBoss is usually started on non-prod), but if it is started through "/sbin/service Jboss start" then it doesn't.  I read that java determines the value of sun.jnu.encoding from the $LANG variable.   Calling /etc/init.d/jboss directly results in $LANG being set to en_US.UTF_8, but when it is called through /sbin/service then it is set to nothing/blank. 

Environment

  • JBoss Enterprise Application Platform (EAP) 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content