2 Replies Latest reply on May 27, 2010 10:53 AM by Tim Fox

    HornetQ and Glassfish 2.1 usage

    Alexey Z Newbie

      Hello guys!


      Does anyone used HornetQ with Glassfish 2.1 via RA adaptor?
      It trows me Class not found exception permanently.


      I've installed HornetQ there this way:


      1. Added libraries to server's classpath:


      If you are using just a pure HornetQ Core client (i.e. no JMS) then you need hornetq-core-client.jar, hornetq-transports.jar and netty.jar on your client classpath.
      If you are using JMS on the client side, then you will also need to include hornetq-jms-client.jar and jboss-jms-api.jar.


      2. Deployed hornetq-ra.rar


      3. Created Connector Connection Pools, Connector Resource for HornetQ.


      Took a notice in the log on server start:

      RAR8000 : The method setConnectionParameters is not present in the class : org.hornetq.ra.HornetQResourceAdapter
      RAR7097: No setter method present for the property ConnectionParameters in the class org.hornetq.ra.HornetQResourceAdapter
      HornetQ resource adaptor started
      JBIFW0010: JBI framework ready to accept requests.

      After that, I created test publisher class and got:

      SEVERE: RAR6001 : Class Not found : org.hornetq.ra.HornetQResourceAdapter
      26.05.2010 16:53:14 com.sun.enterprise.connectors.ActiveRAFactory createActiveResourceAdapter
      com.sun.enterprise.connectors.ConnectorRuntimeException: Error in creating active RAR


      There's clear in server log and exception is thrown during context lookup on the client:

      if (jndiContext == null) {
                  try {
                      jndiContext = new InitialContext();
                  } catch (NamingException e) {
                      System.err.println("Could not create JNDI API " +
                              "context: " + e.toString());
                      throw e;
              try {
                  obj = jndiContext.lookup(name); // <--- Cannot find context
              } catch (NamingException e) {
                  System.err.println("JNDI API lookup failed: " +
                  throw e;
              return obj;


      But when I create Glassfish's standard Connector and Resource for it, It will be lookuped and message will be published.


      Can anybody help