Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JMS javax.naming.NameNotFoundException

843830Feb 21 2007
I am facing a JMS Configuration Issue (At least i think that might be the problem).

I am working on IBM Rational Software Developer Platform V6
The MDB is EJB v2.0


Here is the method in my client class where I get the Context:

private InitialContext getInitialContext() throws NamingException {

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "iiop://localhost:2809/");
InitialContext ic = new InitialContext(env);
return ic;
}

Here is the methods in my client class where I do the Look for Connection Factory:

private ObjectMessage initializeSenderObject(String queueName)
throws NamingException, JMSException {

Context ctx = getInitialContext();

/** I get the error here
*/
queueConnectionFactory = (QueueConnectionFactory) ctx.lookup("cactus.QueueConnectionFactory");
queueConnection =
queueConnectionFactory.createQueueConnection();
queueSession = queueConnection.createQueueSession(false,
QueueSession.AUTO_ACKNOWLEDGE);

queue = (Queue) ctx.lookup(queueName);
queueSender = queueSession.createSender(queue);
objMsg = queueSession.createObjectMessage();
queueConnection.start();
return objMsg;
}

JMS Setup:
for the Connection Factory the logical name
cactus.QueueConnectionFactory
the JNDI Name is
jms/QueueConnectionFactory

for the Queue the logical name
cactus.Queue
the JNDI Name is
jms/Queue

For the MDB, I have configured a Message listener for the
Queue and Connection Factory

The server seems to start alright.

the error i get is the follows

javax.naming.NameNotFoundException: Context: localhost/nodes/localhost/servers/server1, name: cactus.QueueConnectionFactory: First component in name cactus.QueueConnectionFactory not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0

If anybody has any ideas as to whats going please help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2007
Added on Feb 21 2007
0 comments
733 views