You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Andy Lawrence <an...@gmail.com> on 2012/02/27 18:56:15 UTC

Websphere MQ OSGi jars and missing javax.naming requirement

Hi,

I am attempting to build a feature that installs a Websphere MQ connection
into servicemix 4.4.0. I've been studying the information in
http://servicemix.396122.n5.nabble.com/ServiceMix-4-deploy-JCA-rar-td3400074.htmland
http://servicemix.396122.n5.nabble.com/ServiceMix-4-use-WebSphere-MQ-as-JBI-SU-Solved-td3409123.html,
but I'm still not getting it to work.

I have a built a features file that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<features name="websphere-mq-feature">
    <feature name="websphere-mq" version="7.1.0.0">
        <!-- Creates a feature of the IBM MQ Series dependencies -->

        <!-- <bundle
start-level="55">mvn:com.ibm.msg.client/osgi-jms-prereq/7.1.0.0</bundle>
-->

        <!-- pull geronimo instead of ibm jms spec.  works better in this
karaf -->
        <bundle
start-level="55">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>
        <bundle start-level="55">mvn:com.ibm.msg.client/osgi-nls/7.1.0.0
</bundle>
        <bundle start-level="55">mvn:com.ibm.msg.client/osgi-wmq-nls/7.1.0.0
</bundle>
        <bundle start-level="55"
start='false'>mvn:com.ibm.msg.client/osgi-commonservices-j2se/7.1.0.0
</bundle>
        <bundle start-level="55">mvn:com.ibm.msg.client/osgi-jms/7.1.0.0
</bundle>
        <!-- read somewhere to skip prereq in servicemis, as it conflicts
with geronimo -->
        <!-- <bundle
start-level="55">mvn:com.ibm.msg.client/osgi-wmq-prereq/7.1.0.0</bundle> -->
        <bundle start-level="55">mvn:com.ibm.msg.client/osgi-wmq/7.1.0.0
</bundle>
   </feature>
</features>

and I've successfully installed the relevant jars into my local maven repo:
mvn install:install-file  -DgroupId=com.ibm.msg.client -Dpackaging=jar
-Dversion=7.1.0.0 -DartifactId=osgi-commonservices-j2se
-Dfile=./com.ibm.msg.client.osgi.commonservices.j2se_7.1.0.0.jar
... etc ...

Once I completed that I installed the feature by adding a feature url:
features:addurl
file:///absolute/path/to/websphere-mq-feature/websphere-mq-feature.xml

which causes things to show up in my features list:

karaf@root> features:list|grep websphere
[uninstalled] [7.1.0.0        ] websphere-mq
websphere-mq-feature

but (finally!) when I go to install it, I get this:

karaf@root> features:install -v websphere-mq
Installing feature websphere-mq 7.1.0.0
Found installed bundle: org.apache.geronimo.specs.geronimo-jms_1.1_spec [54]
Installing bundle mvn:com.ibm.msg.client/osgi-nls/7.1.0.0
Installing bundle mvn:com.ibm.msg.client/osgi-wmq-nls/7.1.0.0
Installing bundle mvn:com.ibm.msg.client/osgi-commonservices-j2se/7.1.0.0
Installing bundle mvn:com.ibm.msg.client/osgi-jms/7.1.0.0
Installing bundle mvn:com.ibm.msg.client/osgi-wmq/7.1.0.0
Error executing command: Could not start bundle
mvn:com.ibm.msg.client/osgi-jms/7.1.0.0 in feature(s) websphere-mq-7.1.0.0:
Unresolved constraint in bundle com.ibm.msg.client.osgi.jms [225]: Unable
to resolve 225.0: missing requirement [225.0] package;
(&(package=javax.naming)(version>=1.2.0)(!(version>=2.0.0)))


How do I resolve the javax.naming requirement? I'm doing all this on my mac
(10.7 Lion), if that makes any difference.

Thanks in advance.

Re: Websphere MQ OSGi jars and missing javax.naming requirement

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

You need install a bundle which contain package javax.naming [1.2.0,  
2.0.0).
In SMX 4.4.0, we have javax.naming 0.0.0 from system bundle,  and  
generally when other bundles import packages from system bundle they  
shouldn't specify version range, but it's not the case for  
com.ibm.msg.client/osgi-jms bundle.

Freeman
On 2012-2-28, at 上午1:56, Andy Lawrence wrote:

> Hi,
>
> I am attempting to build a feature that installs a Websphere MQ  
> connection
> into servicemix 4.4.0. I've been studying the information in
> http://servicemix.396122.n5.nabble.com/ServiceMix-4-deploy-JCA-rar-td3400074.htmland
> http://servicemix.396122.n5.nabble.com/ServiceMix-4-use-WebSphere-MQ-as-JBI-SU-Solved-td3409123.html 
> ,
> but I'm still not getting it to work.
>
> I have a built a features file that looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <features name="websphere-mq-feature">
>    <feature name="websphere-mq" version="7.1.0.0">
>        <!-- Creates a feature of the IBM MQ Series dependencies -->
>
>        <!-- <bundle
> start-level="55">mvn:com.ibm.msg.client/osgi-jms-prereq/7.1.0.0</ 
> bundle>
> -->
>
>        <!-- pull geronimo instead of ibm jms spec.  works better in  
> this
> karaf -->
>        <bundle
> start-level="55">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/ 
> 1.1.1</bundle>
>        <bundle start-level="55">mvn:com.ibm.msg.client/osgi-nls/ 
> 7.1.0.0
> </bundle>
>        <bundle start-level="55">mvn:com.ibm.msg.client/osgi-wmq-nls/ 
> 7.1.0.0
> </bundle>
>        <bundle start-level="55"
> start='false'>mvn:com.ibm.msg.client/osgi-commonservices-j2se/7.1.0.0
> </bundle>
>        <bundle start-level="55">mvn:com.ibm.msg.client/osgi-jms/ 
> 7.1.0.0
> </bundle>
>        <!-- read somewhere to skip prereq in servicemis, as it  
> conflicts
> with geronimo -->
>        <!-- <bundle
> start-level="55">mvn:com.ibm.msg.client/osgi-wmq-prereq/7.1.0.0</ 
> bundle> -->
>        <bundle start-level="55">mvn:com.ibm.msg.client/osgi-wmq/ 
> 7.1.0.0
> </bundle>
>   </feature>
> </features>
>
> and I've successfully installed the relevant jars into my local  
> maven repo:
> mvn install:install-file  -DgroupId=com.ibm.msg.client -Dpackaging=jar
> -Dversion=7.1.0.0 -DartifactId=osgi-commonservices-j2se
> -Dfile=./com.ibm.msg.client.osgi.commonservices.j2se_7.1.0.0.jar
> ... etc ...
>
> Once I completed that I installed the feature by adding a feature url:
> features:addurl
> file:///absolute/path/to/websphere-mq-feature/websphere-mq-feature.xml
>
> which causes things to show up in my features list:
>
> karaf@root> features:list|grep websphere
> [uninstalled] [7.1.0.0        ] websphere-mq
> websphere-mq-feature
>
> but (finally!) when I go to install it, I get this:
>
> karaf@root> features:install -v websphere-mq
> Installing feature websphere-mq 7.1.0.0
> Found installed bundle: org.apache.geronimo.specs.geronimo- 
> jms_1.1_spec [54]
> Installing bundle mvn:com.ibm.msg.client/osgi-nls/7.1.0.0
> Installing bundle mvn:com.ibm.msg.client/osgi-wmq-nls/7.1.0.0
> Installing bundle mvn:com.ibm.msg.client/osgi-commonservices-j2se/ 
> 7.1.0.0
> Installing bundle mvn:com.ibm.msg.client/osgi-jms/7.1.0.0
> Installing bundle mvn:com.ibm.msg.client/osgi-wmq/7.1.0.0
> Error executing command: Could not start bundle
> mvn:com.ibm.msg.client/osgi-jms/7.1.0.0 in feature(s) websphere- 
> mq-7.1.0.0:
> Unresolved constraint in bundle com.ibm.msg.client.osgi.jms [225]:  
> Unable
> to resolve 225.0: missing requirement [225.0] package;
> (&(package=javax.naming)(version>=1.2.0)(!(version>=2.0.0)))
>
>
> How do I resolve the javax.naming requirement? I'm doing all this on  
> my mac
> (10.7 Lion), if that makes any difference.
>
> Thanks in advance.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com