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 » WebSphere Message Broker (ACE) Support » WMB7 - ConfigManagerProxy Java Exception

Post new topic  Reply to topic Goto page 1, 2  Next
 WMB7 - ConfigManagerProxy Java Exception « View previous topic :: View next topic » 
Author Message
petmor
PostPosted: Wed Oct 19, 2011 10:13 am    Post subject: WMB7 - ConfigManagerProxy Java Exception Reply with quote

Apprentice

Joined: 20 Jun 2002
Posts: 45
Location: Pasadena, CA

Hi,

We are seeing the following exception when referencing the WMB7 ConfigManagerProxy.jar:

com.ibm.broker.config.proxy.ConfigManagerProxyLoggedMQException: SYSTEM.BROKER.DEPLOY.QUEUE could not be opened (MQ reason code 2035 while trying to open the queue)

The exception seems to be thrown by the following line of code:

cmp = ConfigManagerProxy.getInstance(cmcp);

We are passing hostname, port and queue manager via the ConfigMangerConnectionParameters (cmcp) object just as we have done in our working WMB6 version of the application. We can connect to the WMB7 broker successfully using the same parameters using the WMB7 Toolkit.

Is the SYSTEM.BROKER.DEPLOY.QUEUE new to v7? Can anyone confirm if we must explicitly set access for our users to that queue in order to overcome the MQRC 2035 error?

Peter
Back to top
View user's profile Send private message Send e-mail AIM Address
zpat
PostPosted: Wed Oct 19, 2011 10:18 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

In a word, yes, if they are to deploy.

It's documented somewhere in the infocenter.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Oct 19, 2011 10:22 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Uhm.

You shouldn't be using any classes that talk about the ConfigMgr when using Broker v7 CMP API.

You should be using the non-deprecated classes that allow you to connect to the Broker.

I do not say that this is the source of your issue. But you should still fix it.
Back to top
View user's profile Send private message
mqmatt
PostPosted: Fri Oct 21, 2011 7:12 am    Post subject: Reply with quote

Grand Master

Joined: 04 Aug 2004
Posts: 1213
Location: Hursley, UK

Exactly - it looks like petmor is trying to access a V6.X Config Manager using the V7 ConfigManagerProxy.jar.
When using the V7 ConfigManagerProxy.jar, you can only connect to V7 brokers.
Back to top
View user's profile Send private message
petmor
PostPosted: Fri Oct 21, 2011 2:23 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Jun 2002
Posts: 45
Location: Pasadena, CA

WMB7 Toolkit Help states that no changes are necessary in the application, because the new API will make the correct calls to connect to the broker from the deprecated ConfigManager classes. So we made no changes to our application, but I'll read the new JavaAPI docs and replace the ConfigManager classes as necessary then try it out and report my findings.

We are trying to connect to a WMB7 broker in our test.

Thanks everyone for your help so far.

Any comment on the SYSTEM.BROKER.DEPLOY.QUEUE? Is that new for v7?

Peter
Back to top
View user's profile Send private message Send e-mail AIM Address
rekarm01
PostPosted: Fri Oct 21, 2011 4:48 pm    Post subject: Re: WMB7 - ConfigManagerProxy Java Exception Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

petmor wrote:
WMB7 Toolkit Help states that no changes are necessary in the application, because the new API will make the correct calls to connect to the broker from the deprecated ConfigManager classes.

As long the application uses the v7 ConfigManagerProxy.jar, it should still work with the deprecated ConfigManager classes.

petmor wrote:
I'll read the new JavaAPI docs and replace the ConfigManager classes as necessary then try it out ...

While it's a good idea to replace the deprecated classes eventually, that won't resolve a MQRC_NOT_AUTHORIZED error.

petmor wrote:
Any comment on the SYSTEM.BROKER.DEPLOY.QUEUE? Is that new for v7?

It's newly documented for v7:
Quote:
[mqsicreatebroker] grants put and get authority on your behalf to the group mqbrkrs for the following queues:
  • ...
  • SYSTEM.BROKER.DEPLOY.QUEUE
  • SYSTEM.BROKER.DEPLOY.REPLY
  • ...

Does the user running the application belong to the group mqbrkrs?
Back to top
View user's profile Send private message
petmor
PostPosted: Fri Oct 21, 2011 7:26 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Jun 2002
Posts: 45
Location: Pasadena, CA

The user's gid is ibdev, and the user's supplementary groups are mqbrkrs and testmq.
Back to top
View user's profile Send private message Send e-mail AIM Address
fjb_saper
PostPosted: Fri Oct 21, 2011 7:43 pm    Post subject: Reply with quote

Grand High Poobah

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

petmor wrote:
The user's gid is ibdev, and the user's supplementary groups are mqbrkrs and testmq.


A refresh security might be in order. Check if your 2035 is gone after that.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Fri Oct 21, 2011 8:53 pm    Post subject: Re: WMB7 - ConfigManagerProxy Java Exception Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Enabling service tracing for the CMP may (or may not) turn up something useful.

One way to do that without modifying the existing code is to set an environment variable MQSI_CMP_TRACE=tracefile before running the application, (as explained here).
Back to top
View user's profile Send private message
zpat
PostPosted: Fri Oct 21, 2011 10:54 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

I would avoid granting users/developers mqbrkrs group membership. It means that they can do pretty much anything to your broker.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Sun Oct 23, 2011 8:38 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

zpat wrote:
I would avoid granting users/developers mqbrkrs group membership. It means that they can do pretty much anything to your broker.


Using sudo correctly provides an audit trail. Best of both worlds.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Sun Oct 23, 2011 10:51 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

lancelotlinc wrote:

Using sudo correctly provides an audit trail. Best of both worlds.


That won't stop someone from doing....

Code:

cd /var/mqsi/
rm -fr .


will it?

Also sudo has to be configured properly to give you the audit trail. From my experience, it is seldom done correctly. This is one of the reasons why I don't allow sudo on any of our Linux systems. But, the benefits or lack thereof sudo, is certainly better discussed in another topic.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
petmor
PostPosted: Tue Nov 22, 2011 5:12 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Jun 2002
Posts: 45
Location: Pasadena, CA

Hi,

The issue is resolved. We were finally able to have our application connect to the broker and deploy .bar files by updating our source to refer to the WMB7 non-deprecated classes.

For example, this WMB6 code ...

ConfigManagerConnectionParameters cmcp = new MQConfigManagerConnectionParameters(sHostName, iPort, sQMgr);
cmp = null;

try {
cmp = ConfigManagerProxy.getInstance(cmcp);
}

... is replaced by the following WMB7 code ...

BrokerConnectionParameters cmcp = new MQBrokerConnectionParameters(sHostName, iPort, sQMgr);
cmp = null;

try {
cmp = BrokerProxy.getInstance(cmcp);
}

We also encountered a "Could not connect to queue manager ... MQ reason code 2495" error, but overcame that by sourcing the WMB7 mqsiprofile.

Appreciate everyone's input and assistance on this issue. Thanks!

Peter
Back to top
View user's profile Send private message Send e-mail AIM Address
petmor
PostPosted: Tue Nov 22, 2011 5:46 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Jun 2002
Posts: 45
Location: Pasadena, CA

Hi,

I wanted to add, one resource reportedly was able to successfully connect to a local WMB7 broker running on their laptop referring to the deprecated classes, but I was not able to duplicate that feat. Curious if anyone else has been able to achieve that. Info Center appears to indicate that should work.

Peter
Back to top
View user's profile Send private message Send e-mail AIM Address
mqmatt
PostPosted: Wed Nov 23, 2011 1:57 am    Post subject: Reply with quote

Grand Master

Joined: 04 Aug 2004
Posts: 1213
Location: Hursley, UK

Connecting to a V7 broker using the ConfigManagerConnectionParameters classes works just fine; the important step is sourcing the V7 profile.
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 » WebSphere Message Broker (ACE) Support » WMB7 - ConfigManagerProxy Java Exception
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.