Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Java EE (J2EE) и Spring > Интеграция HornetQ и Glassfish 2.1


Автор: Aoli 26.5.2010, 16:28
Друзья, кто-нибудь использовал Hornet с Glassfish 2.1 через RA адаптер?
Кидает Class not found exception.

Добавил необходимые либы:
Код

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.


Задеплоил hornetq-ra.rar

Создал Connector Connection Pools, Connector Resource.

При старте сервера обратил внимание на строчки:
Код

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.


Написал тестовый класс паблишера и получил:
Код

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


Причем, что интересно, в сервер логе все чисто.
Кидается эксепшн на тестовом клиенте:
Код

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: " +
                    e.toString());
            throw e;
        }
        return obj;


А если я создаю стандартный Глассфишный Коннектор и ресурс для него. 
Он легко лукапится и даже позволяет опубликовать сообщения.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)