|
From: Christian M. <chr...@ta...> - 2013-03-12 07:45:54
|
Hi,
thank you very much for your report. I will take a look into this.
However a very simple workaround would be refraining from null characters
in a String. If you know the String might contain a null character, maybe
you could try replacing the null character like this:
new String(byteArray).replace('\0', ' ')
So this way all occurrences of a null character in the String is getting
replaced with a space character instead.
Best Regards,
Christian Mueller
Tanuki Software, Ltd.
On Tue, Mar 12, 2013 at 3:37 PM, aaah ah <aa1...@gm...> wrote:
> Hi,
> Some of my debug log has null character, and in linux logs after null
> character will missing.
>
> I test the problem in Centos 5.8, JDK 1.6.0_27
> The problem happen in wrapper version >=3.4.0
>
> What can I do now?
>
> Here is a sample code:
>
> ============================
> *package pkg.test;*
> *
> *
> *public class TestWrapper {*
> * public static void main(String[] args) {*
> * String text = "AEF98352DAB3D";*
> * byte[] byteArray = new byte[32];*
> * System.arraycopy(text.getBytes(), 0, byteArray, 0, text.length());*
> * System.out.println("the log after this line will missing: " + new
> String(byteArray));*
> * System.out.println("this log will missing");*
> * }*
> *}*
> =============================
>
> wrapper configuration:
>
> ============================
> *wrapper.working.dir=.*
> *wrapper.java.command=java*
> *wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp*
> *wrapper.java.classpath.1=.*
> *wrapper.java.classpath.2=./TestWrapper.jar*
> *wrapper.java.classpath.3=./wrapper.jar*
> *wrapper.java.library.path.1=.*
> *
> *
> *wrapper.app.parameter.1=pkg.test.TestWrapper
> *
> *
> *
> *wrapper.console.format=PM*
> *wrapper.console.loglevel=INFO*
> *wrapper.logfile=output.log*
> *wrapper.logfile.format=PM*
> *wrapper.logfile.loglevel=INFO*
> *wrapper.logfile.maxsize=5m*
> *wrapper.logfile.maxfiles=50*
> *wrapper.syslog.loglevel=NONE*
> *wrapper.console.flush=FALSE*
>
> ====================================
>
>
> ------------------------------------------------------------------------------
> Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
> Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
> endpoint security space. For insight on selecting the right partner to
> tackle endpoint security challenges, access the full report.
> http://p.sf.net/sfu/symantec-dev2dev
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
|