1 Reply Latest reply on Mar 2, 2005 3:06 PM by Elias Ross

    Application Hangs on Context Lookup

    Kevin Smith Newbie

      Below is some code I'm writing to test how to write a message producer in JMS. It's not the entirety of the code but it's the relevant piece. For some reason my code hangs after printing "checkpoint2". I checked the JMX Console and the following entry exists...


      I'm not sure if I'm posting enough relevant info but I'll gladly post more. One thing to note - I upgraded from java 1.4 to java 1.5 recently. Yesterday I got error, "InitialContextException". I googled that and read that this error can happen if you don't uninstall java 1.4 before installing 1.5. I went back and uninstalled both and then reinstalled 1.5. Yet I get this error. I'm running Jboss 4.0.0 on a WinXP Pro machine. I'm running my example through Eclipse. Thanks in advance,


      import javax.jms.*;
      import javax.naming.InitialContext;
      import javax.naming.*;
      public class Producer {
       public static void main (String [] args) throws NamingException, JMSException {
       String queueName = "Queue/testQueue";
       InitialContext ctx = new InitialContext();
       QueueConnectionFactory qcf = (QueueConnectionFactory) ctx.lookup("jms/QueueConnectionFactory");