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 » General Discussion » MQOD cannot be supplied to MQDistributionList - MQ 2154 err

Post new topic  Reply to topic Goto page 1, 2  Next
 MQOD cannot be supplied to MQDistributionList - MQ 2154 err « View previous topic :: View next topic » 
Author Message
ivanachukapawn
PostPosted: Tue Nov 22, 2005 9:33 am    Post subject: MQOD cannot be supplied to MQDistributionList - MQ 2154 err Reply with quote

Knight

Joined: 27 Oct 2003
Posts: 561

The 2154 error description contains the following:

Corrective action: If it is intended to open a distribution list, set the ObjectType field to MQOT_Q and RecsPresent to the number of destinations in the list. If it is not intended to open a distribution list, set the RecsPresent field to zero.

However, I do not see any way to specify an MQOD to the constructors or methods of either MQDistributionList or MQDistributionListItem

Does anybody see a way to specify the MQOD ObjectType and MQOD RecsPresents fields to the MQDistributionList methods?

Incidentally, I did extensive searches on MQSERIES.NET for answers to this question but did not find an answer.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 22, 2005 9:36 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What language, please?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ivanachukapawn
PostPosted: Tue Nov 22, 2005 9:55 am    Post subject: Reply with quote

Knight

Joined: 27 Oct 2003
Posts: 561

Brandon,

MQDistributionList, MQDistributionListItem are both Java classes.

MQQueueManager class has a method accessDistributionList which is receiving the 2154 error code.

The language is Java.

Code:

MQDistributionListItem [] litems    =  new MQDistributionListItem [1000];

        int dliIndex    =   0;

        for (Iterator iterator = queues.iterator(); iterator.hasNext();)
        {
            String qname  = (String) iterator.next();

            MQDistributionListItem  dli =   new MQDistributionListItem ();

            dli.queueName   =   qname;
            dli.queueManagerName    =   qmgrName;

            litems [dliIndex] = dli;

            System.out.println("just set up " + dli.queueName + " MQDistributionListItem in array");

            dliIndex++;
        }

        /**
         *   NOW, create the MQDistributionList
         */

        MQDistributionList  distributionList    =   null;

        try
        {
            distributionList =  qmgr.accessDistributionList
                      (
                        litems,
                        openOption
                      );
        }
        catch (MQException e)
        {
            System.out.println("SOME PROBLEM GETTING A DISTRIBUTION LIST FROM THE QUEUE MANAGER");
            e.printStackTrace();  //To change body of catch statement use Options | File Templates.
        }
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 22, 2005 10:10 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

ivanachukapawn wrote:
Brandon,


who?

ivanachukapawn wrote:
MQDistributionList, MQDistributionListItem are both Java classes.


The Java MQ API shares a lot in common with the .NET MQ API. I don't know the .NET API off the top of my head well enough to know if it's got Distribution List objects in it or not.

Regardless, it is always more polite to indicate the language you are using, when asking questions about code.


ivanachukapawn wrote:
MQQueueManager class has a method accessDistributionList which is receiving the 2154 error code.

The language is Java.

Code:

