Mike Toler | 22 Apr 00:45 2011

JAVA sun.jnu.encoding ignored when process started from BP. Not when started manually

I have a java process that I am started by Linux HA.

I have create an OCF script called "BillingProcessor".

That script calls an outside script (pm.pl) which starts the process.

The JAVA command is shown here.   Note, I am including the
"-Dsun.jnu.encoding=UTF-8" directive.

java -Dsun.jnu.encoding=UTF-8 -cp
../lib/RSCBillingProcessor.jar:../lib/RSCBillingCollector.jar:../lib/fw_
alarms.jar:../lib/fw_app.jar:../lib/fw_base.jar:../lib/fw_comm.jar:../li
b/fw_config.jar:../lib/fw_dom4j.jar:../lib/fw_file.jar:../lib/fw_jdom.ja
r:../lib/fw_metaobject.jar:../lib/fw_staged.jar:../lib/fw_stats.jar:../l
ib/fw_util.jar:../lib/fw_xmpp.jar:../lib/3rdPartyLib/log4j.jar:../lib/3r
dPartyLib/jdom.jar:../lib/3rdPartyLib/jcore.jar:../lib/3rdPartyLib/commo
ns-cli-1.0.jar:../lib/3rdPartyLib/snmp.jar:../config
com.prodeasystems.rsc.bc.processor.BillingProcApp BP ../config/BP.xml

When I start the process using my script alone, I see:
sun.jnu.encoding = UTF-8

When it is started from Heartbeat, I see:
sun.jnu.encoding = ANSI_X3.4-1968

I can't for the life of me figure out HOW heartbeat can be causing this,
but it is 100% consistent over 4 installations on 3 OS's (Redhat 5.4,
Centos 5.4 and Centos 6.0).  The process started from the command line
has encoding of UTF-8.  The process started from heartbeat has
ANSI_X3.4-1968.
(Continue reading)

Dejan Muhamedagic | 26 Apr 16:54 2011

Re: JAVA sun.jnu.encoding ignored when process started from BP. Not when started manually

Hi,

On Thu, Apr 21, 2011 at 05:45:37PM -0500, Mike Toler wrote:
> I have a java process that I am started by Linux HA.
> 
> I have create an OCF script called "BillingProcessor".
> 
> That script calls an outside script (pm.pl) which starts the process.
> 
> The JAVA command is shown here.   Note, I am including the
> "-Dsun.jnu.encoding=UTF-8" directive.
> 
> java -Dsun.jnu.encoding=UTF-8 -cp
> ../lib/RSCBillingProcessor.jar:../lib/RSCBillingCollector.jar:../lib/fw_
> alarms.jar:../lib/fw_app.jar:../lib/fw_base.jar:../lib/fw_comm.jar:../li
> b/fw_config.jar:../lib/fw_dom4j.jar:../lib/fw_file.jar:../lib/fw_jdom.ja
> r:../lib/fw_metaobject.jar:../lib/fw_staged.jar:../lib/fw_stats.jar:../l
> ib/fw_util.jar:../lib/fw_xmpp.jar:../lib/3rdPartyLib/log4j.jar:../lib/3r
> dPartyLib/jdom.jar:../lib/3rdPartyLib/jcore.jar:../lib/3rdPartyLib/commo
> ns-cli-1.0.jar:../lib/3rdPartyLib/snmp.jar:../config
> com.prodeasystems.rsc.bc.processor.BillingProcApp BP ../config/BP.xml
> 
> When I start the process using my script alone, I see:
> sun.jnu.encoding = UTF-8
> 
> When it is started from Heartbeat, I see:
> sun.jnu.encoding = ANSI_X3.4-1968

See how? In the java process? Or with ps(1)? The latter would be
really strange.
(Continue reading)


Gmane