Author |
Message
|
dhireng |
Posted: Mon Nov 06, 2017 4:19 am Post subject: ConfigManagerProxyLoggedException: Not Initialized error |
|
|
Apprentice
Joined: 13 Jun 2011 Posts: 45
|
I use IIBv10 FP 9 and use Broker.getLocalInstance() to access Userdefined Configurable parameters.
My java compute node exists within a shared library. At random, after the shared library is redeployed I start getting the exception com.ibm.broker.config.proxy.ConfigManagerProxyLoggedException: Not Initialized. I've been restarting the broker to resolve this.
Question:- Is there anything I can do to resolve this within the code or environment? Do you think it is PMR time? |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 06, 2017 5:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
After you call broker.getLocalInstance(), shouldn't you wait for broker.isInitialized() to return true?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
dhireng |
Posted: Mon Nov 06, 2017 6:03 am Post subject: ConfigManagerProxyLoggedException: Not Initialized error |
|
|
Apprentice
Joined: 13 Jun 2011 Posts: 45
|
I'm following the steps from https://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/be43730_.htm
Code: |
BrokerProxy b = BrokerProxy.getLocalInstance();
while(!b.hasBeenPopulatedByBroker()) Thread.sleep(100);
ConfigurableService cs[] = b.getConfigurableServices("UserDefined");
b.disconnect();
|
The line in my stacktrace corresponds to the line BrokerProxy.getLocalInstance();
Also once the exception starts to occur, all subsequent messages to the node also fail until I restart the broker. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 06, 2017 7:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
public static BrokerProxy getLocalInstance()
throws ConfigManagerProxyLoggedException
Returns the BrokerProxy object that represents the broker in which the current application is deployed. This method must only be called when the current application is deployed as a JavaCompute node or Java User Defined Node. If the current application is not deployed inside a broker, a ConfigManagerProxyLoggedException is thrown |
Are you by any chance running this also outside of the JCN?
If so you should use the slightly different form of
Code: |
BrokerProxy.getLocalInstance("brokername"); |
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
dhireng |
Posted: Mon Nov 06, 2017 7:47 am Post subject: |
|
|
Apprentice
Joined: 13 Jun 2011 Posts: 45
|
no, the application runs only within the compute node. I've restarted the broker now and all running fine. Can my broker be running out of memory? |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Nov 07, 2017 5:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
dhireng wrote: |
no, the application runs only within the compute node. I've restarted the broker now and all running fine. Can my broker be running out of memory? |
This could be quite possible. Especially if you are not careful with the broker proxy resource. Like with all resources you need to make sure you close and disconnect before your flow is done or the message is propagated from your JCN. Never trust on garbage collection of resources, always release and disconnect explicitly!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|