| Author | 
		  Message
		 | 
		
		  | karthikravi | 
		  
		    
			  
				 Posted: Mon Jul 04, 2005 2:55 am    Post subject: MQ JMS error | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 30 Jun 2005 Posts: 8
  
  | 
		  
		    
			  
				Hi,
 
 
I'm getting the following error when i try to run my MDB.. 
 
 
Error code - MQJMS1091
 
 
Any idea wht it means.
 
 
Regards,
 
 
Karthik. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bower5932 | 
		  
		    
			  
				 Posted: Mon Jul 04, 2005 3:33 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA 
  | 
		  
		    
			  
				| I'd suggest that you catch the linked exception and post it here.  The MQJMS errors don't always indicate what is wrong. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | karthikravi | 
		  
		    
			  
				 Posted: Tue Jul 05, 2005 5:07 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 30 Jun 2005 Posts: 8
  
  | 
		  
		    
			  
				Hi,
 
 
That error is resolved as of now, i get the following when i try to set the Initial context. I have defined the following,
 
   
	| Quote: | 
   
  
	
 
private static String QUEUE_NAME = "JMSQueue";
 
    private static String CONNECTION_FACTORY = "javax.jms.QueueConnectionFactory";
 
    private static String PROVIDER_URL = "http://localhost:9060";
 
 
Properties prop = new Properties();
 
        prop.put("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory");
 
        prop.put("java.naming.provider.url", PROVIDER_URL);
 
 
ctx = new InitialContext(prop);
 
 | 
   
 
 
Any idea wht might be wrong.I'm clueless.
 
 
PS : I need to pick up messages from the MQ running in my machine thru MDB. Any solution would be helpful.
 
 
   
	| Quote: | 
   
  
	
 
javax.naming.ConfigurationException: Unsupported URL scheme: http
 
	at com.ibm.ws.naming.util.WsnInitCtxFactory.parseBootstrapURL(WsnInitCtxFactory.java:1509)
 
	at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:378)
 
	at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:112)
 
	at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:422)
 
	at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:143)
 
	at javax.naming.InitialContext.lookup(InitialContext.java:361)
 
	at com.landg.pce.ejb.PceMDBBean.setProperties(PceMDBBean.java:5 
 
	at com.landg.pce.MDBTest.testReturnsSuccessfully(MDBTest.java:4 
 
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
 
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5 
 
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
 
	at java.lang.reflect.Method.invoke(Method.java:391)
 
	at junit.framework.TestCase.runTest(TestCase.java:154)
 
	at junit.framework.TestCase.runBare(TestCase.java:127)
 
	at junit.framework.TestResult$1.protect(TestResult.java:106)
 
	at junit.framework.TestResult.runProtected(TestResult.java:124)
 
	at junit.framework.TestResult.run(TestResult.java:109)
 
	at junit.framework.TestCase.run(TestCase.java:118)
 
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
 
	at junit.framework.TestSuite.run(TestSuite.java:203)
 
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
 
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
 
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
 
 | 
   
 
[/quote] | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Tue Jul 05, 2005 5:16 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				Why would JNDI use HTTP as a transport? _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | karthikravi | 
		  
		    
			  
				 Posted: Tue Jul 05, 2005 5:31 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 30 Jun 2005 Posts: 8
  
  | 
		  
		    
			  
				Thats wht i need to know. i use RAD6 and I need to know where i can configure the initial context and provider url. Let me know wht are the initial properties that need to be set.
 
 
Thanks,
 
Karthik. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Tue Jul 05, 2005 5:43 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				Have you considered using the Search button? _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | karthikravi | 
		  
		    
			  
				 Posted: Tue Jul 05, 2005 6:00 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 30 Jun 2005 Posts: 8
  
  | 
		  
		    
			  
				Added mqcontext.jar and com.ibm.mq.pcf.jar and encounetred the following,
 
 
   
	| Quote: | 
   
  
	
 
PROVIDER_URL = "localhost:1414/SYSTEM.DEF.SVRCONN";
 
prop.put("java.naming.factory.initial", "com.ibm.mq.jms.context.WMQInitialContextFactory");
 
        prop.put("java.naming.provider.url", PROVIDER_URL);
 
 
 
javax.naming.NamingException: Unable to connect to the admin queue. Exception was: javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager.  Root exception is javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager
 
	at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2050)
 
	at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1532)
 
	at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:150)
 
	at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:185)
 
	at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:112)
 
	at com.ibm.mq.jms.context.MQContext.<init>(MQContext.java:271)
 
	at com.ibm.mq.jms.context.WMQInitialContextFactory.getInitialContext(WMQInitialContextFactory.java:29)
 
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:675)
 
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:257)
 
	at javax.naming.InitialContext.init(InitialContext.java:233)
 
	at javax.naming.InitialContext.<init>(InitialContext.java:209)
 
	at com.landg.pce.ejb.PceMDBBean.setProperties(PceMDBBean.java:56)
 
	at com.landg.pce.MDBTest.testReturnsSuccessfully(MDBTest.java:4 
 
 | 
   
 
 
 
Karthik | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bower5932 | 
		  
		    
			  
				 Posted: Tue Jul 05, 2005 7:38 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA 
  | 
		  
		    
			  
				| The invalid security is probably being caused because you are using a user who doesn't have authority to get at the queue manager.  Do a search on this site on 2035 and you should get more information. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Tue Jul 05, 2005 11:08 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				The problem is the way you setup your properties:
 
   
	| karthikravi wrote: | 
   
  
	
 
PROVIDER_URL = "localhost:1414/SYSTEM.DEF.SVRCONN"; 
 
prop.put("java.naming.factory.initial", "com.ibm.mq.jms.context.WMQInitialContextFactory"); 
 
prop.put("java.naming.provider.url", PROVIDER_URL); 
 
 | 
   
 
 
   
	| Code: | 
   
  
	
 
PROVIDER_URL="iiop://myhostname:2809"); //you'll have to check what your iiop port is on your server
 
prop.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.Context.WsnInitialContextFactory");
 
prop.put(javax.naming.Context.PROVIDER_URL, PROVIDER_URL);
 
prop.put(javax.naming.Context.REFERRAL, "throw"); | 
   
 
 
 
This for a Websphere initial context. You might want to start with a file context as described in the manual as it is the easiest to implement....Please note that the fields/identifiers are static members of the class javax.naming.Context)
 
 
Yours are just a figment of your imagination or very specific to mqcontext.jar which I have no knowledge of. The safe base is using the file context as it works even outside of a server as stand alone. (We use it with ATG )
 
In order to do a jndi lookup you better follow the manual to the letter. And you may have to check on how to setup a JMSContext in your Web Application Servers Manual... as it usually has to do with setting it up specifically as per their instructions or using a file context and plugging it into their own context...
 
Time to hit Using Java manual !     | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |