Stopping a thread from a java upoc

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Stopping a thread from a java upoc

  • Creator
    Topic
  • #52643
    Ian Morris
    Participant

      Does anyone know how to stop a thread from a Java upoc?  We have a java proc that is running the following command.  However, it’s not stopping our thread.

      Here’s the command:

      Code:


      String command = “hcicmd -p medi_omni1 -c lawson_dft_IC500 pstop'”;
         try {
      System.out.println(”IC500 Java:  Running command:” + command);
      Process child = Runtime.getRuntime().exec(command);
         } catch (IOException e) {
      e.printStackTrace();
      }

      Here’s the engine output

      Code:


      IC500 Java:  Running command:hcicmd -p medi_omni1 -c lawson_dft_IC500 pstop’
      IC500 Java: We will CONTINUE the message because value of test is false
      (RESEND_OB_MSG/meditech_dft_send1) Called with invalid context!
      (RESEND_OB_MSG/meditech_dft_send1) Should be REPLY GENERATION only
      (RESEND_OB_MSG/meditech_dft_send1) Continuing msg.
      [cmd :cmd :INFO/0:medi_omni1_cmd:08/12/2011 13:48:35] Receiving a command
      [cmd :cmd :INFO/0:medi_omni1_cmd:08/12/2011 13:48:35] Received command: ‘lawson_dft_IC500’
      [cmd :cmd :INFO/0:medi_omni1_cmd:08/12/2011 13:48:35] Cmd null in ‘lawson_dft_IC500’
      [cmd :cmd :INFO/0:medi_omni1_cmd:08/12/2011 13:48:35] Receiving a command
      [cmd :cmd :INFO/0:medi_omni1_cmd:08/12/2011 13:48:35] Command client went away.  Closing connection.

    Viewing 4 reply threads
    • Author
      Replies
      • #74960
        Jim Kosloskey
        Participant

          I don’t drink the java but it looks like you have an unpaired ‘ in your command.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #74961
          Ian Morris
          Participant

            Jim Kosloskey wrote:

            I don’t drink the java but it looks like you have an unpaired ‘ in your command.

            I understand what you are saying, but we’ve tried a variety of quote combinations and none of them have worked.  We’re using that one because it looks like it ends up like this in the engine:

            [cmd :cmd :INFO/0:medi_omni1_cmd:08/12/2011 13:48:35] Received command: ‘lawson_dft_IC500’

            [cmd :cmd :INFO/0:medi_omni1_cmd:08/12/2011 13:48:35] Cmd null in ‘lawson_dft_IC500’

          • #74962
            David Barr
            Participant

              I think you’re missing a single quote before the word lawson.

              Also, Cloverleaf sometimes does funny things with stdout and stderr from within UPOCs. I’d try adding 2>&1 or 1>&2 to the end of your command to see if that gets any additional information in the process log.

              You could also try looking at child.exitValue() and child.getErrorStream() for additional error information.

            • #74963
              David Barr
              Participant

                Ian Morris wrote:

                [cmd :cmd :INFO/0:medi_omni1_cmd:08/12/2011 13:48:35] Received command: ‘lawson_dft_IC500’

                [cmd :cmd :INFO/0:medi_omni1_cmd:08/12/2011 13:48:35] Cmd null in ‘lawson_dft_IC500’

                This message looks like “lawson_dft_IC500” and “pstop” were passed in two separate parameters. They need to be in one parameter. That’s why you need the single quotes around ‘lawson_dft_IC500 pstop’.

              • #74964
                Rehman Masood
                Participant

                  What you have should work, but just for giggles, try stopping thru hcienginestop?

              Viewing 4 reply threads
              • The forum ‘Cloverleaf’ is closed to new topics and replies.