Reading native process standard output stream with ProcessBuilder

Hi,
I'd like to launch an native process (windows application) which writes on standard output during its running.
I'd like to view my application output on a JTextArea on my Java frame (Swing). But I do get all process output
on text area only when the process is finished (it takes about 20 seconds to complete). My external process is
launched by using a ProcessBuilder object.
Here is my code snippet with overridden doInBackground() and process() methods of ProcessBuilder class:
@Override
public String doInBackground() {
jbUpgrade.setEnabled(false);
ProcessBuilder pb = new ProcessBuilder();
paramFileName = jtfParameter.getText();
command = "upgrade";
try {
if (!(paramFileName.equals(""))) {
pb.command(command, jtfRBF.getText(), jtfBaseAddress.getText(), "-param", paramFileName);
} else {
pb.command(command, jtfRBF.getText(), jtfBaseAddress.getText());
pb.directory(new File("."));
pb.redirectErrorStream(false);
p = pb.start();
try {
InputStream is = p.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line;
jtaOutput.setText("");
while ((line = br.readLine()) != null) {
publish(line);
} catch (IOException ex) {
Logger.getLogger(CVUpgradeFrame.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(CVUpgradeFrame.class.getName()).log(Level.SEVERE, null, ex);
jtaOutput.setText("");
jtaOutput.setLineWrap(true);
jtaOutput.append("Cannot execute requested commmad:\n" + pb.command());
jtaOutput.append("\n");
jtaOutput.setLineWrap(false);
return "done";
@Override
protected void process(List<String> line) {
jtaOutput.setLineWrap(true);
Iterator<String> it = line.iterator();
while (it.hasNext()) {
jtaOutput.append(it.next() + newline);
jtaOutput.repaint();
//Make sure the new text is visible, even if there
//was a selection in the text area.
jtaOutput.setCaretPosition(jtaOutput.getDocument().getLength());
How can I get my process output stream updated while it is running and not only when finished?
Thanks,
jluke

1) Read the 4 sections of http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html and implement the recommendations. Although it is concerned with Runtime.exec() the recommendations still apply to Process generated by ProcessBuilder.
2) Read about concurrency in Swing - http://java.sun.com/docs/books/tutorial/uiswing/concurrency/ .
3) Use SwingUtilities.invokeLater() to update your GUI.

Similar Messages

  • Exec() - G77 Fortran blocks read(*,*)  until Java closes output stream.

    This is my first post!
    I have a program in fortran using G77 from GNU. When I start the program and write to the output stream I have to close() the stream for the message to arrive at the other end. G77 seems to need Java to close the stream for the message to be sent.
    Then, the stream is forever closed and can not be re-obtained for subsequent writes.
    I do not need to close() with microsoft fortran. It works fine with a simple flush().
    My code for Microsoft is below, followed by same code for G77:
    Any ideas?
    Disciple285
    // write to stream with Microsoft Fortran
    std_out.println(message);
    std_out.flush();
    // write to stream with G77 Fortran
    std_out.println(message);
    std_out.close();

    Hi:
    The internal OJVM is not affected by your installations of any other Sun JDK on the server.
    So you can not upgrade your internal OJVM without upgrading the entire DB.
    Oracle 10g includes a JDK 1.4 runtime, 11g a 1.5 runtime and so on.
    If you can upgrade your Oracle 9.2.0.8 to a 10g release you can then compile the code, if not you should re-write the code to compile with an standard JDK 1.3 release.
    Best regards, Marcelo.

  • How to read unix standrad pipe output stream

    I want to write some code that will read data from a standard solaris pipe output stream. Please help.
    For example
    I cat a file in a unix shell
    cat /etc/hosts
    The output of this file can be piped to another program and I want to write a piece of code that reads that piped data and puts it into a textArea.
    Thanks

    Here ya go bro.................
    This just checks if IO is coming in and if so prints it to the term, but
    you get the idea.
    There might be an better way but...........
    import java.io.*;
    class xxx
    public static void main(String args[])
    byte b[] = new byte[256];
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    try {
    if(System.in.available() > 0) {
    System.in.read(b);
    baos.write(b,0,256);
    System.out.println(baos.toString());
    else
    System.out.println("No pipe being layed");
    catch(Throwable t){}

  • Problem with the socket and the standard output stream

    Hy, I have a little problem with a socket program. It has the server and the client. The problem is that the client at one point in the program, cannot print messages in the console.
    My program does the next: the server waits connections, when a client connects to it, the server gets outputstream to the socket and writes two strings on it. Meanwhile, the client gets the inputstream to the socket and reads on it with a loop the two strings written by the server . The strings are printed by the client in the console. The problem starts here; once the read strings are printed ,I mean, after the loop, there are other System.out.println in the client but the console doesnt print anything . It curious that only when I comment on the server code the line that says: "br.readLine()" just before the catch, the client prints all the System.out.println after the loop but why?
    Here is the code:
    Server code:
    public class MyServerSocket {
    public MyServerSocket() {
    try{
    ServerSocket server= new ServerSocket(2000);
    System.out.println("servidor iniciado");
    Socket client=server.accept();
    System.out.println("Client connected");
    OutputStream os=client.getOutputStream();
    PrintWriter pw= new PrintWriter(os);
    String cadena1="cadena1";
    String cadena2="cadena2";
    pw.println(cadena1);
    pw.println(cadena2);
    pw.flush();
    InputStream is=client.getInputStream();
    InputStreamReader isr= new InputStreamReader(is);
    BufferedReader br= new BufferedReader(isr);
    br.readLine(); //If a comment this line, the client prints after the loop, all the System.out....
    catch (IOException e) {
    // TODO: handle exception
    public static void main(String[] args) {
    new MyServerSocket
    Client code:
    public class MyClientSocket {
    public MyClientSocket () {
    try{
    Socket client= new Socket("localhost",2000);
    InputStream is=client.getInputStream();
    InputStreamReader isr= new InputStreamReader(is);
    BufferedReader br= new BufferedReader(isr);
    String read;
    while((read=br.readLine())!=null){
    System.out.println(read);
    //These messages are not printed unless I comment the line I talked about in the server code
    System.out.println("leido");
    System.out.println("hola");
    }catch (IOException e) {
    public static void main(String[] args) {
    new MyClientSocket
    }

    You are right but with this program the loop ends. As you see, the first class, the Server, writes to the socket one text file. The second class, the client, reads the text file in his socket written by the server and writes it to a file in his machine.
    NOTE: The loop in the client ends and the server doesnt make any close() socket or shutdownOutput() .
    public class ServidorSocketFicheromio {
         public ServidorSocketFicheromio() {
    try{
         ServerSocket servidor= new ServerSocket(2000);
         System.out.println("servidor iniciado");
         Socket cliente=servidor.accept();
         System.out.println("cliente conectado");
         OutputStream os=cliente.getOutputStream();
         PrintWriter pw= new PrintWriter(os);
         File f = new File("c:\\curso java\\DUDAS.TXT");
         FileReader fr= new FileReader(f);
         BufferedReader br= new BufferedReader(fr);
         String leido;
         while((leido=br.readLine())!=null){
              pw.println(leido);
         pw.flush();
         }catch (IOException e) {
         * @param args
         public static void main(String[] args) {
              new ServidorSocketFicheromio();
    public class ClienteSocketFicheromio {
         public ClienteSocketFicheromio() {
    try{
         Socket cliente= new Socket("localhost",2000);
         File f = new File("G:\\pepe.txt");
         FileWriter fw= new FileWriter(f);
         PrintWriter pw= new PrintWriter(fw);
         InputStream is=cliente.getInputStream();
         InputStreamReader isr= new InputStreamReader(is);
         BufferedReader br= new BufferedReader(isr);
         String leido;
         while((leido=br.readLine())!=null){
              pw.println(leido);
              System.out.println(leido);
              System.out.println("leido");
              System.out.println("hola");
              pw.flush();
         }catch (IOException e) {
         public static void main(String[] args) {
         new ClienteSocketFicheromio();/
    }

  • Output stream with a keylistener

    Hello,
    I have a program that basically runs .class and .jar console based programs, using JFileChooser to open them and such. I have managed to capture the System.out and System.err streams from running processes and using p.getInputStream() and p.getErrorStream(), just appending a JTextArea with each character in the stream. Now I'm trying to get the System.in stream connected.
    I have a keylistener attached to my JFrame, like this
    String line;
    frame.addKeyListener(new KeyListener() {
         @Override
         public void keyPressed(KeyEvent e) {}
         @Override
         public void keyReleased(KeyEvent e) {
              Character key = e.getKeyChar();
              //Delete the last character in both the JTextArea and the current line
              if (e.getKeyCode() == KeyEvent.VK_BACK_SPACE) {
                   if (output.getText().charAt(output.getText().length()-1) != '\n') {
                        String text = output.getText().substring(0, output.getText().length()-1);
                        output.setText(text);
                        line = line.substring(0, line.length()-1);
                   //Write line to OutputStream and put a new line in the JTextArea                              
              } else if (e.getKeyCode() == KeyEvent.VK_ENTER) {
                       //writeToOutput("\n-------\nLine reads: " + line + "\n--------\n");
                   writeToOutput("\n");
                   line = "";
              //Add any other characters to the line and show them in the JTextArea
              } else if (e.getKeyCode() != KeyEvent.VK_SHIFT) {
                   writeToOutput(key + "");
                   line = line + key;
         @Override
         public void keyTyped(KeyEvent e) {}                         
    });What happens is that the user types a line of characters, then presses enter. What I want is for when enter is pressed that the line is written to some sort of OutputStream in such a way that I can use it to provide input to a process with p.getOutputStream(OutputStream);
    Which OutputStream do I have to use and how? It's all a bit confusing :S
    Thanks,
    Jack
    Edited by: jackCharlez on Nov 23, 2009 1:25 PM
    Edited by: jackCharlez on Nov 23, 2009 1:33 PM

    Solved, using
    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
    Out.write in my keylistener and out.newline(); out.flush(); when the user presses enter.
    ^ For anyone googling this problem :P

  • Capture standard output of another command-line program, with characters not in current codepage

    I'm using ProcessStartInfo.RedirectStandardOutput and Process.BeginOutputReadLine to capture the standard output of another program (specifically,
    youtube-dl.exe) and save them into a string variable.
    However the result variable contains only usual characters of my language such as traditional Chinese and English letters; characters such as Korean or Latin letters with accents simply vanished.
    I File.WriteAllText-ed the result variable and checked the file using serveral text editors, so I'm sure they're lost, not that they exist and merely be un-display-able by console window.
    Plainly executing youtube-dl in Windows Command Prompt displays complete messages including these foreign characters.  
    My youtubeDL_process.OutputDataReceived is simply:
    (s, e) => { if(!string.IsNullOrWhiteSpace(e.Data)) this._filename = e.Data; }
    How to make the redirected standard output string with foreign characters complete, just like one directly generated in a command prompt?

    Try a different experiment of starting your second EXE:
    string exe =
    @"path to your EXE with arguments . . .";
    Process p =
    new
    Process
    StartInfo =
    UseShellExecute = false,
    RedirectStandardOutput = true,
    StandardOutputEncoding = Encoding.UTF8,
    FileName = "cmd.exe",
    Arguments = "/C chcp 65001 > null && " + exe
    p.Start();
    string output = p.StandardOutput.ReadToEnd();
    p.WaitForExit();
    Specify the full path in the exe variable, using quotation marks if it contains spaces.
    Then check the value of output.

  • Flushing output streams

    Hello,
              I was a getting a harmlous excpetion :
              <4/06/2002 16:48:04> <Error> <HTTP> <Servlet execution in servlet
              context "WebAppServletContext(5985988,root,/root)" failed,
              java.net.ProtocolException: Didn't meet stated Content-Length, wrote:
              '7358
              4' bytes instead of stated: '94440' bytes.
              java.net.ProtocolException: Didn't meet stated Content-Length, wrote:
              '73584' bytes instead of stated: '94440' bytes.
              at
              weblogic.servlet.internal.ServletOutputStreamImpl.finish(ServletOutputStreamImpl.java:413)
              at
              weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:974)
              at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1964)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              I read about it on this newsgroup, and I saw some people suggesting to
              flush the output streams with ( out.flush()).
              But this is weird, doesn't Weblogic flush the output streams by itself??
              I had the same application running on tomcat before and everything was
              fine, I didn't have to flush the output streams with tomcat
              And what is the consequence of not flushing the output streams.
              Thanks guys
              Itani
              [att1.html]
              

    I have the same problem. I have seen a lot of messages reporting this
              problem... what is the right solution? Can weblogic become instable
              due to this condition?
              I use some Oreilly classes (com.oreilly.servlet.MultipartRequest) to
              intercept some POST data; Is there anyone who knows if these classes
              can cause the ProtocolException problem?
              Bye
              Luca
              "Vinod Mehra" <[email protected]> wrote in message news:<[email protected]>...
              > No flush will not help here.
              >
              > This exception will show up in only two cases:
              >
              > 1. You wrote less than the promised content length was.
              >
              > 2. While you were writing the client terminated the connection. I
              > remember we used
              > to throw this ProtocolException exception at the end, which was
              > unnecessary.
              > I know this problem has been fixed. We don't throw this exception
              > anymore
              > when the client abnormally terminates the connection. I believe the
              > problem has
              > been fixed in 610sp2. Which release/service pack are you using? If
              > you
              > can't upgrade and need a one off patch please contact support.
              > CR057091
              > was used to track this problem. One off patches are available for
              > 610sp1 and
              > 510sp12.
              >
              > Cheers!
              > --Vinod.
              > "Mohamed Itani" <[email protected]> wrote in message
              > news:[email protected]...
              > Hello,
              > I was a getting a harmlous excpetion :
              >
              > <4/06/2002 16:48:04> <Error> <HTTP> <Servlet execution in servlet
              > context "WebAppServletContext(5985988,root,/root)" failed,
              > java.net.ProtocolException: Didn't meet stated Content-Length, wrote:
              > '7358
              > 4' bytes instead of stated: '94440' bytes.
              > java.net.ProtocolException: Didn't meet stated Content-Length, wrote:
              > '73584' bytes instead of stated: '94440' bytes.
              > at
              > weblogic.servlet.internal.ServletOutputStreamImpl.finish(ServletOutputStr
              > eamImpl.java:413)
              > at
              > weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.ja
              > va:974)
              > at
              > weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.j
              > ava:1964)
              > at
              > weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              > I read about it on this newsgroup, and I saw some people suggesting to
              > flush the output streams with ( out.flush()).
              >
              > But this is weird, doesn't Weblogic flush the output streams by
              > itself??
              > I had the same application running on tomcat before and everything was
              > fine, I didn't have to flush the output streams with tomcat
              >
              > And what is the consequence of not flushing the output streams.
              >
              > Thanks guys
              > Itani
              >
              >
              >
              > --
              

  • Getting the Output Stream of  a Process without exec()ing it first.

    Hi there,
    I am writing a java application which needs to open another application "gnuplot". Now my operating system is windows and I open pgnuplot .
    Also I want to send input to the above gnuplot (say plot sin(x) ) via the outputStream. The following is what I do :-
         String gnuplot_cmd = "plot sin(x)\n" ;
              Process p = Runtime.getRuntime().exec("C:/gnuplot/gnuplot4/bin/pgnuplot.exe");
              PrintWriter gp = new PrintWriter(p.getOutputStream());
              gp.print(gnuplot_cmd);
              gp.close();
    But the above doesn't work fully , in that only the blank wgnuplot terminal window pops up however I am unable to direct input to the gnuplot application.
    The reason being that , pgnuplot checks for
    its stdin being redirected the moment it's started. If, at that time,
    the "PrintWriter" is not yet connected to the OutputStream of the
    process, that check will fail, and pgnuplot will revert to just executing
    wgnuplot, without any command line redirection.
    I am facing a problem of how to attach a OutputStream to the process, without getting exec()ing the process.
    Is there anyway at all, i can get a process without starting it, so that I can attach an output Stream to it before it gets executed?
    I am open to work arounds, anything that will automate the process of writing to the gnuplot terminal.
    thanks!
    nandita.

    The reason being that , pgnuplot checks for
    its stdin being redirected the moment it's started.
    If, at that time,
    the "PrintWriter" is not yet connected to the
    OutputStream of the
    process, that check will fail, and pgnuplot will
    revert to just executing
    wgnuplot, without any command line redirection. I'm not convinced this analysis is correct. gnuplot doesn't need to know that there's a PrintWriter there, and it probably can't know. It just needs to know whether its standard input is coming from console or not. The Java library code that can invoke processes probably handles the redirect right away, and that's why there's the OutputStream available even before you create the PrintWriter.
    exec can be tricky. I think the problem may be that you're not dealing with standard output or standard error. Read this:
    When Runtime Exec Won't
    If that still doesn't help, there may be options to gnuplot to tell it exactly where its input is coming from.

  • Pipes (Input- and Output-streams) to a Process are not closed

    Hello experts!
    I have a long-living server-process that opens external programs with
    Runtime.getRuntime().exec() all the time. For communication with one
    of the external program I use stdin and stdout. I close all streams in
    finally-blocks, so there should not be any open stream.
    The problem is, that most of the time the used streams are closed
    correctly. But sometimes some of them left open. I check that with
    the linux command-line tool lsof. So over time the number of open
    pipes increases and eat up all file-handles till an IOException (too
    many open files) is thrown.
    If I watch the -verbosegc output, I see that most of the open pipes
    are cleaned up after a GC-run. But over time - not all.
    I start the external program in a thread, what could explain that
    it happens only sometimes.
    I'm hunting this bug now for quite a long time. Are there any known
    problems with using pipes to/from other processes (under linux?)
    thanks
    lukas

    Hi!
    Now I did some heavy logging and I saw that the remaining pipes are the ones I DON'T
    open to read or write! No joke! For example - for one process I don't read or write any of
    stdin,stdout,stderr - then in one of X executions all three pipes are left open (shown by
    lsof for the java-process, after many GC-runs).
    To test it I read the stdin of this process - then this stream was closed in the error case,
    but stdout and stderr are still open. This is really strange!
    anybody seen this before?
    lukas

  • Java.lang.Process output stream problem

    Hi, I have a program that starts a process (java.lang.Process) using the java.lang.Runtime.exec() and it attemtps to interface with it using the provieded io streams. I have both the output and error streams being handled on their own threads and I have a hashmap of output lines/command pairs that are checked so that when the process outputs certain lines to the console it feed the proper input into the process. My problem is that when I feed the input into the process it dosen't respond to it almost like the user hasn't pressed enter, The process hangs. I have tried using /n /r and permutations thereof but nothing works. The thread does read the lines from the process and does output to the process from what i can gather. Can you help me!
    here is some of the code..
    public void run() {
    try {
         //the process's output
         InputStreamReader isrOutput = new InputStreamReader(inOutput);
         //the process's input(our output)
         PrintWriter pw = new PrintWriter(outInput);
         String line = null;
         while(true){
              if(brOutput.ready()){
                   line = "";
                   while(brOutput.ready())
         line+=(char)brOutput.read();
                   System.out.print(line);
                   if(commands.containsKey(line)){
         pw.println((String)commands.get(line));
         System.out.println((String)commands.get(line));;
    } catch (IOException ioe) {
              ioe.printStackTrace();
    }Thanks

    Oops.. i forgot to flush my PrintWriter /blushing......... Thanks

  • How can I put an output stream (HTML) from a remote process on my JSF page

    Hello,
    I've a question if someone could help.
    I have a jsf application that need to execute some remote stuff on a different process (it is a SAS application). This remote process produces in output an html table that I want to display in my jsf page.
    So I use a socket SAS class for setting up a server socket in a separate thread. The primary use of this class is to setup a socket listener, submit a command to a remote process (such as SAS) to generate a data stream (such as HTML or graphics) back to the listening socket, and then write the contents of the stream back to the servlet stream.
    Now the problem is that I loose my jsf page at all. I need a suggestion if some one would help, to understand how can I use this html datastream without writing on my Servlet output stream.
    Thank you in advance
    A.
    Just if you want to look at the details .....
    // Create the remote model
    com.sas.sasserver.submit.SubmitInterface si =
    (com.sas.sasserver.submit.SubmitInterface)
    rocf.newInstance(com.sas.sasserver.submit.SubmitInterface.class, connection);
    // Create a work dataset
    String stmt = "data work.foo;input field1 $ field2 $;cards;\na b\nc d\n;run;";
    si.setProgramText(stmt);
    // Setup our socket listener and get the port that it is bound to
    com.sas.servlet.util.SocketListener socket =
    new com.sas.servlet.util.SocketListener();
    int port = socket.setup();
    socket.start();
    // Get the localhost name
    String localhost = (java.net.InetAddress.getLocalHost()).getHostAddress();
    stmt = "filename sock SOCKET '" + localhost + ":" + port + "';";
    si.setProgramText(stmt);
    // Setup the ods options
    stmt = "ods html body=sock style=brick;";
    si.setProgramText(stmt);
    // Print the dataset
    stmt = "proc print data=work.foo;run;";
    si.setProgramText(stmt);
    // Close
    stmt = "ods html close;run;";
    si.setProgramText(stmt);
    // get my output stream
    context = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
    ServletOutputStream out = response.getOutputStream();
    // Write the data from the socket to the response
    socket.write(out);
    // Close the socket listener
    socket.close();

    The system exec function is on the Communication palette. Its for executing system commands. On my Win2K system, the help for FTP is:
    "Ftp
    Transfers files to and from a computer running an FTP server service (sometimes called a daemon). Ftp can be used interactively. Click ftp commands in the Related Topics list for a description of available ftp subcommands. This command is available only if the TCP/IP protocol has been installed. Ftp is a service, that, once started, creates a sub-environment in which you can use ftp commands, and from which you can return to the Windows 2000 command prompt by typing the quit subcommand. When the ftp sub-environment is running, it is indicated by the ftp command prompt.
    ftp [-v] [-n] [-i] [-d] [-g]
    [-s:filename] [-a] [-w:windowsize] [computer]
    Parameters
    -v
    Suppresses display of remote server responses.
    -n
    Suppresses autologin upon initial connection.
    -i
    Turns off interactive prompting during multiple file transfers.
    -d
    Enables debugging, displaying all ftp commands passed between the client and server.
    -g
    Disables file name globbing, which permits the use of wildcard characters (* and ?) in local file and path names. (See the glob command in the online Command Reference.)
    -s:filename
    Specifies a text file containing ftp commands; the commands automatically run after ftp starts. No spaces are allowed in this parameter. Use this switch instead of redirection (>).
    -a
    Use any local interface when binding data connection.
    -w:windowsize
    Overrides the default transfer buffer size of 4096.
    computer
    Specifies the computer name or IP address of the remote computer to connect to. The computer, if specified, must be the last paramete
    r on the line."
    I use tftp all of the time to transfer files in a similar manner. Test the transfer from the Windows command line and copy it into a VI. Pass the command line to system exec and wait until it's done.

  • Problem with blocked native processes

    My application relies heavily on native processes so that I am trying to implement fallback strategies if a native process doesn't work as expected.
    While creating test scenarios I had a problem with handling errors caused directly by the start() method of the NativeProcess class. It throws errors if the target process can’t be accessed or is corrupted. For example if you take an exe file in Windows that works correctly and modify it in a hex editor to corrupt it the following error is thrown:
    Error: Error #3219: The NativeProcess could not be started. '%1 is not a valid Win32 application.'
          at flash.desktop::NativeProcess/internalStart()
          at flash.desktop::NativeProcess/start()
    If I try to put a try-catch block around the process.start() call something unexpected happens:
    The error is cought correctly, but another error is thrown instantly:
    Error: Error #1503: A script failed to exit after 30 seconds and was terminated.
          at mx.managers.layoutClasses::PriorityQueue/removeSmallest()[E:\dev\4.x\frameworks\projects\ framework\src\mx\managers\layoutClasses\PriorityQueue.as:238]
          at mx.managers::LayoutManager/validateProperties()[E:\dev\4.x\frameworks\projects\framework\ src\mx\managers\LayoutManager.as:567]
          at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:730]
          at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1072]
    The problem with this error is that I got no idea how to catch or prevent it. Depending on what I do in the catch block there is another error. For example if I try to log the error I get (but sometimes not as instantly as above):
    Error: Error #1503: A script failed to exit after 30 seconds and was terminated.
          at mx.logging::Log$/getLogger()[E:\dev\4.x\frameworks\projects\framework\src\mx\logging\Log. as:360]
    Strange is that the error is fired instantly sometimes not after 30 seconds.
    How can I fix this?

    In the first case I used a loader to load an error image. In the second case I tried something like:
    var logger:ILogger = Log.getLogger("Test");
    logger.error("NativeProcessError");
    I don't have the exact code at the moment, because I'm not on that computer.

  • Process the output with dispatch time 3

    Dear experts!
    Thank you for your attention!
    I ues output type BA00 to print order confirmation and set the dispatch time 3
    after i save the order, where can i process the output?
    as in delivery output, we can use VL71 to process outbound delivery.
    which t-code could i use to process the order output with dispatch time 3  ???
    Best regard!
    Tangdark

    is there anyone can help???
    please~~~

  • Conversion Error: I/O error while communicating with native process

    Hi,
    I am trying to use Oracle Outside In Technology Image Export for conversion of images. I am trying to run the example ExportTest that comes with the downloaded SDK.
    I get the below error while running the ExportTest example.
    Conversion Error: I/O error while communicating with native process .
    Am I missing any settings?
    Please guide to the right forum if this is not the one for posting queries on Oracle Outside In Technology Image Export.
    Thank you.

    Hi Revanth,
    I am using Image Export 8.3.7 and I am trying to run the java class "ExportTest" that is in the location sdk\samplecode\ExJava\Examples\ExportTest\src of the download.
    My input folder has one jpg - puzzle.jpg (this is just a simple jpg), I am trying to convert it to TIFF. ExportTest.java uses the classes in Export.jar . Export.jar is located in the sdk\samplecode\ExJava\Examples\ExportTest . You can see source files of the Export.jar at location sdk\samplecode\ExJava\Java API\src of the download. I am running the 'ExportTest' by providing the arguments (input folder, output folder and ix.cfg - this file comes with the download). So now when I run this class I was getting the error I mentioned in this post. Inorder to find more details about the error I modified the 'Export.java' (at sdk\samplecode\ExJava\Java API\src\com\outsideinsdk) just to printStackTrace when the exception occurs and rebuilt the 'Export.jar' and ran the 'ExportTest.java'.
    And below is the stack trace that I got :
    java.io.IOException: CreateProcess: nullexporter.exe "inputpath_u=AGkAbgBwAHUAdA
    BcAHAAdQB6AHoAbABlAC4ASgBQAEc=" "outputpath_u=AG8AdQBwAHUAdABcAHAAdQB6AHoAbABlAC
    4ASgBQAEcALgBUAEkARgBG" "outputid=FI_TIFF" "fallbackformat=FI_TEXT" "tiffcolorsp
    ace=24BitRGB" "preferoitrendering=false" "tiffcompression=Packbits" "mapbuffersi
    ze=8192" "defaultprintfontheight=20" "graphicwidthlimit=0" "reordermethod=off" "
    unmappablechar=0x002A" "timezone=0" "graphicheightlimit=0" "defaultmarginleft=14
    40" "ssshowheadings=false" "quickthumbnail=false" "graphicoutputdpi=0" "ssdirect
    ion=AcrossandDown" "defaultmarginbottom=1440" "ssshowgridlines=false" "dbshowhea
    dings=false" "readbuffersize=2" "whattoexport=all" "graphicsizelimit=0" "imagewa
    termarkopacity=0" "blue=-1" "handlenewfileinfo=no" "outputid=FI_TIFF" "lzwcompre
    ssion=enabled" "usedocpagesettings=true" "defaultmarginright=1440" "numberofstat
    callbacks=0" "dbfittopage=NoScaling" "tempbuffersize=2048" "pdffilterreorderbidi
    =no" "imagecropping=nocropping" "defaultmargintop=1440" "documentmemorymode=larg
    e" "m?
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:66)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:566)
    at java.lang.Runtime.exec(Runtime.java:491)
    at java.lang.Runtime.exec(Runtime.java:457)
    at com.outsideinsdk.Export.convert(Export.java:262)
    at com.outsideinsdk.ExportTest.convert(ExportTest.java:142)
    at com.outsideinsdk.ExportTest.main(ExportTest.java:214)
    hope this helps to find the problem.
    Thank you

  • How to read and process oData service's ATOM XML output?

    Hi,
    I have a RFC created in system A which will call oData services of system B. I am calling this in a report using class methods,  cl_http_client. I will get the response in a ATOM XML format. Is there a standard way to read and process such ATOM XML in abap report without using further addons?
    Regards,
    Vinay

    You need to pass your filename String as a parameter to your functionality. It depends how you're currently set up though. We can't really see the top of your call so it's difficult to determine what you are calling and we don't really know from where you're calling either.
    If you're running standalone, then on launch of the application, you can feed in a file name as an argument that you can read in in String args[] in the main function and pass down to your XML splitter.
    If you're a method in a class that's part of a bigger pile, you can feed the file name as a String to the method from wherever you call from if it makes sense architecturally.
    You might also want to pass down a File object if that makes sense in your current code (i.e. if you're using your file for other purposes prior to the split, to avoid recreating closing/opening for no reason).
    Depends what you're trying to do. If I put together a piece like this, I would probably create an <yourcurrentrootpackage>.xml.splitter package.
    Also, on a side note, you're problem isn't really reading and writing XML in java, but seems more to be making your functionality generic so that any XML file can be split with your code.
    Regards
    JFM

Maybe you are looking for

  • Help on fetching values form the Database Tables

    Hi, I am working on fetching the values from the Oracle base tables. First the order will be submitted by the customer. Depending on the city name he mentioned I need to route the order details to two different queues. For example if I(customer) inse

  • Proportionaly scaling down background image when restoring down browser window

    Hi all, i need some help, i want to minimize(scale or restore down) window to not-fullscreen browser window (and ajusting size of window manually over arrows in the corners of the window) and retain background picture full size (i need to picture pro

  • HP dv4t not detecting hard drive, please help!

    Hello, its been just a little over a year since I've bought my HP dvt, and of course the problems start as soon as my warranty has ended.. It's been working fairly fine most of the year, and then just all of a sudden while not even doing anything of

  • Getting Error 6 wheh trying to restore iPhone

    I keep getting error 6 when trying to restore my iPhone. I've disabled the anti-virus software and firewall - still same message. Any help please ???

  • Dropped in water

    I have an iphone 3gs and I dropped it in a swimming pool. Now the backlight is broken (i think). The screen is dark but when I plug it in I can see the apple icon, in the middle of the screen, and then eventually it displays iphone screen, and then s