This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes EJB and other Java EE Technologies and the fly likes JBoss 4.0.2 -> 4.0.4 (Problems with topic's JNDI lookup) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "JBoss 4.0.2 -> 4.0.4 (Problems with topic Watch "JBoss 4.0.2 -> 4.0.4 (Problems with topic New topic
Author

JBoss 4.0.2 -> 4.0.4 (Problems with topic's JNDI lookup)

Vitaly Shechkov
Greenhorn

Joined: Jul 04, 2006
Posts: 8
I've got a problem during migration to v4.0.4
(There were a lot of problems, but i solved most. But this trouble....)

I built project and deployed it.
Immediately, i got the folowing stacktrace:




File topic-config-service.xml contains the following:





ejb-jar contains:




For lookup() we use constant "topic/com/mysystem/mq/JobInvocationTopic"

But... There are several topics and all of them are unavailable by JNDI in this way.

topic-config are the same in 4.0.2 and 4.0.4


Somebody told me, that it could be new version of JMS provider, but can somebody tell me what's exactly with topic names and how i can solve it... ?

Thanks in advance
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 8141
    
  52

topic does not exist: TOPIC.com/mysystem/mq/JobInvocationTopic


I am not sure why the server is looking up the topic at TOPIC.com/mysystem/mq/JobInvocationTopic instead of TOPIC.topic/com/mysystem/mq/JobInvocationTopic

Try out the following:

Change your topic-config-service.xml (only this file) to:




Notice that i have removed the 'topic/' from the JNDIName. See if this works.


[My Blog] [JavaRanch Journal]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 8141
    
  52

The other thing that you can do is, use the jmx-console to see to which jndiname the topic is bound. Here's how you can do it:

- Access http://localhost:8080/jmx-console
- Here you will find a list of services that have been deployed in jboss.
- On this page, under the section jboss.mq.destination, you will find the name of your topic (i.e. job-invocation-topic). Click on it and the page that comes up, will show you all the details of your topic, including the jndi-name to which it is bound.
Vitaly Shechkov
Greenhorn

Joined: Jul 04, 2006
Posts: 8
I've do it.
So, that's what i got^




Earlier, i was trying to change all to "com/mysystem/mq/JobInvocationTopic"
(in conf, ejb-jar, etc.)
No results....
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 8141
    
  52

Where in jboss have you placed this topic-config-service.xml file. I think the topic is not getting deployed. And how is your application packaged?
Vitaly Shechkov
Greenhorn

Joined: Jul 04, 2006
Posts: 8
Originally posted by jaikiran pai:
The other thing that you can do is, use the jmx-console to see to which jndiname the topic is bound. Here's how you can do it:

- Access http://localhost:8080/jmx-console
- Here you will find a list of services that have been deployed in jboss.
- On this page, under the section jboss.mq.destination, you will find the name of your topic (i.e. job-invocation-topic). Click on it and the page that comes up, will show you all the details of your topic, including the jndi-name to which it is bound.


I did it immediately after exception. JNDI name is the same, i defined "com/mysystem/mq/JobInvocationTopic". Or "topic/com/mysystem/mq/JobInvocationTopic"(If i set such name).

While booting jboss shows
17:56:09,913 INFO [job-invocation-topic] Bound to JNDI name: com/mysystem/mq/JobInvocationTopic (or topic/com/mysystem/....)
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 8141
    
  52

While booting jboss shows
17:56:09,913 INFO [job-invocation-topic] Bound to JNDI name: com/mysystem/mq/JobInvocationTopic (or topic/com/mysystem/....)


This means that the topic is bound properly to the jndi-name. Now, the possibility that remains is, your MDB is getting deployed even before the topic is deployed. This should not have happened in normal cases.

Do you see this message:
While booting jboss shows
17:56:09,913 INFO [job-invocation-topic] Bound to JNDI name: com/mysystem/mq/JobInvocationTopic (or topic/com/mysystem/....)


*after* the exception:

18:49:58,232 WARN [JMSContainerInvoker] JMS provider failure detected for SchedulerListenerBeanorg.jboss.deployment.DeploymentException: Error during topic setup; - nested throwable: (javax.jms.InvalidDestinationException: Previous topic does not exist: TOPIC.com/mysystem/mq/JobInvocationTopic)


or *before* that?

My other question was, how is your application packaged and where is this topic-config-service.xml file placed in jboss?
Vitaly Shechkov
Greenhorn

Joined: Jul 04, 2006
Posts: 8
"Where in jboss have you placed this topic-config-service.xml"
I placed it in "deploy" folder...
Earlier it works(i mean on jboss 4.0.2).

The problem comes when i deploy applications.
I downloaded sources of jboss, but archive is broken. So i can't watch the code
Vitaly Shechkov
Greenhorn

Joined: Jul 04, 2006
Posts: 8
No
I deploy application after jboss started.
It starts free of any applications.
After start completed, i run build and deploy.

On each iteration i stop JBoss and clear it.

Configs are placed in "deploy" folder.
All operations are performed for "default" configuration of JBoss.
Not for "minimal" neither for "all".
Vitaly Shechkov
Greenhorn

Joined: Jul 04, 2006
Posts: 8
It's not a mistake during deploy...

I think it's differences in JMS providers...
But how can i solve it?
JBoss documentation is silent about it. Or, maybe, i watch it not so closely...
Vitaly Shechkov
Greenhorn

Joined: Jul 04, 2006
Posts: 8
I replaced "jms" folder in 4.0.4 by analog from 4.0.2
And got the same.

Downloading of Jboss-messaging-1.0.1.CR2 have been finished.
Tomorrow will try to solve my trouble using it...

Is here nobody, who was confronted with these difficulties?
Vitaly Shechkov
Greenhorn

Joined: Jul 04, 2006
Posts: 8
One more feature:

When deploying project without topic's configs in JBoss - JBoss tells me, that it can't find topic "topic/com/mysy....."
But, if configs with "topic/com/mysy....." are in JBoss "deploy" folder - on deploying i get a message mentioned in the first post. About "TOPIC.com/mysyst..."

And... What does it mean: "previous topic"? I can't find understandable docs about it
 
I agree. Here's the link: jrebel
 
subject: JBoss 4.0.2 -> 4.0.4 (Problems with topic's JNDI lookup)
 
Similar Threads
Just check my configuration please
problem in configuring jboss-3.2.3 with mssqlserver2000
multiple datasource
Remove "queue" prefix from JMS jndi name
NameNotFoundException