IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Execution of a shell by a java service failed

    Posted 02/20/03 03:36 PM

    Hi all,

    I have created a java service that executes a shell (we’re currently running in version 4.0.1). This shell (test.sh) contains this code : echo “toto1” > test.txt
    And this is my java service :

    java.lang.String cmds = new String[1];
    cmds[0] = “/applis/ExchangeFolder/test.sh”;

    // execute the command
    try
    {
    Process pr = Runtime.getRuntime().exec(cmds);
    }
    catch(Exception e)
    {
    System.out.println("Execution du test "+e.getMessage());
    }

    When I run it, the audit.log tells me it’s OK but there’s no file test.txt created ! Have I missed something ? Or is there another way to do it ?

    Any help is highly appreciated! Thanks,

    Phil


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Execution of a shell by a java service failed

    Posted 02/20/03 03:54 PM

    Possibly a file creation persmission issue?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Execution of a shell by a java service failed

    Posted 02/20/03 04:00 PM

    You’d probably get a service exception if there were a file permission problem.

    Do you know where the file is supposed to be located? Usually when you don’t specify an absolute path the file goes under the webMethods server install directory basepath. Try doing a search for the file.

    Will Kriski


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 4.  RE: Execution of a shell by a java service failed

    Posted 02/20/03 05:21 PM

    You’re right Will, I have found the file under the webMethods server install directory basepath.
    But I’m sure it was’nt here at the beginning of my tests.
    But there happened an important thing during the afternoon : the jvm has been updated (and nobody told me…). So it’s perhaps the explanation for the change…
    Thank you, Rob and Will,

    Phil.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB