users@glassfish.java.net

HornetQ and Glassfish 2.1 usage

From: <glassfish_at_javadesktop.org>
Date: Wed, 26 May 2010 06:57:52 PDT

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:
[code=nocolor]
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.
[/code]

2. Deployed hornetq-ra.rar

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

Took a notice in the log on server start:
[code=nocolor]
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.
[/code]


After that, I created test publisher class and got:
[code=nocolor]
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
[/code]

There's clear in server log and exception is thrown during context lookup on the client:
[code=java]
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;
[/code]

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

Can anybody help?
[Message sent by forum member 'aoli']

http://forums.java.net/jive/thread.jspa?messageID=471524