Problems with Runtime.exec() and certain Unix processes

Certain Unix processes don't behave correctly when run from Java using Runtime.exec(). This can be seen by running /bin/sh and trying to interact with it interactively. The issue appears to be that /bin/sh (and many other Unix tools) are checking the file handles on the spawned process to see if they are associated with a TTY.
Is there any way to associate a process spawned by Runtime.exec() with a terminal or alternatively, is there a JNI library available that would setup the process correctly and still provide access to the input and output streams?
Our objective is to have the flexibility of expect in being able to run and interact with spawned processes. A bug was opened at one point but closed back in 1997 as being a fault in the spawned process, not Java.
Bug ID: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4058689

#include <stdio.h>
void doit() {
int c;
        while((c=getc(stdin)) != EOF) {
                printf("%c",c);
int main() {
        freopen("/dev/tty", "r", stdin);
        doit();
}This program reopens its standard input against /dev/tty and catenates it to stdout. And voila, it takes its standard input from the terminal, even though it was started with stdin against /dev/null..
$ gcc b.c -o b
$./b < /dev/null
buon giorno
buon giorno

Similar Messages

  • Problem with Runtime.exec()

    Hi,
    I'm having a problem with Runtime.exec() . I have a batch file with debug option to FTP the desktop file to mainframe. When I executed this in Windows it's shows me the responce from the server (like ' Transfer Completed' ) for my FTP commands. But when I launch this through java it's only shows the errors not the normal responces from the server. I need this responses to confirm the proper transfer of file.
    My Java Code:
    String strCommand = "cmd.exe /c " + outdirectory + batchfilename;
    boolean bWait = true;
    Runtime r = Runtime.getRuntime();
    Process pr = r.exec(strCommand);
    BufferedInputStream bis =new BufferedInputStream(pr.getInputStream ());
    int c=0;
    /** Outlet for IO for the process **/
    while (c!=-1) {
    c=bis.read();
    /**Now wait for the process to get finished **/
    if(bWait == true){
    pr.waitFor();
    pr.destroy();
    My Batch file is :
    FTP -n -d -s:C:\IT2.cmd > C:\tIT2.log
    EXIT
    Thanks
    Sathiesh

    Ahh, you are redirecting the standard out from the ftp command to a file, therefore no output is sendt back to your java code,
    you have to redirect the stderr stream, not the stdout stream in your batch file;
    FTP -n -d -s:C:\IT2.cmd 2> C:\tIT2.log(notice the "2>" instead of ">")
    Now your batch file should direct the error stream to the log, and the standard output back to the java program.
    (I'm used to UNIX streams, not NT, but the "2>" redirection should work on NT also I guess)

  • Problems with runtime.exec()

    Hi All,
    I am having a problem using runtime.exec()
    in servlet to call a java file from the server.The server is a linux one and i am using a tomcat server-4.1.24 the server contains
    some java files which i need to invoke with the help of the servlet program so i try to use exec() in servlet to invoke a particular java file in the server.The program is compiling well but no information
    is displayed on the browser.Where in the servlet program i try to print the details of the particular java program that is in the server.For ur
    reference i will post the code :-
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.io.*;
    public class ExeServlet extends HttpServlet
    public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException
    try
    String path = getServletContext().getRealPath("/var/jakarta/webapps/examples/WEB-INF/classes/ServletExample.java");
    /*Where it is the path of the java file that resides in the server machine(linux)Which i want to invoke and print its details on the browser*/
    Runtime runtime=Runtime.getRuntime();
    Process proc=runtime.exec(path );
    BufferedReader br=new BufferedReader(new InputStreamReader(proc.getInputStream()));
    res.setContentType("text/html");
    PrintWriter pw=res.getWriter();
    pw.println("<b>");
    String line=null;
    while((line=br.readLine())!=null)
    { pw.println(line); //Displaying the details of the ServletExample.java file in the browser
    pw.println("</b>");
    catch (Exception e)
    pw.println("Listener *not* started!");
    What is the problem here?I was so frustrated with this.Pls. do provide an immediate reply if there is any code regarding this is working pls. do provide it.It is Urgent.I will be waiting for ur reply.
    Thanx,
    m.ananthu

    Hi Leo,
    Thank u for the reply i still have the problem with exec() in servlets.Has i said earlier in my previous mail by using exec() i trying to execute the output of a c-program for eg,Hello.run which provides an output of "HelloWorld" which is a sample eg.The Hello.run is the directory /var/jakarta/webapps/examples/WEB-INF/classes which is also the directory where my servlet program is.Where i am using a tomcat server-4.1.24 on the linux machine 7.3.Which is the server ofcourse.
    Here by using a servlet program i try to exceute the Hello.run c-program and display the output in the browser.This is what i need to do.
    I also used a sample core java class put the exec() there in a method and i try to call the method in the servlet.Which is also not working.
    Here is that example :-
    The core java program:-
    public class UsingExec
    public String ExeDisplay()
         try
    System.out.println("ExeDisplay");
         Runtime rt=Runtime.getRuntime();
         Process p=rt.exec("/var/jakarta/webapps/examples/WEB-INF/classes/Hello.run");
    p.waitFor();
    return "true";
         catch(Exception e)
    return "false";
    public static void main(String args[])
    UsingExec ue=new UsingExec();
    ue.ExeDisplay();
    When i run this program only ExeDisplay at the top is displayed.
    Here is the Servlet program:-
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.io.*;
    public class ExeServlet extends HttpServlet
    public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException
    try
    res.setContentType("text/html");
    PrintWriter pw=res.getWriter();
    UsingExec ue=new UsingExec();
    String line=ue.ExeDisplay();
    pw.println(line);
    catch (Exception e)
    When i display this program on the browser only "false" is displayed from the UsingExec.java & nothing is displayed.
    Thanx,
    m.ananthu

  • Any problem with Runtime.exec()

    I am required to launch a local exe from an applet. At present I am using AppletContext.showDocument().The problem with this is that in netscape a box is popped up forcing the user to save that exe file. The requirwment is to run it directly without any message being asked.
    A workaround is to use Runtime.exec(), it works, however I have heard that it is not platform independent.
    (1) Is there a better solution than Runtime.exec() ?
    (2) If not could you give me some info on Runtime.exec() and the problems associated with it ?
    (3) Is there a way to use AppletContext.showDocument() without the message being asked ?
    Shikari.

    First of all, Java is platform independent language, and has many security restriction in it's applets.
    so from an applet you can't excute a program using "Runtime.getRuntime().exec()".
    coz. there is security restriction on that.
    for the "AppletContext.showDocument()" this methid is for displaying the specified document on the client browser, so it can't excute a client program.
    if u need to use Runtime.getRuntime().exec() you have to get the client agreement for that.
    see the applet security restriction for more info.

  • UNIX script with Runtime.exec and ssh

    I am trying to run a script that is on a UNIX server which doesn't require a password to connect to. Here's my code:
    String _cmd = new String("ssh -l root mach01 \"(/projects/examples/findsw java)\"");
    Process proc = Runtime.getRuntime().exec(_cmd);
    InputStreamReader is = new InputStreamReader(proc.getErrorStream());
    BufferedReader br = new BufferedReader(is);     
    String line = null;
    while ( (line = br.readLine()) != null)
    _logger.error(line);
    proc.waitFor();
    The error outputs:
    ERROR [Thread-7] beans.RunScript - sh: (/projects/examples/findsw java): not found
    INFO [Thread-7] beans.RunScript - _proc.exitValue() = 1
    When I execute _cmd directly from xterm, I have no problems.
    Thanks

    Runtime.exec is not a shell and doesn't run a shell. Try
    adding something like "/bin/sh -c" or whatever shell you use to the beginning of the command.
    BYe!
    EXP

  • Problem with runtime.exec().It hangs Up

    Hi all,
    I am having a problem with the runtime.exec method.I am trying to execute linux commands using this method.For most of the commands it works fine.But when i tried to change the user with the su command in linux my program hung up.So please help me to get around this.any help would be highly appreciable..
    I am pasting the code..
    <code>
    Process p=null;
    int ch=0;
    try
    System.out.println("Before executing command");
    String unlock_command="sh changeuser.sh";
    p = Runtime.getRuntime().exec(new String[] {"/bin/sh","-c","su tony"});
    InputStreamReader myIStreamReader = new InputStreamReader(p.getInputStream());
    while ((ch = myIStreamReader.read()) != -1)
    System.out.print((char)ch);
    p.waitFor();
    int p_exitvalue = p.exitValue();
    System.out.println("After executing the command and the exit value = "+p_exitvalue);
    p.destroy();
    catch (IOException anIOException)
    System.out.println(anIOException);
    catch(Exception e)
    e.printStackTrace();
    </code>
    Thanks
    HowRYou

    Hi sabre,
    What you have pointed out is right.But if i change the user as root then it will not ask for a password.Isn't it.Anyway thank you for giving your suggestions.Can yoiu help me more.Waiting for all of your help.I will try to swoitch between different users othere than root by giving the password.So just help me.

  • InputStream problem with Runtime.exec

    Dear all,
    I am writing a java application which is executing an external program (through threads). I am trying to read the output of that program while is in execution. Anyway i found out that InputStreamReader is not ready unless enough output of program is coming or the program exits.
    I simplified things writing the following small C program:
    main(){
    printf("Just a print\n");
    for(;;){} //Or anything that might keep program in execution
    So i am trying to find out why i cant get the output of this program unless it exits. Is this a problem with the underlying Stream? Is there any workaround?
    Thanks for any help.

    You are right. The C code is that of an external program that i am trying to execute and get its output. Actually i am working on a bigger program that it prints Directories recursively. To keep things simpler i used that simple C program to explain my problem.
    The code i am using is the following:
    /* WindowsExec.java */
    import java.io.*;
    public class WindowsExec
         response std_out,std_err;
         public WindowsExec(){
         try{
         String[] cmd = new String[]{"dark.exe"};
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(cmd);
    std_out = new response(proc.getInputStream(),System.out);          std_err = new response(proc.getErrorStream(),System.err);
    std_out.start();
         std_err.start();     
    int exitVal = proc.waitFor();
    System.out.println("ExitValue: " + exitVal);
                   proc.destroy();
         } catch (Throwable t){
              t.printStackTrace();
    public static void main(String args[]){
              new WindowsExec();
    /* Response.java */
    import java.io.*;
    class response extends Thread
         InputStream is;
         PrintStream type;
         public response(InputStream is, PrintStream type){
              this.is = is;
              this.type = type;
         public void run(){
         try{
              InputStreamReader isr = new InputStreamReader(is);
    while(true){
    if(isr.ready()){
    System.out.println("Its ready!"); //HERE!!!
              break;     
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    while ( (line = br.readLine()) != null){
    System.out.println(line);
                   isr.close();
                   is.close();
              catch (Exception ioe){
    ioe.printStackTrace();
    Notice that i am never getting isr.ready() = true!

  • Help with Runtime class and timeout of Process

    Hi,
    Question regarding using Runtime class, and yes I have looked at the javadocs, but I am still confused and frustrated.
    Here is part of my code.
    Process p;
    Runtime runtime = Runtime.getRuntime();
    p = runtime.exec("rsh localhost ls");
    if you are not familiar with rsh all it does is remote shell into the computer localhost and executes the command ls.
    Now, I dont have rsh running on my computer so it will hang at that line for about 40 sec and eventually time out on its own. Is there anyway I can specify a timeout argument like there is for the ping command? Like if there is no response from localhost after 3 sec, then just kill the process?
    I looked at the Runtime javadoc and Process javadoc and the closest thing I could come to with is something to do with envp (environment parameters), but I dont know what that is.
    Thanks guys.

    You can't timeout the "runtime.exec("rsh localhost ls");" call but if you execute the call in a seperate thread you can "timeout" and continue executing on the original thread (while letting the "runtime" thread to timeout on its own).
    Check the following class that I created for cases like this:
    abstract public class TimeoutHelper implements Runnable
        private Throwable error;
        private boolean running = true;
        private Object retValue;
        protected String name;
        private long waitTime;
        private Thread thread;
         * Creates a new helper. Use {@link #start} to run the code.
         * @param name A name that will be used in the helper thread name
         * @param waitTime The time (in msec) to wait before timeout.
        public TimeoutHelper(String name, long waitTime)
            this.name = name;
            this.waitTime = waitTime;
        public Object start() throws Throwable
            return asyncExecute();
        abstract protected Object execute() throws Throwable;
        private synchronized Object asyncExecute() throws Throwable
            createThread().start();
            if (running)
                try
                    wait(waitTime);
                    if (running)
                        // Timeout!!
                        abortThread();
                        throw new TimeOutException("Timeout for: " + name);
                catch (InterruptedException ie)
                    // Ignore
            if (error != null)
                throw error;
            return retValue;
        private void abortThread()
            if (thread != null)
                thread.interrupt();
        protected Thread createThread()
            thread = new Thread(this, name);
            return thread;
        public void run()
            try
                retValue = execute();
            catch (Throwable th)
                error = th;
            synchronized (this)
                running = false;
                notifyAll();
    }You use the class by extending it and implementing "execute". For example:
            TimeoutHelper helper = new TimeoutHelper("Runner", 5000)
                protected Object execute() throws Throwable
                    Runtime runtime = Runtime.getRuntime();
                    return runtime.exec("rsh localhost ls");
            try
                Process p = (Process)helper.start();
            catch (TimeOutException e)
                // Handle timeout here
            catch (Exception e)
                // Handle other errors here.
            }

  • Problems with Runtime.exec inside OC4J in OAS!!! help!!

    Hi all,
    I have a method on my webapplication and the same call a script .cmd on windows and a .sh on unix using Runtime.exec command, inside this script have a call to a java program ie.
    java JMSAdmin < jcajms.txt
    OK, this is fine in OC4J Standalone 10.1.3 in windows and linux but in OAS 10.1.3 the same not run and not throw any error. Its is a BUG ?? limitation ?? OAS ignore a call to another java ??
    please help.
    Tanks

    Normally, you must prepend the command with a call to the command shell (eg /bin/sh).
    But I suspect that this call isn't allowed due to Java EE specification restrictions.

  • Newbie problem with "Runtime exec" "OutputStream"

    I am running an external process (Oracle Sqlplus) from a simple GUI using "Runtime exec". My problem is that I'm only able to retrieve input from the process after the Java output stream is closed. If I don't close the output stream my application does nothing. As soon as I close the output stream the input from the external process is printed to the screen and the external process is killed.
    I want to be able to start the external process once and then send and receive multiple input and output streams to it without having to stop and restart the process. Currently the only way to retrieve input from the process is to close the Java output stream which closes the process.
    Is this possible? Am I doing something wrong?
    I am new to Java so I appreciate your help.
    My code is below. I am running it on Windows 2000 Workstation, Java 1.4.1, Oracle 8.1.7.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    class ProcessTest extends JFrame implements ActionListener {
        private JTextArea upperTextArea;
        private JTextArea lowerTextArea;
        private BufferedReader in;
        private BufferedWriter out;
        public ProcessTest() {
            initialiseComponents();
            setBounds(200, 200, 600, 400);
            setVisible(true);
        public void initialiseComponents() {
            Container contentP = getContentPane();
            contentP.setLayout(new BorderLayout());
            upperTextArea = new JTextArea("SELECT SYSDATE FROM DUAL;\n");
            lowerTextArea = new JTextArea();
            JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                                                  new JScrollPane(upperTextArea),
                                                  new JScrollPane(lowerTextArea));
            splitPane.setDividerLocation(200);                                     
            JPanel buttonPanel = new JPanel();
            JButton runButton = new JButton("Start Process");
            runButton.addActionListener(this);
            JButton outputButton = new JButton("Write Output");
            outputButton.addActionListener(this);
            JButton flushButton = new JButton("Flush Output");
            flushButton.addActionListener(this);
            JButton closeOutputButton = new JButton("Close Output");
            closeOutputButton.addActionListener(this);
            JButton inputButton = new JButton("Read Input");
            inputButton.addActionListener(this);
            buttonPanel.add(runButton);
            buttonPanel.add(outputButton);
            buttonPanel.add(flushButton);
            buttonPanel.add(closeOutputButton);
            buttonPanel.add(inputButton);
            contentP.add(buttonPanel, BorderLayout.NORTH);
            contentP.add(splitPane, BorderLayout.CENTER);
        public void startProcess() {
            try {
                Process process = Runtime.getRuntime().exec("sqlplus -S " +
                                                             "scott/tiger");
                in = new BufferedReader(new InputStreamReader(
                                         process.getInputStream()));
                out = new BufferedWriter(new OutputStreamWriter(
                                          process.getOutputStream())); 
                System.out.println("Process Started.");                         
            catch(IOException e) {
                e.printStackTrace();
        public void writeOutput() {
            try {
                out.write(upperTextArea.getText().toCharArray());
                System.out.println("Output Write Completed.");
            catch (IOException e) {
                e.printStackTrace();
        public void flushOutput() {
            try {
                out.flush();
                System.out.println("Output Flush Completed.");
            catch (IOException e) {
                e.printStackTrace();
        public void closeOutput() {
            try {
                out.close();
                System.out.println("Output Close Completed.");
            catch (IOException e) {
                e.printStackTrace();
        public void readInput() {
            try {
                lowerTextArea.read(in, lowerTextArea);
                System.out.println("Input Read Completed.");
            catch (IOException e) {
                e.printStackTrace();
        public void actionPerformed(ActionEvent e) {
            String action = e.getActionCommand();
            if (action.equalsIgnoreCase("start process")) {
                Thread thread1 = new Thread(){
                    public void run(){
                        startProcess();
                thread1.start();
            else if (action.equalsIgnoreCase("write output")) {
                Thread thread2 = new Thread(){
                    public void run(){
                        writeOutput();
                thread2.start();
            else if (action.equalsIgnoreCase("flush output")) {
                Thread thread3 = new Thread(){
                    public void run(){
                        flushOutput();
                thread3.start();
            else if (action.equalsIgnoreCase("close output")) {
                Thread thread4 = new Thread(){
                    public void run(){
                        closeOutput();
                thread4.start();
            else if (action.equalsIgnoreCase("read input")) {
                Thread thread5 = new Thread(){
                    public void run(){
                    readInput();
                thread5.start();
        public static void main(String[] args) {
            new ProcessTest();
    }   

    At this point, I'm not getting the same results as you. I'm executing cmd.exe w/o args, and using the text area to do multiple directory listings in one go -- so far, the input thread has been able to keep up. Try copying & pasting the following below (I made a few changes to it). If it still doesn't work, it might help to know what operating system you're on, jdk version, etc..
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    class ProcessTest extends JFrame implements ActionListener {
        private BufferedReader in;
        private BufferedWriter out;
        private JTextArea upperTextArea;
        private JTextArea lowerTextArea;
        private ProcInThread pit;
        private class ProcInThread extends Thread {
            private BufferedReader in;
            private char[] cbuf = new char[8192];
            private int numRead;
            ProcInThread(BufferedReader in) {
                this.in = in;
            public void run() {
                Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
                do {
                    try {
                        numRead = in.read(cbuf, 0, cbuf.length);
                        if (numRead < 0) System.out.println("\n***END OF STREAM***\n"); // <-DEBUG CODE
                    } catch (IOException ex) {
                        ex.printStackTrace();
                    SwingUtilities.invokeLater(new Runnable() {
                        public void run() {
                            lowerTextArea.append(new String(cbuf, 0, numRead));
                } while (numRead != -1);
                try {
                    in.close();
                } catch (IOException e) {
                    e.printStackTrace();
        public ProcessTest() {
            initialiseComponents();
            setBounds(200, 200, 600, 400);
            setVisible(true);
        public void initialiseComponents() {
            Container contentP = getContentPane();
            contentP.setLayout(new BorderLayout());
            upperTextArea = new JTextArea("dir\ndir\ndir\ndir\ndir\ndir\ndir\n");
            lowerTextArea = new JTextArea();
            JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                                                  new JScrollPane(upperTextArea),
                                                  new JScrollPane(lowerTextArea));
            splitPane.setDividerLocation(200);
            JPanel buttonPanel = new JPanel();
            JButton runButton = new JButton("Start Process");
            runButton.addActionListener(this);
            JButton outputButton = new JButton("Write Output");
            outputButton.addActionListener(this);
            JButton flushButton = new JButton("Flush Output");
            flushButton.addActionListener(this);
            JButton closeOutputButton = new JButton("Close Output");
            closeOutputButton.addActionListener(this);
            JButton inputButton = new JButton("Read Input");
            inputButton.addActionListener(this);
            buttonPanel.add(runButton);
            buttonPanel.add(outputButton);
            buttonPanel.add(flushButton);
            buttonPanel.add(closeOutputButton);
            buttonPanel.add(inputButton);
            contentP.add(buttonPanel, BorderLayout.NORTH);
            contentP.add(splitPane, BorderLayout.CENTER);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        public void startProcess() {
            try {
                Process process = Runtime.getRuntime().exec("cmd.exe");
                in = new BufferedReader(new InputStreamReader(
                                         process.getInputStream()),8192);
                out = new BufferedWriter(new OutputStreamWriter(
                                          process.getOutputStream()),8192);
                pit = new ProcInThread(in);
                pit.start();
                System.out.println("Process Started.");
            catch(IOException e) {
                e.printStackTrace();
        public void writeOutput() {
            try {
                out.write(upperTextArea.getText().toCharArray());
                System.out.println("Output Write Completed.");
            catch (IOException e) {
                e.printStackTrace();
        public void flushOutput() {
            try {
                out.flush();
                System.out.println("Output Flush Completed.");
            catch (IOException e) {
                e.printStackTrace();
        public void closeOutput() {
            try {
                out.close();
                System.out.println("Output Close Completed.");
            catch (IOException e) {
                e.printStackTrace();
        public void readInput() {
        public void actionPerformed(ActionEvent e) {
            String action = e.getActionCommand();
            if (action.equalsIgnoreCase("start process")) {
                Thread thread1 = new Thread(){
                    public void run(){
                        startProcess();
                thread1.start();
            else if (action.equalsIgnoreCase("write output")) {
                Thread thread2 = new Thread(){
                    public void run(){
                        writeOutput();
                thread2.start();
            else if (action.equalsIgnoreCase("flush output")) {
                Thread thread3 = new Thread(){
                    public void run(){
                        flushOutput();
                thread3.start();
            else if (action.equalsIgnoreCase("close output")) {
                Thread thread4 = new Thread(){
                    public void run(){
                        closeOutput();
                thread4.start();
            else if (action.equalsIgnoreCase("read input")) {
                Thread thread5 = new Thread(){
                    public void run(){
                    readInput();
                thread5.start();
        public static void main(String[] args) {
            new ProcessTest();
    }

  • Problem with Runtime.exec() method

    Hi All,
    tring _cmd = "cmd /c ";
              cmd =cmd+"sqlldr ";
              cmd = cmd + " userid=" + userId + "/" + passwd + "@"+ tnsEntry;
    cmd = cmd + " control=" + controlFilePath;
              cmd = cmd + " log=sql.log skip=1";
              System.out.println(_cmd);
         try{
                             Runtime r = Runtime.getRuntime();
                             Process process = r.exec(_cmd);
                             int exitVal = process.waitFor();
    System.out.println("Process exitValue:********** " + exitVal);
                   catch(RuntimeException re )
                        System.out.println("Failed to runtime run the process.123.."+re);
    I ve used proc.exitValue() to print the value of int value
    but i got exception
    then i used proc.waitFor() and print the value of int I got value = 4
    here it is
    Process exitValue:= 4
    could u please tell me what does it mean? how to solve if the value is 4?
    Thanks in advance

    Please don't cross-post, it is extremely rude.
    Stick with the [original thread|http://forums.sun.com/thread.jspa?threadID=5329691&tstart=0].

  • A problem with "Runtime.exec"

    Hello!
    I'm just trying to call a Fortran executable in a Java program.
    I'm a beginner in Java language and I believed Runtime.exec was the solution. My code :
    try {
    Process process = null;
    Runtime runtime = Runtime.getRuntime();
    process = runtime.exec("<name>.exe");
    catch (IOException eio) {
    System.out.println("Error -- " + eio.toString());
    When I run the project, there's no error, but the executable is not called.
    Can anybody help me?

    process = runtime.exec("Make sure// you have the right// path to.exe");

  • Problem with Runtime.exec(gcc -c...

    when I execute
    P=Runtime.exec("cmd.exe /C gcc -c file.c");
    I do not have any problem but ,I do not obtain the corresponding file .o
    Somebody can help me, please?

    Are you checking the command is running. Unless you read the output of the process you will not see any errors.
    try
         public static void main(String[] args) throws IOException, InterruptedException {
              Process p1 = Runtime.getRuntime().exec("cmd.exe /C echo hello");
              System.out.println("Exit code = " + p1.waitFor());
              // produces an error.
              Process p2 = Runtime.getRuntime().exec("cmd.exe /C dontecho hello");
              System.out.println("Exit code = " + p2.waitFor());
         }

  • Major Problem with regExp.exec and regExp.test

    I'm a programmer, and I'm using regExp's to simplify my life in a chat thing.
    Basically, ":blue:" in a chat will essentially be replaced with "<span style='color:blue;'>".
    because there can be all sorts of colors, I can't use replace.
    Instead, I used regExp.exec(string). However, there is a major bug where every other time, the regExp.exec returns null even if there IS a match.
    If the chat is ":blue:", the response will alternate as :blue:,null,:blue:,null,etc.
    If the chat is ":blue: :red:" (e.g. two color blocks) the response will go :blue:,null,null,:blue:,null,null and so on.
    Basically, if there are 'x' color blocks defined, the .exec will work every x+1 times, and the other times it will not find a match.
    this also happens with regExp.test.
    I have gone through my code hundreds of times, and finally, I decided to run it in Opera. It works PERFECTLY fine. even in IE, it works. So i had to assume it was some bug with Firefox.
    I hope this question catches the attention of the MOZILLA DEVELOPERS, as this is huge.
    I'm not sure if it's just me. However, I have uploaded an html file onto http://jsbattle.tablocks.com/Untitled-1.html (the subdomain had a different purpose, but i figured i would put it here), and it will alert :blue: and null (at least for me). You can view the source code.
    An important note is that this .exec and .test glitch only happens inside functions. for example, regExp.exec twice just in a script tag will run fine, but while in a function abc() {regExp.exec} and executing abc(); abc(); it'll glitch out.
    I have not run extensive tests to see when this glitch occurs, this is all I know.
    Please help, Mozilla Developers. And if anyone knows how to contact the Mozilla Developers, tell me, or address them of this issue.

    Ok ... it's the 'g' flag but with IE don't occours

  • Problem with Runtime Workbench and with sending data from XI to SLD

    Hello<br>
    <br>
    Could I have a little help, a hint in the two following topics:<br>
    <br>
    1. I run Runtime Workbench -> Component Monitoring -> Display All and I get this error:<br>
    <br>
    Error during communication with System Landscape Directory: User credentials are invalid or user is denied access<br>
    <br>
    In filesystem log I can find like this:<br>
    <br>
    XIRWB.com.sap.aii.mdt.frames.jsp_error [SAPEngine_Application_Thread[impl:3]_40] Fatal: Error during communication with System Landscape Directory: User credentials are invalid or user is denied access<br>
    Thrown:<br>
    MESSAGE ID: com.sap.aii.rwb.agent.server.rb_LCRAgent.landscapeCommunicationError<br>
    com.sap.aii.rwb.exceptions.BuildLandscapeException: Error during communication with System Landscape Directory: User <br>credentials are invalid or user is denied access
            at com.sap.aii.rwb.agent.server.SLDAgentBean.convertException(SLDAgentBean.java:1472)
            at com.sap.aii.rwb.agent.server.SLDAgentBean.buildSLD(SLDAgentBean.java:773)
            at com.sap.aii.rwb.agent.server.SLDAgentBean.provideSld(SLDAgentBean.java:269)
            at com.sap.aii.rwb.agent.server.SLDAgentBean.getXIDomain(SLDAgentBean.java:711)
            at com.sap.aii.rwb.agent.api.SLDAgentObjectImpl0_0.getXIDomain(SLDAgentObjectImpl0_0.java:375)
            at com.sap.aii.rwb.agent.api.SLDAgent_Stub.getXIDomain(SLDAgent_Stub.java:436)
            at com.sap.aii.rwb.agent.client.EJBAgent.getXIDomain(EJBAgent.java:255)
            at com.sap.aii.rwb.util.web.model.AppMainModel.getSelectedDomain(AppMainModel.java:138)
            at com.sap.aii.rwb.util.web.model.DomainRep.build(DomainRep.java:121)
            at com.sap.aii.rwb.web.componentmonitoring.model.ObjectIdentificationTree.getComponentTree(ObjectIdentificationTree.java:117)<br>
            at jsp_component_monitoring1321125174985._jspService(jsp_component_monitoring1321125174985.java:217)
            at com.sap.engine.services.servlets_jsp.server.jsp.JspBase.service(JspBase.java:112)
            at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:544)
            at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:186)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:321)
            at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:377)
            at com.sapportals.htmlb.page.PageProcessorServlet.handleRequest(PageProcessorServlet.java:68)
            at com.sapportals.htmlb.page.PageProcessorServlet.doGet(PageProcessorServlet.java:29)
            at com.sap.aii.rwb.web.componentmonitoring.viewcontroller.CmPageProcessor.doGet(CmPageProcessor.java:27)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:321)
            at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:377)
            at jsp_FC_Secure1321125169379._jspService(jsp_FC_Secure1321125169379.java:24)
            at com.sap.engine.services.servlets_jsp.server.jsp.JspBase.service(JspBase.java:112)
            at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:544)
            at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:186)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
            at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
            at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
            at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
            at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
            at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
            at java.security.AccessController.doPrivileged(AccessController.java:219)
            at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
            at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)<br>
    Root cause:<br>
    com.sap.lcr.api.cimclient.UnauthorizedUserException: User credentials are invalid or user is denied access<br>
            at com.sap.lcr.api.cimclient.HttpRequestSender.processResponse(HttpRequestSender.java:577)
            at com.sap.lcr.api.cimclient.HttpRequestSender.send(HttpRequestSender.java:341)
            at com.sap.lcr.api.cimclient.CIMOMClient.send(CIMOMClient.java:280)
            at com.sap.lcr.api.cimclient.CIMOMClient.performBatchOperation(CIMOMClient.java:1251)
            at com.sap.lcr.api.cimclient.CIMClient.performBatchOperation(CIMClient.java:2268)
            at com.sap.aii.utilxi.sld.MRSldProxy.stage1(MRSldProxy.java:989)
            at com.sap.aii.utilxi.sld.MRSldProxy.loadComponents(MRSldProxy.java:918)
            at com.sap.aii.utilxi.sld.MRSldProxy.loadSld(MRSldProxy.java:907)
            at com.sap.aii.utilxi.sld.SubSystemFactory.createSldFromSld(SubSystemFactory.java:373)
            at com.sap.aii.utilxi.sld.SubSystemFactory.createSldFromSld(SubSystemFactory.java:434)
            at com.sap.aii.rwb.agent.server.SLDAgentBean.buildSLD(SLDAgentBean.java:764)
            at com.sap.aii.rwb.agent.server.SLDAgentBean.provideSld(SLDAgentBean.java:269)
            at com.sap.aii.rwb.agent.server.SLDAgentBean.getXIDomain(SLDAgentBean.java:711)
            at com.sap.aii.rwb.agent.api.SLDAgentObjectImpl0_0.getXIDomain(SLDAgentObjectImpl0_0.java:375)
            at com.sap.aii.rwb.agent.api.SLDAgent_Stub.getXIDomain(SLDAgent_Stub.java:436)
            at com.sap.aii.rwb.agent.client.EJBAgent.getXIDomain(EJBAgent.java:255)
            at com.sap.aii.rwb.util.web.model.AppMainModel.getSelectedDomain(AppMainModel.java:138)
            at com.sap.aii.rwb.util.web.model.DomainRep.build(DomainRep.java:121)
            at <br>com.sap.aii.rwb.web.componentmonitoring.model.ObjectIdentificationTree.getComponentTree(ObjectIdentificationTree.java:117)
            at jsp_component_monitoring1321125174985._jspService(jsp_component_monitoring1321125174985.java:217)
            at com.sap.engine.services.servlets_jsp.server.jsp.JspBase.service(JspBase.java:112)
            at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:544)
            at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:186)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:321)
            at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:377)
            at com.sapportals.htmlb.page.PageProcessorServlet.handleRequest(PageProcessorServlet.java:68)
            at com.sapportals.htmlb.page.PageProcessorServlet.doGet(PageProcessorServlet.java:29)
            at com.sap.aii.rwb.web.componentmonitoring.viewcontroller.CmPageProcessor.doGet(CmPageProcessor.java:27)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:321)
            at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:377)
            at jsp_FC_Secure1321125169379._jspService(jsp_FC_Secure1321125169379.java:24)
            at com.sap.engine.services.servlets_jsp.server.jsp.JspBase.service(JspBase.java:112)
            at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:544)
            at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:186)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
            at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
            at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
            at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
            at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
            at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
            at java.security.AccessController.doPrivileged(AccessController.java:219)
            at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
            at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    <br>
    <br>
    <br>
    I don't know what is wrong.<br>
    I have configured:<br>
    - SLDCHECK work properly,<br>
    - none of the users PI* type not lock,<br>
    - password to the PI* users in exchangeProfile entered correctly,<br>
    - In VA in the JCo RFC Provider I have properly configure: AI_RUNTIME_JCOSERVER, LCRSAPRFC, SAPSLDAPI_SID - from the ABAP I can connect to this programs ID<br>
    - In VA in SLD Data Supplier I have properly configure bookmarks HTTP Settings and CIM Client Generation Settings. CIMClient Test is OK<br>
    <br>
    I do not know what else I can see, what else I have properly configured ... I looked at the notes:: 936093 jak i 721548...<br>
    <br>
    <br>
    2. I can't send data from XI to SLD, ie makes me a system definition in Web As Abap and Web as Java but nothing appear to me in Exchange Infrastructure. Exchange Infrastructure is empty - what is wrong??<br>
    I carried out the recommendation by 764176 and 1031321 notes<br>
    <br>
    I restart below applications (no effect)...<br>
    com.sap.xi.directory (Integration Builder/Configuration)<br>
    com.sap.aii.af.app (Adapter Engine)<br>
    com.sap.xi.rwb (Runtime Workbench)<br>
    com.sap.xi.repository (Integration Builder/Design)<br>
    <br>
    Can I ask for help and guidance in these topics?<br>
    <br>
    Regards<br>
    RP<br>

    I increased logging in the NWA (Configuration -> Log Configuration) - and increased the some things here to log ALL. So that from the NWA (Monitoring -> Logs and Traces) I see a little more information (but does not follow that with which the user is a problem).<br>
    <br>
    Here are some interesting logs ...<br>
    I was most rash or irritation of those that say about the lack of credentials u2013 I must use Viusal Administrator and set good service ...<br>
    <br>
    What do I have done:<br>
    In the Visual Administrator -> Cluster -> Server -> Services -> SLD Data Supplier<br>
    I have set in the HTTP Settings tab the host and port SLD, the user name and password is also entered as it is in the SLD. To be sure, already have set for the user entered here such roles as:<br>
    SAP_SLD_ADMINISTRATOR<br>
    SAP_SLD_CONFIGURATOR<br>
    SAP_SLD_DEVELOPER<br>
    SAP_SLD_GUEST<br>
    SAP_SLD_ORGANIZER<br>
    Maybe we are talking in this place about a different user?<br>
    <br>
    Similarly, when it comes to tab CIM Client Generation Settings - here's all the same thing done. CIMClient test shows that everything is OK.<br>
    When I click the button: This trigger the transfer of data to the SLD gets the message that everything was shipped correctly. Indeed, I received an instance of JAVA in SLD<br>
    Also clicked on this icon: Assign application roles to user group - got information that everything is attached properly.<br>
    <br>
    By ABAP side, the connections: INTEGRATION_DIRECTORY_HMI, SAPSLDAPI, LCRSAPRFC, AI_RUNTIME_JCOSERVER and AI_DIRECTORY_JCOSERVER work correctly, ie I can perform the test - which means that programs ID are properly positioned in JCO Provider in VA.<br>
    <br>
    Puzzling is this message:<br>
    The SLD data is inconsistent.<br>
    <br>
    Strange also that the message (from the ABAP everything is available in SMGW no errors):<br>
    Connect to SAP gateway failed<br>
    <br>
    And what is this error:<br>
    <br>
    could not sync ExchangeProfile: <br>
    Thrown:<br>
    com.sap.rprof.dbprofiles.DBException: Connect to SAP gateway failed<br>
    Connect_PM  TYPE=A ASHOST=saptest2 SYSNR=60 GWHOST=saptest2 GWSERV=sapgw60 PCS=1<br>
    <br>
    LOCATION    CPIC (TCP/IP) on local host with Unicode<br>
    ERROR       partner 'saptest2:sapgw60' not reached<br>
    TIME        Thu Feb 23 07:28:07 201<br>
    RELEASE     700<br>
    COMPONENT   NI (network interface)<br>
    VERSION     38<br>
    RC          -10<br>
    MODULE      nixxi.cpp<br>
    LINE        2513<br>
    DETAIL      NiPConnect<br>
    SYSTEM CALL connect<br>
    ERRNO       79<br>
    ERRNO TEXT  A remote host refused an attempted connect operation.<br>
    COUNTER     2<br>
    <br>
    <br>
    Below is a list of some interesting logs ...<br>
    <br>
    ###########<br>
    <br>
    Insufficient permissions for getting SLD access information. You can add permissions for your application via the SLD service in the 'Visual Administrator'.<br>
    <br>
    #############<br>
    <br>
    SLD is not accessible. Check SLD Data Supplier service settings.<br>
    <br>
    ###########<br>
    <br>
    "Warning","2012-02-22","07:53:50:986","Data get on com.sap.sldserv.data.GetSAPBCCentralServiceInstance class processing failed. htThe SLD data is inconsistent. This is an internal processing problem.","/System/Server/SLDService","com.sap.sldserv.DataCollector","n/a","saptest2","Server 0 60_36694",<br>
    <br>
    #########<br>
    <br>
    com.sap.lcr.api.cimclient.UnauthorizedUserException: User credentials are invalid or user is denied access<br>
    <br>
    ################<br>
    <br>
    Full Message Text
    CPA Cache not updated with directory data, due to: Couldn't open Directory URL (http://saptest2.unx.era.pl:56000/dir/hmi_cache_refresh_service/ext?method=CacheRefresh&mode=C&consumer=af.xit.saptest2), due to: HTTP 503: Service Unavailable
    <br>
    ##################<br>
    <br>
    Full Message Text <br>
    <br>
    could not sync ExchangeProfile: <br>
    Thrown:<br>
    com.sap.rprof.dbprofiles.DBException: Connect to SAP gateway failed<br>
    Connect_PM  TYPE=A ASHOST=saptest2 SYSNR=60 GWHOST=saptest2 GWSERV=sapgw60 PCS=1<br>
    <br>
    LOCATION    CPIC (TCP/IP) on local host with Unicode<br>
    ERROR       partner 'saptest2:sapgw60' not reached<br>
    TIME        Thu Feb 23 07:28:07 201<br>
    RELEASE     700<br>
    COMPONENT   NI (network interface)<br>
    VERSION     38<br>
    RC          -10<br>
    MODULE      nixxi.cpp<br>
    LINE        2513<br>
    DETAIL      NiPConnect<br>
    SYSTEM CALL connect<br>
    ERRNO       79<br>
    ERRNO TEXT  A remote host refused an attempted connect operation.<br>
    COUNTER     2<br>
    <br>
    Connect_PM  TYPE=A ASHOST=saptest2 SYSNR=60 GWHOST=saptest2 GWSERV=sapgw60 PCS=1<br>
    <br>
    LOCATION    CPIC (TCP/IP) on local host with Unicode<br>
    ERROR       partner 'saptest2:sapgw60' not reached<br>
    TIME        Thu Feb 23 07:28:07 201<br>
    RELEASE     700<br>
    COMPONENT   NI (network interface)<br>
    VERSION     38<br>
    RC          -10<br>
    MODULE      nixxi.cpp<br>
    LINE        2513<br>
    DETAIL      NiPConnect<br>
    SYSTEM CALL connect<br>
    ERRNO       79<br>
    ERRNO TEXT  A remote host refused an attempted connect operation.<br>
    COUNTER     2<br>
    <br>
    at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:457)<br>
    at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:1015)<br>
    at com.sap.mw.jco.JCO$Client.connect(JCO.java:3238)<br>
    at com.sap.rprof.dbprofiles.DBProfiles.getProfile(DBProfiles.java:101)<br>
    at com.sap.rprof.dbprofiles.RemoteProfile.readRemoteProfileFromMedia(RemoteProfile.java:1288)<br>
    at com.sap.rprof.dbprofiles.RemoteProfile.getRemoteProfileFromFactory(RemoteProfile.java:195)<br>
    at com.sap.aii.utilxi.prop.rprof.ExchangeProfilePropertySource.readProfile(ExchangeProfilePropertySource.java:177)<br>
    at com.sap.aii.utilxi.prop.rprof.ExchangeProfilePropertySource.sync(ExchangeProfilePropertySource.java:165)<br>
    at com.sap.aii.utilxi.misc.api.AIIProperties.sync(AIIProperties.java:582)<br>
    at com.sap.aii.af.service.sld.SLDAccess.syncExchangeProfile(SLDAccess.java:43)<br>
    at com.sap.aii.adapter.xi.ms.SLDReader.fire(SLDReader.java:52)<br>
    at com.sap.aii.adapter.xi.ms.SLDReader.run(SLDReader.java:167)<br>
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)<br>
    at java.security.AccessController.doPrivileged(AccessController.java:219)<br>
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)<br>
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)<br>
    <br>
    ##############<br>
    <br>
    Full Message Text <br>
    <br>
    Import of software component version list from component repository  failed<br>
    Thrown:<br>
    com.sap.lcr.api.cimclient.LcrException: User credentials are invalid or user is denied access<br>
    at com.sap.lcr.api.cimclient.HttpRequestSender.processResponse(HttpRequestSender.java:577)<br>
    at com.sap.lcr.api.cimclient.HttpRequestSender.send(HttpRequestSender.java:341)<br>
    at com.sap.lcr.api.cimclient.CIMOMClient.sendImpl(CIMOMClient.java:198)<br>
    at com.sap.lcr.api.cimclient.CIMOMClient.send(CIMOMClient.java:146)<br>
    at com.sap.lcr.api.cimclient.CIMOMClient.enumerateInstancesImpl(CIMOMClient.java:443)<br>
    at com.sap.lcr.api.cimclient.CIMOMClient.enumerateInstances(CIMOMClient.java:747)<br>
    at com.sap.lcr.api.cimclient.CIMClient.enumerateInstances(CIMClient.java:980)<br>
    at com.sap.lcr.api.sapmodel.JavaCIMObjectAccessor.enumerateInstances(JavaCIMObjectAccessor.java:211)<br>
    at com.sap.lcr.api.sapmodel.SAP_SoftwareComponentAccessor.enumerateInstances(SAP_SoftwareComponentAccessor.java:204)<br>
    at com.sap.lcr.api.sapmodel.SAP_SoftwareComponentAccessor.enumerateSAP_SoftwareComponentInstances(SAP_SoftwareComponentAccessor.java:239)<br>
    at com.sap.aii.ibrep.server.sldaccess.interfaces.CRAccess.getSwcLinks(CRAccess.java:82)<br>
    at com.sap.aii.ibrep.server.extobjects.SwcAccessor.getEoLinks(SwcAccessor.java:59)<br>
    at com.sap.aii.ib.server.extobjects.EOAServiceImpl.getEoLinks(EOAServiceImpl.java:75)<br>
    at com.sap.aii.ib.sbeans.extobjects.EOAServiceBean.getEoLinks(EOAServiceBean.java:66)<br>
    at com.sap.aii.ib.sbeans.extobjects.EOAServiceRemoteObjectImpl1_0.getEoLinks(EOAServiceRemoteObjectImpl1_0.java:527)<br>
    at com.sap.aii.ib.sbeans.extobjects.EOAServiceRemoteObjectImpl1_0p4_Skel.dispatch(EOAServiceRemoteObjectImpl1_0p4_Skel.java:232)<br>
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)<br>
    at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)<br>
    at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)<br>
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)<br>
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)<br>
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)<br>
    at java.security.AccessController.doPrivileged(AccessController.java:219)<br>
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)<br>
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)<br>
    <br>
    ##############<br>
    <br>
    Full Message Text <br>
    <br>
    An exception was thrown in the UME/ABAP user management connector. Message: Connect to SAP gateway failed<br>
    Connect_PM  TYPE=A ASHOST=localhost SYSNR=60 GWHOST=localhost GWSERV=sapgw60 PCS=1<br>
    <br>
    LOCATION    CPIC (TCP/IP) on local host with Unicode<br>
    ERROR       partner '127.0.0.1:sapgw60' not reached<br>
    TIME        Thu Feb 23 07:28:06 201<br>
    RELEASE     700<br>
    COMPONENT   NI (network interface)<br>
    VERSION     38<br>
    RC          -10<br>
    MODULE      nixxi.cpp<br>
    LINE        2513<br>
    DETAIL      NiPConnect<br>
    SYSTEM CALL connect<br>
    ERRNO       79<br>
    ERRNO TEXT  A remote host refused an attempted connect operation.<br>
    COUNTER     16<br>
    <br>

Maybe you are looking for