Menu

#10 Startup under AIX 7.1 fails due to StringIndexOutOfBoundsException

Any
closed
nobody
AIX (1)
5
2015-04-18
2015-02-16
No

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

1 Attachments

Discussion

  • rzo

    rzo - 2015-04-18
    • status: open --> open-accepted
     
  • rzo

    rzo - 2015-04-18

    thanks for the patch.
    it will be included in the next release 12.01

     
  • rzo

    rzo - 2015-04-18
    • status: open-accepted --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.