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 » IBM MQ Java / JMS » com.ibm.mq.headers.jar and the OSGi bundle.

Post new topic  Reply to topic
 com.ibm.mq.headers.jar and the OSGi bundle. « View previous topic :: View next topic » 
Author Message
edub1
PostPosted: Tue Oct 04, 2011 6:09 pm    Post subject: com.ibm.mq.headers.jar and the OSGi bundle. Reply with quote

Apprentice

Joined: 01 Apr 2008
Posts: 28

Hello all

We have need of the headers.jar within our OSGi container (ServiceMix) but the service that relies on the classes in the headers.jar fails with the following error:

Code:

Caused by: java.lang.ClassNotFoundException: com.ibm.mq.headers.MQHeader not found by com.ibm.msg.client.osgi.wmq [231]
        at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:812)[org.apache.felix.framework-3.0.9-fuse-01-06.jar:]
        at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)[org.apache.felix.framework-3.0.9-fuse-01-06.jar:]
        at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1806)[org.apache.felix.framework-3.0.9-fuse-01-06.jar:]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)[:1.6.0_22]
        at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:670)[org.apache.felix.framework-3.0.9-fuse-01-06.jar:]
        at org.apache.felix.framework.resolver.WireImpl.getClass(WireImpl.java:102)[org.apache.felix.framework-3.0.9-fuse-01-06.jar:]
        at org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1425)[org.apache.felix.framework-3.0.9-fuse-01-06.jar:]
        at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:747)[org.apache.felix.framework-3.0.9-fuse-01-06.jar:]
        at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)[org.apache.felix.framework-3.0.9-fuse-01-06.jar:]
        at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1806)[org.apache.felix.framework-3.0.9-fuse-01-06.jar:]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)[:1.6.0_22]



Looking at what what is exported...

Code:
Export-Package =
   com.ibm.jms;uses=javax.jms,
   com.ibm.mq,
   com.ibm.mq.constants,
   com.ibm.mq.exits,
   com.ibm.mq.external,
   [b]com.ibm.mq.headers,[/b]
   com.ibm.mq.jmqi,
   com.ibm.mq.jmqi.handles,
   com.ibm.mq.jmqi.local,
   com.ibm.mq.jmqi.remote,
   com.ibm.mq.jmqi.remote.v6,
   com.ibm.mq.jmqi.system,
   com.ibm.mq.jmqi.test.utils,
   com.ibm.mq.jms;uses=javax.jms,
   [b]com.ibm.mq.pcf,[/b]
   com.ibm.mqst.apijava,
   com.ibm.msg.client.osgi.wmq.factories,
   com.ibm.msg.client.wmq;uses=javax.jms,
   com.ibm.msg.client.wmq.common;uses=javax.jms,
   com.ibm.msg.client.wmq.factories;uses=javax.jms,
   com.ibm.msg.client.wmq.factories.admin;uses=javax.jms,
   com.ibm.msg.client.wmq.v6;uses=javax.jms


I see that com.ibm.mq.headers should be exported by this bundle, yet when I look at the OSGi jar I do not see com.ibm.mq.headers.jar and com.ibm.mq.pcf.jar:

Code:
~/mq_jar$ jar -tvf com.ibm.msg.client.osgi.wmq_7.0.1.6.jar
     0 Mon Jul 25 15:08:40 CDT 2011 META-INF/
  4103 Mon Jul 25 15:08:38 CDT 2011 META-INF/MANIFEST.MF
1065299 Mon Jul 25 15:06:28 CDT 2011 com.ibm.mq.jmqi.jar
204328 Mon Jul 25 15:06:58 CDT 2011 com.ibm.mq.jmqi.local.jar
545418 Mon Jul 25 15:07:12 CDT 2011 com.ibm.mq.jmqi.remote.jar
161549 Mon Jul 25 15:06:28 CDT 2011 com.ibm.mq.jmqi.system.jar
352212 Mon Jul 25 15:08:02 CDT 2011 com.ibm.mqjms.jar
258989 Mon Jul 25 15:07:52 CDT 2011 com.ibm.msg.client.wmq.common.jar
248470 Mon Jul 25 15:08:10 CDT 2011 com.ibm.msg.client.wmq.factories.jar
260907 Mon Jul 25 15:08:06 CDT 2011 com.ibm.msg.client.wmq.jar
1046635 Mon Jul 25 15:08:06 CDT 2011 com.ibm.msg.client.wmq.v6.jar
2011813 Mon Jul 25 15:06:06 CDT 2011 dhbcore.jar


Is there a reason for this? Is there something we are missing? Everything else seems to work fine for this deployment that doesn't depend on the header classes.

