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 » Getting error in getLocalInstance of class Broker Proxy

Post new topic  Reply to topic
 Getting error in getLocalInstance of class Broker Proxy « View previous topic :: View next topic » 
Author Message
jkr
PostPosted: Tue Apr 19, 2016 2:28 am    Post subject: Getting error in getLocalInstance of class Broker Proxy Reply with quote

Novice

Joined: 19 Apr 2016
Posts: 10

I have made a user defined configurable service ,and I am accessing it through java code which is in turn called by an esql wrapper. My java code looks something like this:

Code:
public class ConfigService_Java  {
   public static String getUserDefinedConfigServProp(String cs){
         String rs = "exception occurred: ";
         try{
              BrokerProxy bp = BrokerProxy.getLocalInstance("My Broker");
            
              short c = 0;
              while(!bp.hasBeenPopulatedByBroker()){
                   try{
                        c++;   
                        Thread.sleep(100);
                   }catch(InterruptedException e){
                        return rs+e.toString();
                   }
                   if(c > 4)
                        return rs+"timed out";
              }
              try{
                  ConfigurableService udcs = bp.getConfigurableService("UserDefined",cs);
//                   ConfigurableService[] udcs = bp.getConfigurableService("UserDefined");
        //           String[] props = udcs.getProperties()
                   Properties props = udcs.getProperties();
                   String out = "";
                   for(String key : props.stringPropertyNames()){
               out = out + key + "=" + props.getProperty(key) + ",";
            }
                   if(out.length() > 0)
                        rs=out.substring(0,out.length()-1);
                   else
                        rs=rs+"no properties returned";
              }catch(Exception e){
                   return rs+e.toString();
              }
         }catch(Exception e){
              return rs+e.toString();
         }
         return rs;
}
}


While I debug my flow,it gives me a source not found error when it reaches the line,

BrokerProxy bp = BrokerProxy.getLocalInstance("My Broker");

The broker is present on my local machine. Am I missing something? Why is it not able to connect to the broker?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 21, 2016 7:47 pm    Post subject: Reply with quote

Grand High Poobah

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

Remember that case matters! and Broker is not the same as broker!!
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jkr
PostPosted: Thu Apr 21, 2016 10:32 pm    Post subject: Reply with quote

Novice

Joined: 19 Apr 2016
Posts: 10

I am sorry I forgot to post the error. I was getting MQ error 2035 because of the line
BrokerProxy bp = BrokerProxy.getLocalInstance("My Broker");
The error read 'System is not authorized to access the Queue manager'

I tried using the following commands

alter channel(SYSTEM.BKR.CONFIG) chltype(SVRCONN) mcauser('SYSTEM')
refresh security
But it did not work

So for the time being I have disabled channel authority by using command ALTER QMGR CHLAUTH(DISABLED).

Any suggestions on how I can enable channel authority for some users and block for others?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Apr 22, 2016 1:35 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.

jkr wrote:


Any suggestions on how I can enable channel authority for some users and block for others?


Enable CHLAUTH thus disabling it for everyone and then grant specific users access to the channel.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Getting error in getLocalInstance of class Broker Proxy
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.