| Author | 
		  Message
		 | 
		
		  | pasupulathisp | 
		  
		    
			  
				 Posted: Tue May 12, 2009 12:36 pm    Post subject: java.lang.NoClassDefFoundError: com/ibm/mq/jms/admin/JMSAdmi | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 28 Apr 2009 Posts: 23
  
  | 
		  
		    
			  
				Hi,
 
 
 I have modified my JMSAdmin,to set the classpath for mqcontext.jar and 
 
com.ibm.mq.pcf-6.1.jar.
 
 
   
	| Code: | 
   
  
	
 
export CLASSPATH=/opt/mqm/java/bin/lib/mqcontext.jar:/opt/mqm/java/bin/lib/com.ibm.mq/pcf-6.1.jar
 
 | 
   
 
 
 
When i try to run the command,i get the following message.
 
 
   
	| Quote: | 
   
  
	Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mq/jms/admin/JMSAdmin
 
 | 
   
 
 
 
Please let me know if i am missing any settings.
 
 
Thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue May 12, 2009 1:04 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				Doing this as a follow on to the setup described here and in the same environment? _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pasupulathisp | 
		  
		    
			  
				 Posted: Tue May 12, 2009 1:21 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 28 Apr 2009 Posts: 23
  
  | 
		  
		    
			  
				| Yes.I installed MQ7 on Linux.I am trying to create QCF from JMSAdmin tool.But i having exception while running ./JMSAdmin command. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | WMBDEV1 | 
		  
		    
			  
				 Posted: Tue May 12, 2009 1:45 pm    Post subject: Re: java.lang.NoClassDefFoundError: com/ibm/mq/jms/admin/JMS | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 05 Mar 2009 Posts: 888 Location: UK 
  | 
		  
		    
			  
				
   
	| pasupulathisp wrote: | 
   
  
	
 
Please let me know if i am missing any settings.
 
 | 
   
 
 
 
Yes you are.... Add com.ibm.mqjms.jar to the classpath and job should be a good'un | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pasupulathisp | 
		  
		    
			  
				 Posted: Tue May 12, 2009 2:33 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 28 Apr 2009 Posts: 23
  
  | 
		  
		    
			  
				Thanks WMBDEV1
 
 
Yes.I was missing the jar.I defined in the classpath to use all the jar under
 
 
   
	| Code: | 
   
  
	| /opt/mqm/java/lib/* | 
   
 
 
but it was working if i mention then seperate.
 
 
The only question i have is,do i need to specify a .scp file or i can just  run ./JMSAdmin and then define the QCF..etc.
 
 
 I ran the command ./JMSAdmin alone,it did not promt me to define,
 
like (Intctx> promt where i can define QCF..etc).Does this mean i have to define a .scp file under any folder?
 
 
Thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | WMBDEV1 | 
		  
		    
			  
				 Posted: Wed May 13, 2009 1:16 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 05 Mar 2009 Posts: 888 Location: UK 
  | 
		  
		    
			  
				
   
	| pasupulathisp wrote: | 
   
  
	
 
The only question i have is,do i need to specify a .scp file or i can just  run ./JMSAdmin and then define the QCF..etc.
 
 | 
   
 
 
 
Either should work but using a script will make it more repeatable and is good a practice to get into.
 
 
   
	| Quote: | 
   
  
	
 
I ran the command ./JMSAdmin alone,it did not promt me to define,
 
 | 
   
 
 
 
Did it give you an error? if so what was it? Else what happened? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pasupulathisp | 
		  
		    
			  
				 Posted: Wed May 13, 2009 5:20 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 28 Apr 2009 Posts: 23
  
  | 
		  
		    
			  
				Hi,
 
 
 I did not get any error message.Here is the what happend after i ran the command.
 
 
 
   
	| Quote: | 
   
  
	[mqm@pasupulathi bin]$ ./JMSAdmin
 
 
Licensed Materials - Property of IBM
 
5724-H72, 5655-R36, 5724-L26, 5655-L82
 
(c) Copyright IBM Corp. 2008 All Rights Reserved.
 
US Government Users Restricted Rights - Use, duplication or
 
disclosure restricted by GSA ADP Schedule Contract with
 
IBM Corp.
 
Starting Websphere MQ classes for Java(tm) Message Service Administration
 
 
[mqm@pasupulathi bin]$
 
 | 
   
 
 
 
But this works in Windows but not in linux.Do i need to specify .scp file under any specific directory?
 
 
Thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | WMBDEV1 | 
		  
		    
			  
				 Posted: Wed May 13, 2009 6:55 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 05 Mar 2009 Posts: 888 Location: UK 
  | 
		  
		    
			  
				| it may be easier just to add the full path to it and pipe it in. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pasupulathisp | 
		  
		    
			  
				 Posted: Wed May 13, 2009 7:04 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 28 Apr 2009 Posts: 23
  
  | 
		  
		    
			  
				Yes,i did the same and i was able to define my QCF..etc.
 
 
Here when you define the QCF as 
 
 
   
	| Quote: | 
   
  
	def qcf(SampleQCF) qmgr(QMGR) tran(client) chan(SYSTEM.DEF.SVRCONN)   host(localhost) port(1414)
 
 | 
   
 
 
 
What should be the host defined,such that i can connect from standalone,(running on diff system)?
 
 
And the provider URL defined in the JMSAdmin.config
 
 
   
	| Quote: | 
   
  
	| PROVIDER_URL=localhost:1414/SYSTEM.DEF.SVRCONN | 
   
 
 
 
And the same here,does the localhost be replaced by my standalone Apps' IP?
 
 
Thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | WMBDEV1 | 
		  
		    
			  
				 Posted: Wed May 13, 2009 7:14 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 05 Mar 2009 Posts: 888 Location: UK 
  | 
		  
		    
			  
				I'd say the IP of the server hosting MQ.
 
 
Try it and see.... I think you are now becoming overly depandant on us! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pasupulathisp | 
		  
		    
			  
				 Posted: Wed May 13, 2009 7:27 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 28 Apr 2009 Posts: 23
  
  | 
		  
		    
			  
				Hi WMBDEV1,
 
 
 I do appreciate for all the advice,but i guess what i am doing is to post after few tries and then go back and work on it and get the output before you guys advice.So i guess that's what happened.
 
 
But i would like to minimize these errors and be more specific.
 
 
Once again thanks. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | WMBDEV1 | 
		  
		    
			  
				 Posted: Wed May 13, 2009 7:50 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Sentinel
 
 Joined: 05 Mar 2009 Posts: 888 Location: UK 
  | 
		  
		    
			  
				Trying things out for yourself, and if your unlucky breaking some things and then fixing them is then a great way of learning.
 
 
At least if you tell me what you have tried and what broke I wont feel as though you're taking advantage of my generous nature  
  Last edited by WMBDEV1 on Wed May 13, 2009 8:01 am; edited 2 times in total | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pasupulathisp | 
		  
		    
			  
				 Posted: Wed May 13, 2009 7:57 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 28 Apr 2009 Posts: 23
  
  | 
		  
		    
			  
				| Thanks for your advice WMBDEV1. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |