You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Kamran Saadatjoo <ka...@openflowsystems.com> on 2008/05/23 01:05:14 UTC

InitialContext hangs

Hello: I’ve been working on resolving this for a couple of days now, and I’m
at the end of my rope.  I have a JMS client application that works just fine
(using the Java broker). However, if I start this client program from
another java program using ProcessBuilder the client program hangs on the
call to InitialContext.  Thank you in advance for your help.

 

Regards,

 

Kamran Saadatjoo

 


No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.24.0/1459 - Release Date: 5/21/2008
5:34 PM
 

Re: InitialContext hangs

Posted by Robert Greig <ro...@gmail.com>.
2008/5/23 Kamran Saadatjoo <ka...@openflowsystems.com>:
> Hello: I've been working on resolving this for a couple of days now, and I'm
> at the end of my rope.  I have a JMS client application that works just fine
> (using the Java broker). However, if I start this client program from
> another java program using ProcessBuilder the client program hangs on the
> call to InitialContext.  Thank you in advance for your help.

Hi Kamran,

Can you get a thread dump and post it to the list? (On windows
ctrl-break will generate one and on unix-like OSes you should kill -3
the process). That will help us understand what it is waiting for.

Thanks,

Robert

RE: InitialContext hangs

Posted by Kamran Saadatjoo <ka...@openflowsystems.com>.
I had some of that code at one time, but I'll put it back and see if it
helps. I've done so many things before finding where the block was that I
can no longer be sure. I appreciate your help.

Kamran Saadatjoo

-----Original Message-----
From: Robert Greig [mailto:robert.j.greig@gmail.com] 
Sent: Friday, May 23, 2008 10:32 AM
To: qpid-users@incubator.apache.org
Subject: Re: InitialContext hangs

2008/5/23 Kamran Saadatjoo <ka...@openflowsystems.com>:
> Hi Arnaud:  Below is the last version of many different tests, all of
which
> had the same effect.  Thanks for your help.

I do not see any code there to read the stdout and stderr of the
process you create. You need to do this or the process will almost
certainly block. See the javadoc for Process for details.

RG

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.24.0/1461 - Release Date: 5/22/2008
4:44 PM
 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.24.0/1461 - Release Date: 5/22/2008
4:44 PM
 


Re: InitialContext hangs

Posted by Robert Greig <ro...@gmail.com>.
2008/5/23 Kamran Saadatjoo <ka...@openflowsystems.com>:
> Hi Arnaud:  Below is the last version of many different tests, all of which
> had the same effect.  Thanks for your help.

I do not see any code there to read the stdout and stderr of the
process you create. You need to do this or the process will almost
certainly block. See the javadoc for Process for details.

RG

RE: InitialContext hangs

Posted by Kamran Saadatjoo <ka...@openflowsystems.com>.
Hi Arnaud:  Below is the last version of many different tests, all of which
had the same effect.  Thanks for your help.


----------------------------------------------------------------------
import java.io.*;

public class NewClass1 {
    static ProcessBuilder pb = null;
    static Process p = null;
    static String cpdir = "c:\\qpid\\qpid-1.0-incubating-M2\\lib\\";
    static String cp = cpdir+"backport-util-concurrent-2.2.jar;" +
                cpdir+"com.ibm.icu-3.4.4.jar;" +
                cpdir+"commons-cli-1.0.jar;" +
                cpdir+"commons-codec-1.3.jar;" +
                cpdir+"commons-collections-3.2.jar;" +
                cpdir+"commons-configuration-1.2.jar;" +
                cpdir+"commons-lang-2.1.jar;" +
                cpdir+"commons-logging-api-1.0.4.jar;" +
                cpdir+"geronimo-jms_1.1_spec-1.0.jar;" +
                cpdir+"log4j-1.2.12.jar;" +
                cpdir+"mina-core-1.0.0.jar;" +
                cpdir+"mina-filter-ssl-1.0.0.jar;" +
                cpdir+"mina-java5-1.0.0.jar;" +
                cpdir+"qpid-broker-1.0-incubating-M2.jar;" +
                cpdir+"qpid-client-1.0-incubating-M2.jar;" +
                cpdir+"qpid-common-1.0-incubating-M2.jar;" +
                cpdir+"qpid-incubating.jar;" +
                cpdir+"slf4j-api-1.4.0.jar;" +
                cpdir+"slf4j-log4j12-1.4.0.jar;" +
                cpdir+"xalan-2.7.0.jar;" +
                "C:\\ofs\\OFSFreeFlow\\build\\classes";
        
    static String[] cmd = 
             new String[]{"java", "-classpath", cp, "OFFDataProducer"};
    
    public NewClass1()
    {
        
    }        

    public static void main(String[] args) throws IOException
    {
        pb = new ProcessBuilder(cmd);
        p = pb.start();
        
    }    

----------------------------------------------------------------------

Kamran Saadatjoo
-----Original Message-----
From: Arnaud Simon [mailto:asimon@redhat.com] 
Sent: Friday, May 23, 2008 7:28 AM
To: qpid-users@incubator.apache.org
Subject: Re: InitialContext hangs

Hi Kamran,

How are you setting your ProcessBuilder environment? Can you send us the
relevant code snippet? 

Regards

Arnaud

On Thu, 2008-05-22 at 19:05 -0400, Kamran Saadatjoo wrote:
> Hello: I’ve been working on resolving this for a couple of days now, and
I’m
> at the end of my rope.  I have a JMS client application that works just
fine
> (using the Java broker). However, if I start this client program from
> another java program using ProcessBuilder the client program hangs on the
> call to InitialContext.  Thank you in advance for your help.



No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.24.0/1461 - Release Date: 5/22/2008
4:44 PM
 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.24.0/1461 - Release Date: 5/22/2008
4:44 PM
 


Re: InitialContext hangs

Posted by Arnaud Simon <as...@redhat.com>.
Hi Kamran,

How are you setting your ProcessBuilder environment? Can you send us the
relevant code snippet? 

Regards

Arnaud

On Thu, 2008-05-22 at 19:05 -0400, Kamran Saadatjoo wrote:
> Hello: I’ve been working on resolving this for a couple of days now, and I’m
> at the end of my rope.  I have a JMS client application that works just fine
> (using the Java broker). However, if I start this client program from
> another java program using ProcessBuilder the client program hangs on the
> call to InitialContext.  Thank you in advance for your help.