4 Replies Latest reply on Oct 18, 2004 11:47 PM by S R

    JBoss 4.0/JMS/MySQL - queue not bound exceptions on the clie

    S R Newbie

      Hi - I could not find the answer to this on any of the FAQs etc. I am trying to run the sample JMS client which tries to access "queue/testQueue" on the server. This works fine with HSQL but not with MySQL (4.0.13).

      I have the "mysql-ds.xml" file in server/default/deploy and I have copied the sample "mysql-jdbc2-service.xml" file to deploy/jms. The datasource name has been changed too. (the server created the JMS_MESSAGES/JMS_TRANSACTIONS table in the database). I have made sure that the hs* files are removed from the deploy directory.

      Unfortunately, running the client throws this exception - javax.naming.NameNotFoundException: queue not bound. The server reports that this particular queue has been configured. The client has this:

      ==================================
      Properties properties = new Properties();
      properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      properties.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
      properties.put(Context.PROVIDER_URL, "localhost");
      InitialContext ctx = new InitialContext(properties);

      Queue queue = (Queue) ctx.lookup("queue/testQueue");
      ====================================
      What am I missing here ?

      Thanks in advance

        • 1. Re: JBoss 4.0/JMS/MySQL - queue not bound exceptions on the
          Adrian Brock Master

          You are missing... enough information to make your question answerable.

          Use READ THIS FIRST

          • 2. Re: JBoss 4.0/JMS/MySQL - queue not bound exceptions on the
            S R Newbie

            Adrian - I am really puzzled by this. I ran my simple JMS client (part of the JBoss examples) with a JBoss 3.x release (Postgres) and it worked fine. However, using the same client with JBoss 4.0.0/MySQL throws the unbound queue exception. The JNDI properties are the same except for the PROVIDER_URL. I know this has been asked a million times - but I would really appreciate a bit more information. I wouldn't have posted if I had figured this out.

            Thanks in advance

            • 3. Re: JBoss 4.0/JMS/MySQL - queue not bound exceptions on the
              Adrian Brock Master

              Step 1)
              Read the instructions: In the "READ THIS FIRST" topic in this forum you will
              find information on what you need to make a post that can be answered.
              Read it carefully and all the links.
              Read the FAQ - carefully.

              Step 2)
              Follow the instructions: Show me that you read those instructions and that
              you have made an effort to understand the problem.
              I'll know you have done that when I (or somebody else) can answer your question
              without playing the tedious game of 20 questions.

              public void playTwentyQuestions()
              {
               do
               {
               applyFilter(Relevence)
               {
               Which version of JBoss/OS/DB?
               Show your configuration files?
               What error message do you see?
               Post the full strack trace.
               Post your configuration.
               Post the code that fails.
               How do you know it is deployed?
               What was the previous error message?
               Anything strange in the log?
               Enable trace logging.
               Read the FAQ/Use search
               etc....
               }
               }
               while (notSolved);
              }
              


              If you want to play the game of 20 questions you can buy a support contract
              and play it as many times as you like.

              My policy on answering forum questions is summarized as follows:

              if (question.isBug())
               adrian.fix(bug);
              else if (question instanceof UnAnswerable)
               question.ignore();
              else if (question instanceof Unintelligible)
               question.ignore();
              else if (question instanceof FAQ)
               question.ignore();
              else if (question instanceof ME_TOO)
               question.ignore();
              else if (question instanceof Hijack)
               question.ignore();
              else if (user.isMakingIrrelventAssertionsThatJustShowsTheirIgnorance())
               question.ignore();
              else if (user.isLazy() && user.isNotAPayingCustomer())
               adrian.LART(user);
              else
               adrian.explainProblem();
              


              The number of posts that actually fall into the bug category is so small I only
              drop in about a once a week, unless I see an interesting post flyby on the
              mailing list.
              By interesting, I mean something intelligent by somebody who has actually
              done their homework.

              • 4. Re: JBoss 4.0/JMS/MySQL - queue not bound exceptions on the
                S R Newbie

                Didn't expect such a reply ... will ignore the stuff you have implied in your post.

                Anyway, I confirmed that the simple JMS client works fine on JBoss4.0.0 RC1 but not with the final version(4.0.0). It may be that I am doing something wrong or it may be a problem with the final version.

                Thanks for your time.