Author |
Message
|
klr |
Posted: Mon Jun 27, 2011 10:47 pm Post subject: MQFM (MQ File Mover) error |
|
|
Apprentice
Joined: 01 Mar 2011 Posts: 31
|
Hi ,
on executing an xml file namely sample1.xml from the path C:\Capitalware\MQFM I get this error in windows command prompt.
C:\Capitalware\MQFM>mqfm.bat sample1.xml
----------------------------------------------------------------------
MQFM version 3.2.1 is now starting.
System Information:
JVM = Sun Microsystems Inc. v1.6.0_18
UserID = ******
OS = Windows XP
Hostname = *******
HostAddress = *******
CanonicalHostname = ******
MQFM has processed sample1.xml
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mq/MQExceptio
n
at biz.capitalware.mqfm.MQFM.doWork(MQFM.java:116)
at biz.capitalware.mqfm.MQFM.main(MQFM.java:80)
Caused by: java.lang.ClassNotFoundException: com.ibm.mq.MQException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more
Can someone explain what is the issue and how to resolve.. I understand it is java no class found error but is ther any jar file missing ? Should I instal anything more in Java or MQ softwares? |
|
Back to top |
|
 |
zpat |
Posted: Tue Jun 28, 2011 12:57 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Is com.ibm.mq in your classpath? |
|
Back to top |
|
 |
klr |
Posted: Tue Jun 28, 2011 1:26 am Post subject: |
|
|
Apprentice
Joined: 01 Mar 2011 Posts: 31
|
In MQFM where should I set the classpath? Where should I check the classpath? |
|
Back to top |
|
 |
zpat |
Posted: Tue Jun 28, 2011 2:26 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Do you know anything about running Java programs?
Have you installed MQ client or MQ server on this Windows PC? |
|
Back to top |
|
 |
klr |
Posted: Tue Jun 28, 2011 3:42 am Post subject: |
|
|
Apprentice
Joined: 01 Mar 2011 Posts: 31
|
i knew that we have to set classpath in environment settings for java But i misunderstood as classpath settings for MQFM also. Thats why asked that query.. Consider com.ibm.mq is there in class path. But the jar files are not found in the path where MQ Java is present. How to get those jar files?What are the steps to be followed? |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jun 28, 2011 3:46 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Did you review the user documentation that comes with MQFM?
Did you install MQ on this machine? Did you install the Server piece? Or the Client piece?
Did you install the Java functions of MQ? |
|
Back to top |
|
 |
klr |
Posted: Tue Jun 28, 2011 4:06 am Post subject: |
|
|
Apprentice
Joined: 01 Mar 2011 Posts: 31
|
Yes MQ has been installed on this machine only and within java/lib directory of mq i have thses files mqjbdf02.dll , mqjbnd05.dll , MQXAi02.dll, jdbc(folder). |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jun 28, 2011 1:15 pm Post subject: Re: MQFM (MQ File Mover) error |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
klr wrote: |
Can someone explain what is the issue and how to resolve.. I understand it is java no class found error but is ther any jar file missing ? Should I instal anything more in Java or MQ softwares? |
Did your read the manual? Did you read chapter 2 Installing MQ File Mover? The MQFM manual is included with the install.
The mqfm.bat uses the MQ_JAVA_LIB_PATH environment variable to set the CLASSPATH with the appropriate MQ JAR files.
1) Is it set to a valid path?
2) If it is not set then the mqfm.bat uses:
C:\Program Files\IBM\WebSphere MQ\Java\lib
klr wrote: |
MQ has been installed on this machine only and within java/lib directory of mq i have thses files mqjbdf02.dll , mqjbnd05.dll , MQXAi02.dll, jdbc(folder). |
Those are NOT MQ JAR files. They are Windows DLL (potentially used by MQ JAR files). These are MQ JAR files:
Quote: |
com.ibm.mq.headers.jar
com.ibm.mq.jar
com.ibm.mq.jmqi.jar
com.ibm.mq.jms.Nojndi.jar
com.ibm.mq.pcf.jar
com.ibm.mq.postcard.jar
com.ibm.mq.soap.jar
com.ibm.mq.tools.ras.jar
com.ibm.mqjms.jar
connector.jar |
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
klr |
Posted: Thu Jun 30, 2011 5:03 am Post subject: |
|
|
Apprentice
Joined: 01 Mar 2011 Posts: 31
|
Since the two jar files namely com.ibm.mq.jar and connector.jar were not available in C:\Program Files\IBM\WebSphere MQ\Java\lib I copied them manually from another system which has same MQ version. I copied these two jar files to C:\Capitalware\MQFM\libs . But no luck.. It is still showing the same java error
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mq/MQException
I copied those jar files with my userid only and not with admin userid. Has it got anything to do with userids? Am not knowing why the same error persists.. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jun 30, 2011 5:11 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
klr wrote: |
Since the two jar files namely com.ibm.mq.jar and connector.jar were not available in C:\Program Files\IBM\WebSphere MQ\Java\lib |
And that's the wrong thing to do.
The right thing to do is install the java feature of WMQ. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Jun 30, 2011 2:32 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
klr wrote: |
Since the two jar files namely com.ibm.mq.jar and connector.jar were not available in C:\Program Files\IBM\WebSphere MQ\Java\lib I copied them manually from another system which has same MQ version. I copied these two jar files to C:\Capitalware\MQFM\libs . But no luck.. It is still showing the same java error |
I never said to copy 2 MQ JAR files.
First and foremost, you need a proper and complete install of MQ (including MQ for Java libraries) on the server (or PC).
Secondly, when you read a manual, you need to understand what it is saying. Sorry to be harsh but it is the truth.
Here is what you have mis-read:
MQFM manual wrote: |
2.1.1 Installing MQFM as a Windows Service
2.1.1.1 Prerequisites
During the install of WebSphere MQ, the Java MQ JAR files are installed into the <MQ_Install_Path>\java\lib\ directory.
E.g. C:\Program File\IBM\WebSphere MQ\java\lib\
The user needs to copy the following Java MQ JAR files to the MQFM "libs" directory (e.g. C:\Capitalware\MQFM\libs\ ):
1. com.ibm.mq.jar
2. connector.jar
For WebSphere MQ v7.0, the user needs to copy 3 more MQ JAR files to the MQFM "libs" directory :
3. com.ibm.mq.commonservices.jar
4. com.ibm.mq.headers.jar
5. com.ibm.mq.jmqi.jar |
First you start with a proper install of MQ and IF you are going to use MQFM as a service then you need to copy either 2 or 5 MQ JAR files as noted above.
Your problem is not copying JAR files or UserIDs, it is the fact that you did not start with a proper install of MQ that contains the MQ for Java libraries. Re-install MQ and fix the problem.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
klr |
Posted: Thu Jun 30, 2011 10:02 pm Post subject: |
|
|
Apprentice
Joined: 01 Mar 2011 Posts: 31
|
I need MQFM as a windows service thats why i tried that method.
If I reinstall MQ software along with Java, Will it disturb the existing test and Live MQ systems? |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jul 05, 2011 7:35 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
klr wrote: |
If I reinstall MQ software along with Java, Will it disturb the existing test and Live MQ systems? |
Just follow the instructions in the WMQ Quick Beginnings manual and you will be fine.
Did you read my blog about the v4 beta of MQ File Mover?
http://www.capitalware.biz/rl_blog/
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|