ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » JMSAdmin in WAS5.1

Post new topic  Reply to topic
 JMSAdmin in WAS5.1 « View previous topic :: View next topic » 
Author Message
texan
PostPosted: Mon Nov 01, 2004 5:56 am    Post subject: JMSAdmin in WAS5.1 Reply with quote

Acolyte

Joined: 25 Feb 2004
Posts: 74

I am in process of migrating my J2EE app. from WAS4 to WAS5.1. Under WAS4, we defined several MQ objects in JNDI using JMSAdmin tool. Does anyone know how to run JMSAdmin with WAS5.1? I tried several options and none of them worked. So I used WAS5 admin console to define these objects. But I am getting the following problem when accessing QueueConnection factory.

java.lang.ClassCastException: com.ibm.ejs.jms.JMSQueueConnectionFactoryHandle

Does anyone know why? I searched several places but could not find anything similar to this. I appreciate your help and time.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Nov 01, 2004 6:25 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You shouldn't use JMSAdmin with version 5, as the objects you create will not be persistent.

Did you define the object that is giving you trouble under "Websphere JMS Provider", or 'WebSphere MQ JMS Provider", or some other provider?

Did you configure MQ_INSTALL_ROOT properly in the server Variables?

Do you have WebSphere MQ installed on the same machine as the WAS server? Do you have a full server, a client, or just the Java client?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
texan
PostPosted: Mon Nov 01, 2004 6:38 am    Post subject: Reply with quote

Acolyte

Joined: 25 Feb 2004
Posts: 74

1) You shouldn't use JMSAdmin with version 5, as the objects you create will not be persistent..
--- I could not even create objects. After running JMSadmin, I got initial context prompt. If I run any command like "dis ctx" am getting problem.

2) Did you define the object that is giving you trouble under "Websphere JMS Provider", or 'WebSphere MQ JMS Provider", or some other provider?
----I created them under 'WebSphere MQ JMS Provider"

3) Did you configure MQ_INSTALL_ROOT properly in the server Variables?
----Yes. It was pointed to my install directory. (C:\WMQ). Do I have to point it to bin or java folder?

4)Do you have WebSphere MQ installed on the same machine as the WAS server? Do you have a full server, a client, or just the Java client?
---- Both WAS and MQ are on same machine. I have a full MQ server.

I am testing this migration on my local machine. Everything is on one machine. Infact I have both WAS4.5 and WAS5.1 on same box. Currently I stopped WAS4.5 and working on WAS51.
Back to top
View user's profile Send private message
vennela
PostPosted: Mon Nov 01, 2004 7:20 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Do you have the right JDK version?
Do you have the right MQ java libraries?
What version of MQ?

Exactly at what point are you getting the error?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
texan
PostPosted: Mon Nov 01, 2004 8:52 am    Post subject: Reply with quote

Acolyte

Joined: 25 Feb 2004
Posts: 74

Do you have the right JDK version?
--- what ever comes with WAS51. I believe it is 1.4.1.

Do you have the right MQ java libraries?
----I think I do. They worked fine with WAS4.5.

What version of MQ?
-----5.3 CSD 5.

Exactly at what point are you getting the error?
-----The same program that worked fine with WAS4.5 is giving problem for WAS51. This program is looking up for QCF and upon finding it, we are casting it. Currently we are casting this with MQQueueConnectionFactory.

I did a dumpNameSpace and here is what I found between WAS4.5 and WAS51.

XXQCF javax.jms.QueueConnectionFactory
XXQCF com.ibm.mq.jms.MQQueueConnectionFactory

Do you know why thety are different?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Nov 01, 2004 9:03 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

So this is really a programming problem, and not a setup problem.

According to the Using Java manual, you should be casting it to a plain QueueConnectionFactory
Code:
QueueConnectionFactory factory;
factory = (QueueConnectionFactory)ctx.lookup("cn=ivtQCF");


Instead of casting to an MQQueueConnectionFactory.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
texan
PostPosted: Mon Nov 01, 2004 9:06 am    Post subject: Reply with quote

Acolyte

Joined: 25 Feb 2004
Posts: 74

The issue is: if I use JMSAdmin in WAS4.5, it created QCF with MQQueueConnectionFactory. JMSAdmin is not supported in WAS51. So if you use was51 console, it is creating QCF with QueueConnectionFactory. I really do not want to change the code. The same code should be working fine in WAS51.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Nov 01, 2004 9:17 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'm fairly sure that 5.1 supports a newer JMS release than 4.5. I suspect that is why you are having difficulties, and that the difficulties you are having are due to changes in JMS.

So you'll likely have to change your code. And it's not IBM's fault.

Did you know that the EJB 3.0 spec is not going to be backwards compatible with the EJB 2.0 spec? Isn't that fun?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 01, 2004 12:42 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Any of the adjustments you might have done using MQQueueConnectionFactory class you will have to incorporate in the JNDI setup. Pretty easy in the admin console of WAS 5.1.

Just use the plain QueueConnectionFactory. Under the covers you still have an MQQueueConnectionFactory.

I suspect 2 factors here. You may well have declared all the jar files correctly but did you add them to the MQ_INSTALL_ROOT variable as requested in the WAS MQ JMS setup documentation? It is not enough to just point to the directory, you need to add all the jars as well.

Your case should show:
Code:

C:\wmq\java\lib;c:\wmq\java\lib\jdbc;c:\wmq\java\lib\....jar


Add each jar file individually like in a classpath.
Of course I expect you to have c:\wmq\java\lib and c:\wmq\java\lib\jdbc defined as part of your path variable as well. (library_path or equivalent in unix)

Update your MQ_INSTALL_ROOT variable and let us know if it works.
Enjoy


Last edited by fjb_saper on Tue Nov 02, 2004 12:41 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Mon Nov 01, 2004 1:54 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjb_saper wrote:
You may well have declared all the jar files correctly but did you add them to the MQ_INSTALL_ROOT variable as requested in the WAS MQ JMS setup documentation? It is not enough to just point to the directory, you need to add all the jars as well.

I haven't had to do that.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Nov 02, 2004 12:37 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Jeff,

If you did not add the jars to MQ_INSTALL_ROOT you sure did add the jars to the classpath somewhere or you did not use full blown MQ but only the embedded version.

You are supposed to add the jars to the MQ_INSTALL_ROOT variable as this allows you to use only javax.jms classes in your app. and you do not have to add any of the MQ jars to the app classpath.

We ran into a bunch of problems with our MDB's when the MQ_INSTALL_ROOT got corrupted for some reason (misspelling of one of the critical mq jars: com.ibm.mqbind.jar). We are running on AIX....

Enjoy
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » JMSAdmin in WAS5.1
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.