1 2 Previous Next 16 Replies Latest reply on Sep 23, 2010 12:53 PM by mattwright450

    JCA configuration unable to locate queue

    mattwright450

      Hi,

       

      I am trying to setup a simple EJB3 MDB on jboss 5.1 reading from a queue on a standalone Hornetq 2.1.2. Both servers are running on localhost and I have setup the jca configuration as per the jca-remote example i.e. put the attached hornetq-ds.xml under /jboss/server/default/deploy and the attached ra.xml under /deploy/hornetq-ra.rar/META-INF but I can't seem to get the two components to connect properly.

       

      Whenever I start the jboss server I get the following message:

       

      10:56:46,005 INFO  [HornetQActivation] Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@1914a16 destination=queue/spiderQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=processor password=**** maxSession=15)
      10:56:46,015 INFO  [HornetQActivation] awaiting topic/queue creation queue/spiderQueue

       

      The attached MessagingTest class accesses the hornetq server by jndi and is used to send the messages, there is a section commented out at the bottom which I used to test recieving messages and this seemed to work ok i.e. the message that was sent was also recieved. But when trying this in combination with the attached MDB I always get the message above whether I run the messaging test before or after starting the jboss server.

       

      I am assming that this is something simple that I have missed, but I have been over the example and the docs but can't seem to see where I'm going wrong!

       

      Any help would be much appreciated.

       

      Thanks,

       

      Matt

        • 1. Re: JCA configuration unable to locate queue
          ataylor

          are you saying that you get this error but everything still works ok?

          • 2. Re: JCA configuration unable to locate queue
            mattwright450

            Ah, I didn't make that very clear.

             

            No the problem is the message driven bean never gets invoked even when there are messges on the queue.

            • 3. Re: JCA configuration unable to locate queue
              ataylor

              is the remote HornetQ definately running on host=127.0.0.1;port=5445, sound to me as if the MDB is trying to connect to the local instance where the queue doesnt exist

              • 4. Re: JCA configuration unable to locate queue
                mattwright450

                That does sound pretty plausable, attached is the hornetq-configuration.xml file found under /hornetq-2.1.2.Final/config/stand-alone/non-clustered/.

                 

                I have not changed the connectors or acceptors elements just the security and address settings.

                 

                Apart from that the only other thing I have changed with the hornetq setup is the the jndi ports in the hornetq-beans.xml file as they were conflicting with the jboss jndi server and the connection-factory definition in the hornetq-jms.xml file to that used in the jca-remote example.

                 

                The jboss server is running under the default profile do I have to edit any of the files under the /deploy/messaging directory?

                • 5. Re: JCA configuration unable to locate queue
                  ataylor
                  The jboss server is running under the default profile do I have to edit any of the files under the /deploy/messaging directory?

                  Ok, im a bit confused, is the server running JBoss Messaging not HornetQ, maybe there are some client libs missing? I would start by getting it working invm and then remote

                  • 6. Re: JCA configuration unable to locate queue
                    mattwright450

                    The problem here is that the documentation (section 32.4.4) is some what scant when it comes to connecting to a standalone server via jca.

                     

                    All of the libs listed as being required in section 32.4.4.1.3 of the docs are in are in the places that it states they should be. The only problem was that I had to borrow the hornetq-ra.jar lib from a jboss 6 M4 distribution as I couldn't locate it in the hornetq-2.1.2.Final/lib directory where the other required libs were. As this is the library where the mistery message is coming from maybe that is the problem, can you point me to a a place where I can get another copy of this lib? Google is not helping with this one.

                     

                    In production the servers will be running on two separate boxes so heading down the invm route isn't really the solution.

                    • 7. Re: JCA configuration unable to locate queue
                      timfox

                      Matthew Wright wrote:

                       

                      The problem here is that the documentation (section 32.4.4) is some what scant when it comes to connecting to a standalone server via jca.

                       

                      That is true. There is an outstanding JIRA to address this. It has been outstanding for ages, and I've been going on about it for ages.

                       

                      We just need Andy to add a couple of paragraphs to the use manual.

                       

                      Andy, how about getting this done now? It won't take long and it will help people a lot.

                      • 8. Re: JCA configuration unable to locate queue
                        mattwright450

                        So with regard to the hornetq-ra.jar is it not supposed to be included in the distribution library (hornetq-2.1.2.Final/lib)?

                         

                        I have download all stable releases of Hornetq and none of them seem to contain it.

                         

                        Is there a place I can get it from, other than the latest Jboss AS release?

                        • 9. Re: JCA configuration unable to locate queue
                          timfox

                          You deploy the resource adaptor (the .rar) file, not the .jar. The .rar contains the .jar.

                          • 10. Re: JCA configuration unable to locate queue
                            mattwright450

                            I'm not sure I follow, currenlty in the jboss default/deploy/ directory I have:

                             

                                 hornetq-ra.rar (uncompressed)

                                      -> META-INF

                                           -> ra.xml

                                      -> hornetq-ra.jar

                             

                            All of this I created and according to the docs this is where the jar should live.

                             

                            You are right in saying that there is a hornetq-ra.rar (compressed) file in the /hornetq-2.1.2.Final/lib directory but on inspection it doesn't contain anything.

                             

                            So my question is if the hornetq-ra.jar is supposed to live in the .rar directory as I have listed above where am I supposed to get this jar from?

                            • 11. Re: JCA configuration unable to locate queue
                              ataylor
                              You are right in saying that there is a hornetq-ra.rar (compressed) file  in the /hornetq-2.1.2.Final/lib directory but on inspection it doesn't  contain anything.

                              Ive just checked and its not empty, it contains all the jars needed including the hornetq-ra.jar

                              • 12. Re: JCA configuration unable to locate queue
                                jaikiran

                                Matthew Wright wrote:

                                 


                                 

                                You are right in saying that there is a hornetq-ra.rar (compressed) file in the /hornetq-2.1.2.Final/lib directory but on inspection it doesn't contain anything.

                                 

                                 

                                I remember having a similar issue, last time I checked. It actually was the client application that I was using to open the .rar that was showing it as empty. I then (intentionally for testing) renamed hornet-ra.rar to hornet-ra.jar and then used the same client to open that file. It then showed the correct contents.

                                • 13. Re: JCA configuration unable to locate queue
                                  jaikiran

                                  jaikiran pai wrote:

                                   

                                  Matthew Wright wrote:

                                   


                                   

                                  You are right in saying that there is a hornetq-ra.rar (compressed) file in the /hornetq-2.1.2.Final/lib directory but on inspection it doesn't contain anything.

                                   

                                   

                                  I remember having a similar issue, last time I checked. It actually was the client application that I was using to open the .rar that was showing it as empty. I then (intentionally for testing) renamed hornet-ra.rar to hornet-ra.jar and then used the same client to open that file. It then showed the correct contents.

                                   

                                  The other way to check the contents is to run:

                                   

                                  jar -tf <hornetq-download-location>/lib/hornetq-ra.rar
                                  • 14. Re: JCA configuration unable to locate queue
                                    mattwright450

                                    Thanks jaikiran, I did exactly the same, seems like fileroller on Ubuntu has a bit of a problem opening .rars that are not really .rars.

                                     

                                    Evenso, I have copied the newly expanded rar to the default/deploy added the netty jar and altered the ra.xml as described in section 32.4.4 but I'm still getting the same message:

                                     

                                    15:40:42,190 INFO  [HornetQActivation] Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@805c00 destination=queue/spiderQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=processor password=**** maxSession=15)
                                    15:40:42,248 INFO  [HornetQActivation] awaiting topic/queue creation queue/spiderQueue

                                     

                                    If however I alter the the port configuration in the ra.xml from 5445 I do not get this message, which suggests to me that the connection is being established with the hornetq server but for some reason the queue can't be located.

                                    1 2 Previous Next