One of our customer has filed the issue that YAJSW fails to start under AIX 7.1
During startup this exection is thrown:
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56) at java.lang.reflect.Method.invoke(Method.java:620) at org.rzo.yajsw.boot.WrapperExeBooter.main(WrapperExeBooter.java:43) Caused by: java.lang.StringIndexOutOfBoundsException at java.lang.String.substring(String.java:1256) at org.rzo.yajsw.os.posix.bsd.BSDProcess.getCurrentJava(BSDProcess.java:258) at org.rzo.yajsw.os.posix.bsd.BSDProcess.start(BSDProcess.java:61) at org.rzo.yajsw.wrapper.AbstractWrappedProcess.startInternal(AbstractWrappedProcess.java:1053) at org.rzo.yajsw.wrapper.AbstractWrappedProcess.start(AbstractWrappedProcess.java:923) at org.rzo.yajsw.wrapper.WrappedProcessList.startAll(WrappedProcessList.java:11) at org.rzo.yajsw.WrapperExe.doConsole(WrapperExe.java:605) at org.rzo.yajsw.WrapperExe.executeCommand(WrapperExe.java:206) at org.rzo.yajsw.WrapperExe.main(WrapperExe.java:181)
It seems that the implementation of BSDProcess always expects a space in the output of the ps command.
Instead it returns:
>ps -p 5701806 -o command COMMAND java
I'd like to suggest the following patch based on version 11.11. Maybe the substring operation above in this class (cmd.indexOf("\" ")
) should be treated in a similar way.
Additionally I could provide you the PS man page of AIX 7.1 if you are interested
thanks for the patch.
it will be included in the next release 12.01