MQDistributionListItem [] litems    =  new MQDistributionListItem [1000];

        int dliIndex    =   0;

        for (Iterator iterator = queues.iterator(); iterator.hasNext();)
        {
            String qname  = (String) iterator.next();

            MQDistributionListItem  dli =   new MQDistributionListItem ();

            dli.queueName   =   qname;
            dli.queueManagerName    =   qmgrName;

            litems [dliIndex] = dli;

            System.out.println("just set up " + dli.queueName + " MQDistributionListItem in array");

It might be worth adding a dump of the MQDistributionListItem.reasonCode and .completionCode properties here, just to make sure.

It would also be good to iterate over the MQDistributionListItems during your exception handling , and report the individual reasonCode/completionCodes as well.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ivanachukapawn
PostPosted: Tue Nov 22, 2005 10:16 am    Post subject: Reply with quote

Knight

Joined: 27 Oct 2003
Posts: 561

Jeff,

I apologize for getting your name wrong in the first post, and for being impolite by not specifying the language as Java.

I will implement your suggestions about processing and displaying the individual return fields for the items in the MQDistributionListItem array.

However, I am still at a loss as to how it might be possible to specify MQOD object to the MQDistributionList, MQDistributionListItem, or MQQueueManager.accessDistributionList methods. Any ideas on this?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 22, 2005 10:22 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

ivanachukapawn wrote:
However, I am still at a loss as to how it might be possible to specify MQOD object to the MQDistributionList, MQDistributionListItem, or MQQueueManager.accessDistributionList methods. Any ideas on this?


Not yet... The thing is that the MQOD should be completely wrapped in the oo-interface. So it's a question of finding the right way to use the OO interface.

The only thing that pops into my head is that, rather than using accessDistributionList, try using the MQDistributionList constructor and see if you get a different result.

It may also be that you've stumbled into a bug in the classes you are using.

What version of MQ are you running?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JT
PostPosted: Tue Nov 22, 2005 10:23 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Are you using MQPUT1 to put messages to the DistributionList ?

If so, perhaps this fix applies to your issue: http://www-1.ibm.com/support/docview.wss?uid=swg27006868#IY66331
Back to top
View user's profile Send private message
ivanachukapawn
PostPosted: Tue Nov 22, 2005 10:24 am    Post subject: Reply with quote

Knight

Joined: 27 Oct 2003
Posts: 561

Its MQ5.3. I'll try the MQDistributionList constructor (instead of the accessDistributionList method) and see if I get any different results.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 22, 2005 10:25 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What fixpack level of v5.3? And are you using MA88, or the supplied Java API with your fixpack level of 5.3? (you should be using the later, assuming it's included in your CSD/FP level).
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ivanachukapawn
PostPosted: Tue Nov 22, 2005 10:26 am    Post subject: Reply with quote

Knight

Joined: 27 Oct 2003
Posts: 561

I'm not using MQPut1. I'm using the MQDistributionList put () method. However, this is not the problem in that I don't even get to that code. The 2154 is encountered when attempting MQQueueManager's accessDistributionList method.
Back to top
View user's profile Send private message
ivanachukapawn
PostPosted: Tue Nov 22, 2005 10:28 am    Post subject: Reply with quote

Knight

Joined: 27 Oct 2003
Posts: 561

Jeff,

I initially replied incorrectly to your question about MQ version (I forgot I upgraded last Friday).

I'm running MQ6.0.
Back to top
View user's profile Send private message
ivanachukapawn
PostPosted: Tue Nov 22, 2005 10:37 am    Post subject: Reply with quote

Knight

Joined: 27 Oct 2003
Posts: 561

Jeff,

I ran a new version of the code which uses the MQDistributionList constructor instead of MQQueueManager's accessDistributionList method. The results were identical.

JD
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 22, 2005 10:37 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Are you using a client connection? It could be a java symptom of http://www-1.ibm.com/support/docview.wss?&apar=only&uid=swg1IY66331

Which is fixed in RP1 of v6.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ivanachukapawn
PostPosted: Tue Nov 22, 2005 10:53 am    Post subject: Reply with quote

Knight

Joined: 27 Oct 2003
Posts: 561

Jeff,

Thats terrific! I am using the MQ Java API Client Connection (from an XP Professional Laptop running MQ 6.0). This is undoubtedly the problem, so I guess I will have to get a hold of Refresh Pack 6.0.1.0

Thanks a lot for your willingness to help me with this problem.

Sincerely,

John Davis
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Nov 22, 2005 10:56 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It *might* not be the problem.

The Java client API is 100% pure java, so it doesn't link against the mqic lib file that the apar is talking about.

But you can see if your same code doesn't throw the error using a server binding and see what happens.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General Discussion » MQOD cannot be supplied to MQDistributionList - MQ 2154 err
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.