• 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
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

NameNotFoundException with topic name not bound message

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm trying to deploy a topic in JBOSS 5.1 and getting a NameNotFoundException with topic name not bound message.
Below are the extracts from the XML config files. Any ideas on what I might be missing or going wrong?
(FYI: I'm porting our application from JBoss 4.0.3 to 5.1)

I noticed that the JNDI name for the bean is NULL. I was wondering if that might be the root cause?

Exception:


console log:



jboss.xml



ejb-jar.xml



jboss-service.xml



destination-service.xml:

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) Post the entire exception stacktrace
2) MDBs are not bound to JNDI, so they don't have a jndi-name
3) Whatever is looking up that topic JNDI name is probably doing it before the topic is deployed. So looks like a deployment ordering issue.
 
Ananth Vasudevan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jaikiran, Thanks for the quick response.

Here's the stack trace:

 
Ananth Vasudevan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any ideas from the stack trace above?

I tried copying my ear file to the all/deploy and all/deploy.last directory. Also moved my messaging-destinations.xml to all/deploy and all/deploy/messaging directory. Still I have the problem.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ananth Vasudevan wrote:Any ideas from the stack trace above?


I haven't yet paid complete attention to that stacktrace. For one, you seem to be creating the topics through your code?

Ananth Vasudevan wrote:
Also moved my messaging-destinations.xml to all/deploy and all/deploy/messaging directory. Still I have the problem.



Is it really named messaging-destinations.xml? Your first post mentioned it as destination-service.xml, so I didn't talk about it. If it's named messaging-destinations.xml, then it won't be deployed. It has to be named *-service.xml.
 
Ananth Vasudevan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, my bad. the name is destinations-service.xml (NOT messaging-destinations.xml).

Yes, my code reads the topic name from the jboss-service.xml (TopicsJNDINames attribute) and then creates the topic:

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey can you do a quick check if the Topic has been created and its JNDI name on the JMX Console ?
 
Ananth Vasudevan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I checked the JMX Console. It is not created.
 
Ananth Vasudevan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I checked the samples and found that I was using a wrong attribute name in destination-service.xml.
I changed "SecurityConf" to "SecurityConfig" and the Topic got deployed.



But deployment of my EAR file failed with an error saying that
the user is not authenticated. Any ideas?


 
Vikram Saxena
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you need to provide permissions to your user audit_error_logger.
You can do this by adding in messaging-users.properties and messaging-roles.properties.

And you need to pass these credentials when you are creating a Topic connection :
createTopicConnection(String userName, String password)
 
Ananth Vasudevan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vikram,

I'm using Postgres database and not using properties file. I see that the username/password/roles for audit_error_logger are defined in the respective DB tables (jbm_user and jbm_role).


messaging-jboss-beans.xml (inside all/deploy/mesaging)

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


It seems your topic is secured. Try after removing these two attributes.
 
Ananth Vasudevan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ravikanth, et al

My topic needs to be secured and when I programatically load those topics, I need to use the username and password.

I changed the postgresql-persistence-service.xml and added the following insert statements in the "SqlProperties" attribute under the
"org.jboss.jms.server.plugin.JDBCJMSUserManagerService" MBean.



After restarting the JBoss server the topics started loading.

Even though I manually inserted user name, password and role into my database before, it did not work. Adding the insert statements in the
postgresql-persistence-service.xml seems to work. I'm not sure, if this is the right way to go.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic