ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Creating MQHeaderIterator Problem

Post new topic  Reply to topic
 Creating MQHeaderIterator Problem « View previous topic :: View next topic » 
Author Message
imey
PostPosted: Tue Oct 20, 2009 1:05 am    Post subject: Creating MQHeaderIterator Problem Reply with quote

Newbie

Joined: 20 Oct 2009
Posts: 5

Hi, all

I am using MQ v7.0 and programming against a funtion to get the headers from a message, but after

MQHeaderIterator iter = new MQHeaderIterator(rcvMessage);

I got an exception:

Exception in thread "main" java.lang.NoClassDefFoundError: com . ibm . mq. headers . internal . CachingHeader


And i check the package, there exist no such Class or Interface named cachingheader, when google it, only 2 dated and unavailable results are displayed.

Anybody any ideas?

Thanks
Back to top
View user's profile Send private message
imey
PostPosted: Tue Oct 20, 2009 1:07 am    Post subject: Reply with quote

Newbie

Joined: 20 Oct 2009
Posts: 5

stack trace:

Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mq/headers/internal/CachingHeader
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
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)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.ibm.mq.headers.MQHeaderRegistry.class$(MQHeaderRegistry.java:91)
at com.ibm.mq.headers.MQHeaderRegistry.getDefault(MQHeaderRegistry.java:9
at com.ibm.mq.headers.MQHeaderIterator.<init>(MQHeaderIterator.java:9
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Tue Oct 20, 2009 1:12 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

It seems you have a missing JAR file on your classpath. I've not yet managed to tinker with MQ V7 yet so I cant tell you which one is needed.

I'd check out the %MQ INSTALL%\Java\lib for candidates.
Back to top
View user's profile Send private message
imey
PostPosted: Tue Oct 20, 2009 1:58 am    Post subject: Reply with quote

Newbie

Joined: 20 Oct 2009
Posts: 5

WMBDEV1 wrote:
It seems you have a missing JAR file on your classpath. I've not yet managed to tinker with MQ V7 yet so I cant tell you which one is needed.

I'd check out the %MQ INSTALL%\Java\lib for candidates.


the jars i am using are:

com.ibm.mq.jar
com.ibm.mq.headers.jar
com.ibm.mq.jmqi.jar
com.ibm.mq.commonservices.jar
connector.jar

Plz tell me if i missed somthing
Back to top
View user's profile Send private message
imey
PostPosted: Tue Oct 20, 2009 2:14 am    Post subject: Reply with quote

Newbie

Joined: 20 Oct 2009
Posts: 5

I tried both versions of MQ 7.0 and MQC 7.0.1

neither of them works :S
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 20, 2009 4:45 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

imey wrote:

the jars i am using are:

com.ibm.mq.jar
com.ibm.mq.headers.jar
com.ibm.mq.jmqi.jar
com.ibm.mq.commonservices.jar
connector.jar

I tried both versions of MQ 7.0 and MQC 7.0.1

neither of them works :S


Before you can say that, you have to try with all the jar files in the <mqinstall>/java/lib path on your class path.

You don't get to pick and choose and say it doesn't work, because our answer will be -- user error, make it work! --
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
imey
PostPosted: Tue Oct 20, 2009 6:00 am    Post subject: Reply with quote

Newbie

Joined: 20 Oct 2009
Posts: 5

fjb_saper wrote:
imey wrote:

the jars i am using are:

com.ibm.mq.jar
com.ibm.mq.headers.jar
com.ibm.mq.jmqi.jar
com.ibm.mq.commonservices.jar
connector.jar

I tried both versions of MQ 7.0 and MQC 7.0.1

neither of them works :S


Before you can say that, you have to try with all the jar files in the <mqinstall>/java/lib path on your class path.

You don't get to pick and choose and say it doesn't work, because our answer will be -- user error, make it work! --


Thanks! My bad.

After adding the pfc.jar to my build path, it works!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Creating MQHeaderIterator Problem
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.