#9 Exception thrown when no OS command is given

closed
Nikita
Bug (17)
5
2011-10-08
2011-10-04
Michael
No

An ArrayIndexOutOfBoundsException is thrown if you put a comment or simply don't write a command in the attribute "text" for a <command> element for an OS type command in a schema xml file.

i.e for this in schema xml:
<command>
<attr name="type" value="OS"/>
<attr name="signal" value="PRE_GEN"/>
<attr name="label" value="Create DB"/>
<attr name="text">

</attr>
</command>

you get:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at java.lang.Runtime.exec(Runtime.java:610)
at java.lang.Runtime.exec(Runtime.java:448)
at java.lang.Runtime.exec(Runtime.java:345)
at com.ibm.dg.parsing.commands.OSCommand.run(OSCommand.java:43)
at com.ibm.dg.DataGenerator.runCommands(DataGenerator.java:758)
at com.ibm.dg.DataGenerator.generatorRun(DataGenerator.java:298)
at com.ibm.dg.DataGeneratorCLI.main(DataGeneratorCLI.java:24)

Discussion

  • Nikita

    Nikita - 2011-10-05
    • assigned_to: nobody --> npchelin
     
  • Nikita

    Nikita - 2011-10-08

    fixed

     
  • Nikita

    Nikita - 2011-10-08
    • status: open --> closed