geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axiez <>
Subject NameNotFoundException for connection factory
Date Wed, 28 Jan 2009 10:47:34 GMT

I created a JMS Resource Group al with Connection Factory w, Topic ac and
Queue qi. I tried to access the Connection Factory from a plain java class
in the same JVM. While executing it from command prompt I am seeing the
following error:
javax.naming.NameNotFoundException: w
All I have is,, MessageListener
implementing class and No descriptor files, no archive
files. Code is:
import javax.jms.*;
import javax.jms.Queue;
import java.util.*;
import javax.naming.*;
class MessageReceiving {
    public static void main(String[] args) throws Exception {
        Properties p = new Properties();
        p.load(new FileInputStream(""));
        InitialContext ic = new InitialContext(p);
        QueueConnectionFactory qcf = (QueueConnectionFactory)
        QueueConnection qc = qcf.createQueueConnection();
        QueueSession qs =
        Queue q = (Queue) ic.lookup("q");
        QueueReceiver qreceiver = qs.createReceiver(q);
        qreceiver.setMessageListener(new MyListener());
I have seen the help to my previous questions but unable to figure out where
it's going wrong.
View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message