Thanks for any help you can give.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 04, 2011 7:47 pm    Post subject: Reply with quote

Grand High Poobah

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

Are you trying to bundle MQ jars with your software?
The right thing to do is to install the MQ Client.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
edub1
PostPosted: Tue Oct 04, 2011 8:03 pm    Post subject: Reply with quote

Apprentice

Joined: 01 Apr 2008
Posts: 28

No I'm attempting to deploy the OSGi bundle's provided by IBM with the MQ Client.
Back to top
View user's profile Send private message
edub1
PostPosted: Thu Oct 06, 2011 6:21 am    Post subject: Reply with quote

Apprentice

Joined: 01 Apr 2008
Posts: 28

So I went back and re-read the doc while waiting on a response from IBM and something isn't. quite clear to me, but is possibly the reason this isn't working for us.

According to
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=%2Fcom.ibm.mq.csqzaw.doc%2Fjm35080_.htm


Quote:

A user bundle can be aware of the WebSphere MQ classes for JMS bundles, but the WebSphere MQ classes for JMS bundles are not aware of any user bundle. As a result, the class loader used in a WebSphere MQ classes for JMS bundle cannot load a channel exit class that is in a user bundle.


Would the headers.jar be considered a channel exit class? If so I find it odd that they would even include them. Or am I reading this part wrong all together?

I guess if it is the case that would explain why its failing even though we have everything else set up per the recommendations (CLASSPATH, LIBPATH, etc).

Additional info: We've replicated the same, or very close to the same results on Linux and AIX with various versions of Java (IBM,Sun, OpenJDK) and MQ Clients/Jars ( 7.0.1.1, 1.3 and 1.6).
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Oct 06, 2011 6:36 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Just to confirm...
You have already installed the actual MQ Client on the machine you are deploying the OSGI bundle to?

As your link says, "You must set your system path or library path correctly so that the OSGi runtime environment can find any required DLL files or shared libraries." so if you are having trouble finding com.ibm.header.jar, then it's likely because the OSGI runtime can't find it.

The OSGI jar files are not a complete package, they are a set of layers to access the components of the complete package.
Back to top
View user's profile Send private message
edub1
PostPosted: Thu Oct 06, 2011 8:02 am    Post subject: Reply with quote

Apprentice

Joined: 01 Apr 2008
Posts: 28

Yeah we've tried this on systems with Client and Client+ server and various combinations of versions and OSs with and without paths.

Setting $CLASSPATH seems to do nothing so far. I've even set class paths directly to the /usr/mqm/java/lib jars in the builds manifest.


Bundle 280 is the one having the issues.
Code:
[ 280] [Active     ] [            ] [       ] [   60] WMQ Processor :: WMQ Utilities (1.0.0)
[ 293] [Resolved   ] [            ] [       ] [   60] WMQ NLS Plug-in (7.0.1.1)
                                       Hosts: 300
[ 294] [Active     ] [            ] [       ] [   60] Common Services J2SE Plug-in (7.0.1.1)
[ 296] [Active     ] [            ] [       ] [   60] WMQ prereq Plug-in (7.0.1.1)
[ 297] [Active     ] [            ] [       ] [   60] JMS client Plug-in (7.0.1.1)
[ 298] [Active     ] [            ] [       ] [   60] JMS prereq Plug-in (7.0.1.1)
[ 299] [Active     ] [            ] [       ] [   60] DirectIP Plug-in (7.0.1.1)
[ 300] [Active     ] [            ] [       ] [   60] NLS Plug-in (7.0.1.1)
                                       Fragments: 293
[ 301] [Active     ] [            ] [       ] [   60] WMQ provider Plug-in (7.0.1.1)


In my post above I have a list of exports that come from Bundle 301. If I remove 301, which advertises com.ibm.mq.headers, 280 fails to start, because it cannot find the headers class.

Is there something special about the headers package that it would load differently than the other classes we are using fine? I guess I'm having trouble understanding why there are no issues finding any of the other classes.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Oct 06, 2011 8:05 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You are deep into PMR country, and I hope you have been following up this thread with work on a PMR.
Back to top
View user's profile Send private message
edub1
PostPosted: Thu Oct 06, 2011 8:23 am    Post subject: Reply with quote

Apprentice

Joined: 01 Apr 2008
Posts: 28

Yeah we have. This post is the result of my impatients and hoping someone here may have hit this issue before while waiting for our responses. Oh well, thanks for your time!
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 » IBM MQ Java / JMS » com.ibm.mq.headers.jar and the OSGi bundle.
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.