aspose file tools*
The moose likes JBoss/WildFly and the fly likes NameNotFoundException with topic name not bound message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "NameNotFoundException with topic name not bound message" Watch "NameNotFoundException with topic name not bound message" New topic
Author

NameNotFoundException with topic name not bound message

Ananth Vasudevan
Ranch Hand

Joined: Sep 30, 2010
Posts: 30
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:

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10289
    
168

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.

[My Blog] [JavaRanch Journal]
Ananth Vasudevan
Ranch Hand

Joined: Sep 30, 2010
Posts: 30
Jaikiran, Thanks for the quick response.

Here's the stack trace:

Ananth Vasudevan
Ranch Hand

Joined: Sep 30, 2010
Posts: 30
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
Marshal

Joined: Jul 20, 2005
Posts: 10289
    
168

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

Joined: Sep 30, 2010
Posts: 30
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:

Vikram Saxena
Ranch Hand

Joined: Dec 16, 2008
Posts: 53
Hey can you do a quick check if the Topic has been created and its JNDI name on the JMX Console ?


Vikram
SCJP 5 , SCBCD [Prep Started ] , WLS 8.1 Server Admin
Ananth Vasudevan
Ranch Hand

Joined: Sep 30, 2010
Posts: 30
I checked the JMX Console. It is not created.
Ananth Vasudevan
Ranch Hand

Joined: Sep 30, 2010
Posts: 30
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

Joined: Dec 16, 2008
Posts: 53
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

Joined: Sep 30, 2010
Posts: 30
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)

ravikanth reddy
Ranch Hand

Joined: Aug 18, 2009
Posts: 46


It seems your topic is secured. Try after removing these two attributes.


Ravikanth Malyala
Ananth Vasudevan
Ranch Hand

Joined: Sep 30, 2010
Posts: 30
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NameNotFoundException with topic name not bound message