| Author | 
		  Message
		 | 
		
		  | thomas2004 | 
		  
		    
			  
				 Posted: Thu Nov 13, 2008 7:06 am    Post subject: Reason Code 2035 by running PCFAgent example | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 13 Nov 2008 Posts: 16
  
  | 
		  
		    
			  
				Hi all,
 
 
As I try to run the following example, I got Reason code of 2035. Someone can help?
 
   
	| Code: | 
   
  
	
 
PCFAgent   agent = new PCFAgent ("localhost", 1414, "CLIENT");
 
   MQMessage []   responses;
 
   PCFParameter [] parameters = 
 
       {
 
         new MQCFST (CMQC.MQCA_Q_NAME, "*"), 
 
         new MQCFIN (CMQC.MQIA_Q_TYPE, MQC.MQQT_LOCAL)
 
       };
 
   MQCFH     cfh;
 
   MQCFSL     cfsl;
 
 
 
   responses = agent.send (CMQCFC.MQCMD_INQUIRE_Q_NAMES, parameters);
 
 
 
   cfh = new MQCFH (responses [0]);
 
 
 
   if (cfh.reason == 0)
 
   {
 
     cfsl = new MQCFSL (responses [0]);
 
 
 
     for (int i = 0; i < cfsl.strings.length; i++)
 
     {
 
       System.out.println ("Queue: " + cfsl.strings [i]);
 
     }
 
   }
 
   else
 
   {
 
     throw new MQException (cfh.compCode, cfh.reason, agent);
 
   }
 
 
 | 
   
 
 
 
According to the manual, it seems I don't have the priority, i.e. username and password for accessing the queue manager. But as when I use the following code to open to access the MQQueueManager, it is successful:
 
   
	| Code: | 
   
  
	
 
...
 
MQEnvironment.hostname = "localhost");
 
MQEnvironment.channel = "CLIENT";
 
MQEnvironment.port = 1414;
 
MQEnvironment.localAddressSetting = java.net.InetAddress.getLocalHost().getHostAddress();
 
// Bind MQQueueManager
 
MQQueueManager qMgr = new MQQueueManager("MQPT");  // MQPT is the MQ-Manager name
 
...
 
 | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Thu Nov 13, 2008 8:02 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				Maybe the userid you're using has authority to connect to the queue manager, but doesn't have enough authority to issue PCF commands and/or use the command queues. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | thomas2004 | 
		  
		    
			  
				 Posted: Thu Nov 13, 2008 12:49 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 13 Nov 2008 Posts: 16
  
  | 
		  
		    
			  
				| I haven't used any userId. I gues a default userId was used. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Thu Nov 13, 2008 2:16 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| thomas2004 wrote: | 
   
  
	| I haven't used any userId. I gues a default userId was used. | 
   
 
 
 
You were not signed onto the box in any way? At all? How can you not use any userid? _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | thomas2004 | 
		  
		    
			  
				 Posted: Fri Nov 14, 2008 3:33 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 13 Nov 2008 Posts: 16
  
  | 
		  
		    
			  
				
   
	| Vitor wrote: | 
   
  
	
 
 
You were not signed onto the box in any way? At all? How can you not use any userid? | 
   
 
 
 
I wonder as well. As one can see, my program is shown in my first post above. I can connect to the MQ-manager and open the queue to send message.
 
 
But as I try to use the PCF to get more information, I got the error of authentication.
 
 
 
 
[/code] | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | atheek | 
		  
		    
			  
				 Posted: Fri Nov 14, 2008 4:58 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Partisan
 
 Joined: 01 Jun 2006 Posts: 327 Location: Sydney 
  | 
		  
		    
			  
				What platform is the queue manager? 
 
If windows you will get detailed authorisation error messages in AMQ** error logs like what privelege to what object by what user id resulted in 2035.
 
 
If unix turn on authiorisation events and monitor the queue manager event queue | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | thomas2004 | 
		  
		    
			  
				 Posted: Fri Nov 14, 2008 5:04 am    Post subject: - | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 13 Nov 2008 Posts: 16
  
  | 
		  
		    
			  
				
   
	| atheek wrote: | 
   
  
	What platform is the queue manager? 
 
If windows you will get detailed authorisation error messages in AMQ** error logs like what privelege to what object by what user id resulted in 2035.
 
 
If unix turn on authiorisation events and monitor the queu manager event queue | 
   
 
 
 
Here is the information I get from the MQ-Manager. My program runs on Windows XP. The Queue is on IBM Mainframe.
 
 
 
   
	| Code: | 
   
  
	
 
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager is connected
 
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager is open
 
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager=com.ibm.mq.MQQueueManager@c7b00c
 
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.CommandInputQueueName=SYSTEM.COMMAND.INPUT                            
 
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.CommandLevel=600
 
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.Description=IBM WebSphere MQ for z/OS - V6.0                                
 
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.MaximumMessageLength=4194304
 
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.MaximumPriority=9
 
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.SyncpointAvailability=1
 
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.CharacterSet=819
 
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.DistributionListCapable=false
 
 | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |