• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

continuous javax.naming.NameNotFoundExceptions on Weblogic 11g server using jdeveloper 11

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am new to Java EE.
I am trying to gain an understanding of the subject as a quite experienced java applications developer.

I am running through various tutorials - some using Glassfish 2.11 / Netbeans 6.8, and some on Weblogic 11g / jdeveloper 11

If I could understand the reason why every example I try produces a javax.naming.NameNotFoundException I would feel that I am not totally wasting my time.

Using Annotations:

Am I correct in thinking that the annotation within the EJB is the code that writes the entry inside JNDI?
I cannot seem to get a definitive answer for this.

I have a very simple messaging bean as follows...

*****************************************
import javax.ejb.MessageDriven;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;

@MessageDriven(mappedName = "weblogic.wsee.DefaultQueue")
public class MessageDrivenEJBBean implements MessageListener
{
public void onMessage(Message message)
{
try
{
System.out.println(message.getStringProperty("name"));
}
catch (JMSException e)
{
System.out.println("JMSException "+e);
e.printStackTrace();
}
}
}
*****************************************

The functionality of the onMessage Method is not very useful - its just designed to do Something.

When I try to deploy it to the server, I get the following...

<BEA-010061> <The Message-Driven EJB: MessageDrivenEJBBean is unable to connect to the JMS destination: weblogic.wsee.DefaultQueue. The Error was:
javax.naming.NameNotFoundException: Unable to resolve 'weblogic.wsee.DefaultQueue'. Resolved 'weblogic.wsee'; remaining name 'DefaultQueue'

- the context weblogic.wsee does exist in the jndi tree - but weblogic.wsee.DefaultQueue does not.
Is this annotation supposed to create the DefaultQueue, or do I need to do it manually?

can anybody please point me in the right direction?

Mark
>
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to do it manually. The JNDI points to a Queue that will be used by the MDB I suppose. I am new to annotation based MDBs. I ll try to do define this in glassfish v3 JEE6 and update this thread if possible
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic