You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by lichtin <li...@yahoo.com> on 2012/08/06 17:39:05 UTC

NMR - why the dependency on CXF

Hi
When trying to use NMR Camel component I'm running into its CXF dependency.
Could this dependency be removed? It may well be obsolete by now.

In particular I'm seeing the following problem:

org.osgi.framework.BundleException: Unable to resolve module
org.apache.servicemix.camel.component [187.0] because it is exposed to
package 'javax.xml.bind.annotation' from org.apache.felix.framework [0] and
org.apache.servicemix.specs.jaxb-api-2.2 [93.0] via two dependency chains.

Chain 1:
  org.apache.servicemix.camel.component [187.0]
    import: (package=javax.xml.bind.annotation)
     |
    export: package=javax.xml.bind.annotation
  org.apache.felix.framework [0]

Chain 2:
  org.apache.servicemix.camel.component [187.0]
    import: (&(package=javax.xml.ws)(version>=2.2.0))
     |
    export: package=javax.xml.ws; uses:=javax.xml.bind.annotation
  org.apache.servicemix.specs.jaxws-api-2.2 [94.0]
    import: (&(package=javax.xml.bind.annotation)(version>=2.2.0))
     |
    export: package=javax.xml.bind.annotation
  org.apache.servicemix.specs.jaxb-api-2.2 [93.0]



--
View this message in context: http://servicemix.396122.n5.nabble.com/NMR-why-the-dependency-on-CXF-tp5714084.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: NMR - why the dependency on CXF

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Freeman,

that sounds good. So nmr should be quite lightweight now in its 
dependencies.

Christian

Am 07.08.2012 09:44, schrieb Freeman Fang:
> Hi Christian,
>
> The package like javax.xml.bind.annotation actually is from the auto-generated code from wsdl which is only used for tests,  that's from the incorrect cxf-codegen-plugin configuration in camel-nmr module, maven-bundle-plugin don't scan/check tests classes but somehow previously the auto-generated code are in sourceRoot folder but not the expected testSourceRoot folder, I just fixed it.
> -                            <sourceRoot>${basedir}/target/generated/test/java</sourceRoot>
> +                            <testSourceRoot>${basedir}/target/generated/test/java</testSourceRoot>
>
> Freeman
> -------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
> http://blog.sina.com.cn/u/1473905042
> weibo: http://weibo.com/u/1473905042
>
> On 2012-8-7, at 上午12:44, Christian Schneider wrote:
>
>> This does not seem to be a dependency on cxf. The packages are just API packages that should be available from servicemix directly.
>>
>> Christian
>>
>>
>> Am 06.08.2012 17:39, schrieb lichtin:
>>> Hi
>>> When trying to use NMR Camel component I'm running into its CXF dependency.
>>> Could this dependency be removed? It may well be obsolete by now.
>>>
>>> In particular I'm seeing the following problem:
>>>
>>> org.osgi.framework.BundleException: Unable to resolve module
>>> org.apache.servicemix.camel.component [187.0] because it is exposed to
>>> package 'javax.xml.bind.annotation' from org.apache.felix.framework [0] and
>>> org.apache.servicemix.specs.jaxb-api-2.2 [93.0] via two dependency chains.
>>>
>>> Chain 1:
>>>    org.apache.servicemix.camel.component [187.0]
>>>      import: (package=javax.xml.bind.annotation)
>>>       |
>>>      export: package=javax.xml.bind.annotation
>>>    org.apache.felix.framework [0]
>>>
>>> Chain 2:
>>>    org.apache.servicemix.camel.component [187.0]
>>>      import: (&(package=javax.xml.ws)(version>=2.2.0))
>>>       |
>>>      export: package=javax.xml.ws; uses:=javax.xml.bind.annotation
>>>    org.apache.servicemix.specs.jaxws-api-2.2 [94.0]
>>>      import: (&(package=javax.xml.bind.annotation)(version>=2.2.0))
>>>       |
>>>      export: package=javax.xml.bind.annotation
>>>    org.apache.servicemix.specs.jaxb-api-2.2 [93.0]
>>>
>>>
>>>
>>> --
>>> View this message in context: http://servicemix.396122.n5.nabble.com/NMR-why-the-dependency-on-CXF-tp5714084.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>> -- 
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> Talend Application Integration Division http://www.talend.com
>>
>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: NMR - why the dependency on CXF

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

The package like javax.xml.bind.annotation actually is from the auto-generated code from wsdl which is only used for tests,  that's from the incorrect cxf-codegen-plugin configuration in camel-nmr module, maven-bundle-plugin don't scan/check tests classes but somehow previously the auto-generated code are in sourceRoot folder but not the expected testSourceRoot folder, I just fixed it.
-                            <sourceRoot>${basedir}/target/generated/test/java</sourceRoot>
+                            <testSourceRoot>${basedir}/target/generated/test/java</testSourceRoot>

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

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-8-7, at 上午12:44, Christian Schneider wrote:

> This does not seem to be a dependency on cxf. The packages are just API packages that should be available from servicemix directly.
> 
> Christian
> 
> 
> Am 06.08.2012 17:39, schrieb lichtin:
>> Hi
>> When trying to use NMR Camel component I'm running into its CXF dependency.
>> Could this dependency be removed? It may well be obsolete by now.
>> 
>> In particular I'm seeing the following problem:
>> 
>> org.osgi.framework.BundleException: Unable to resolve module
>> org.apache.servicemix.camel.component [187.0] because it is exposed to
>> package 'javax.xml.bind.annotation' from org.apache.felix.framework [0] and
>> org.apache.servicemix.specs.jaxb-api-2.2 [93.0] via two dependency chains.
>> 
>> Chain 1:
>>   org.apache.servicemix.camel.component [187.0]
>>     import: (package=javax.xml.bind.annotation)
>>      |
>>     export: package=javax.xml.bind.annotation
>>   org.apache.felix.framework [0]
>> 
>> Chain 2:
>>   org.apache.servicemix.camel.component [187.0]
>>     import: (&(package=javax.xml.ws)(version>=2.2.0))
>>      |
>>     export: package=javax.xml.ws; uses:=javax.xml.bind.annotation
>>   org.apache.servicemix.specs.jaxws-api-2.2 [94.0]
>>     import: (&(package=javax.xml.bind.annotation)(version>=2.2.0))
>>      |
>>     export: package=javax.xml.bind.annotation
>>   org.apache.servicemix.specs.jaxb-api-2.2 [93.0]
>> 
>> 
>> 
>> --
>> View this message in context: http://servicemix.396122.n5.nabble.com/NMR-why-the-dependency-on-CXF-tp5714084.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 
> 
> -- 
> Christian Schneider
> http://www.liquid-reality.de
> 
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
> 


Re: NMR - why the dependency on CXF

Posted by Christian Schneider <ch...@die-schneider.net>.
This does not seem to be a dependency on cxf. The packages are just API 
packages that should be available from servicemix directly.

Christian


Am 06.08.2012 17:39, schrieb lichtin:
> Hi
> When trying to use NMR Camel component I'm running into its CXF dependency.
> Could this dependency be removed? It may well be obsolete by now.
>
> In particular I'm seeing the following problem:
>
> org.osgi.framework.BundleException: Unable to resolve module
> org.apache.servicemix.camel.component [187.0] because it is exposed to
> package 'javax.xml.bind.annotation' from org.apache.felix.framework [0] and
> org.apache.servicemix.specs.jaxb-api-2.2 [93.0] via two dependency chains.
>
> Chain 1:
>    org.apache.servicemix.camel.component [187.0]
>      import: (package=javax.xml.bind.annotation)
>       |
>      export: package=javax.xml.bind.annotation
>    org.apache.felix.framework [0]
>
> Chain 2:
>    org.apache.servicemix.camel.component [187.0]
>      import: (&(package=javax.xml.ws)(version>=2.2.0))
>       |
>      export: package=javax.xml.ws; uses:=javax.xml.bind.annotation
>    org.apache.servicemix.specs.jaxws-api-2.2 [94.0]
>      import: (&(package=javax.xml.bind.annotation)(version>=2.2.0))
>       |
>      export: package=javax.xml.bind.annotation
>    org.apache.servicemix.specs.jaxb-api-2.2 [93.0]
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/NMR-why-the-dependency-on-CXF-tp5714084.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


-- 
  
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: NMR - why the dependency on CXF

Posted by Freeman Fang <fr...@gmail.com>.
Btw, I agree that camel-nmr shouldn't rely on jaxb/jaxws stuff, it was pulled in because of the test code, I just fixed it, SMX4-1204[1] track this issue
[1]https://issues.apache.org/jira/browse/SMX4-1204

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

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-8-7, at 上午8:01, Freeman Fang wrote:

> Hi,
> 
> You need tell us which OSGi container/version you're using.
> I guess you're using Karaf but not Servicemix, right?
> This error comes from that system bundle 0 also export jaxb api package, this doesn't happen in servicemix. Servicemix is fine-tuned with system packages and other configuration so ensure it can support camel/cxf/activemq OOTB.
> 
> Freeman
> -------------
> Freeman Fang
> 
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
> http://blog.sina.com.cn/u/1473905042
> weibo: http://weibo.com/u/1473905042
> 
> On 2012-8-6, at 下午11:39, lichtin wrote:
> 
>> Hi
>> When trying to use NMR Camel component I'm running into its CXF dependency.
>> Could this dependency be removed? It may well be obsolete by now.
>> 
>> In particular I'm seeing the following problem:
>> 
>> org.osgi.framework.BundleException: Unable to resolve module
>> org.apache.servicemix.camel.component [187.0] because it is exposed to
>> package 'javax.xml.bind.annotation' from org.apache.felix.framework [0] and
>> org.apache.servicemix.specs.jaxb-api-2.2 [93.0] via two dependency chains.
>> 
>> Chain 1:
>>  org.apache.servicemix.camel.component [187.0]
>>    import: (package=javax.xml.bind.annotation)
>>     |
>>    export: package=javax.xml.bind.annotation
>>  org.apache.felix.framework [0]
>> 
>> Chain 2:
>>  org.apache.servicemix.camel.component [187.0]
>>    import: (&(package=javax.xml.ws)(version>=2.2.0))
>>     |
>>    export: package=javax.xml.ws; uses:=javax.xml.bind.annotation
>>  org.apache.servicemix.specs.jaxws-api-2.2 [94.0]
>>    import: (&(package=javax.xml.bind.annotation)(version>=2.2.0))
>>     |
>>    export: package=javax.xml.bind.annotation
>>  org.apache.servicemix.specs.jaxb-api-2.2 [93.0]
>> 
>> 
>> 
>> --
>> View this message in context: http://servicemix.396122.n5.nabble.com/NMR-why-the-dependency-on-CXF-tp5714084.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 


Re: NMR - why the dependency on CXF

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

Please in English, :-)
Though English isn't the first language for lots of us on this forum, but it's the only way that all of us can understand each other. :-)
Thanks
Freeman
-------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-8-10, at 下午8:49, lichtin wrote:

> Danke! Wirklich sehr nett von dir. Ich glaub jetzt check ichs endlich.
> 
> 
> Der Pax-Exam läuft seit heute auch, hab ich doch was gelernt diese Woche.
> (Und CFX werf ich wieder raus, sobald der neue NMR erhältlich ist).
> 
> Dir auch ein schönes WE
> Martin
> 
> 
> 
>> ________________________________
>> From: Christian Schneider [via ServiceMix] <ml...@n5.nabble.com>
>> To: lichtin <li...@yahoo.com> 
>> Sent: Friday, August 10, 2012 11:14 AM
>> Subject: Re: NMR - why the dependency on CXF
>> 
>> 
>> It is more the other way round. Servicemix is a distribution that 
>> contains karaf, camel and cxf. So it is the easiest way to start working 
>> with these projects together. 
>> 
>> With a raw Karaf 2.2.x you currently have to replace the jre.properties 
>> with jre.properties.cxf (both in etc dir). This sets the exports of the 
>> system bundle in the way cxf and camel need them. 
>> 
>> In Karaf 2.x you can then install camel and cxf with: 
>> features:chooseurl camel 2.9.2 
>> features:chooseurl cxf 2.6.1 
>> 
>> The upcoming versions of Karaf (2.3.0 and 3.0.0) will make working with 
>> Camel and CXF as easy as in Servicemix. The jre.properties does not have 
>> to be changed anymore. 
>> 
>> In Karaf 3 the syntax to install camel and cxf will change slightly: 
>> feature:repo-add camel 2.9.2 
>> feature:repo-add cxf 2.6.1 
>> 
>> So installing camel and cxf is really easy even on a raw Karaf. A reason 
>> to still use servicemix is that it is all in the distro so you do not 
>> need an internet connection or a local maven repo. 
>> 
>> Christian 
>> 
>> 
>>> 
>>> This error comes from that system bundle 0 also export jaxb api package, 
>>> this doesn't happen in servicemix. Servicemix is fine-tuned with system 
>>> packages and other configuration so ensure it can support 
>>> camel/cxf/activemq OOTB. 
>>> 
>>> Good to know. It also means I need to straighten out my understanding of 
>>> Karaf vs SMX :-( 
>>> I always assumed Karaf is a 'convenience' layer (offering stuff like a 
>>> shell, etc) on top of SMX... 
>>> 
>>> And, thanks for SMX4-1204! 
>>> 
>>> 
>>> 
>>> -- 
>>> View this message in context: http://servicemix.396122.n5.nabble.com/NMR-why-the-dependency-on-CXF-tp5714084p5714095.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com. -- 
>> Christian Schneider 
>> http://www.liquid-reality.de
>> 
>> Open Source Architect 
>> Talend Application Integration Division http://www.talend.com
>> 
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/NMR-why-the-dependency-on-CXF-tp5714084p5714126.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: NMR - why the dependency on CXF

Posted by lichtin <li...@yahoo.com>.
Danke! Wirklich sehr nett von dir. Ich glaub jetzt check ichs endlich.


Der Pax-Exam läuft seit heute auch, hab ich doch was gelernt diese Woche.
(Und CFX werf ich wieder raus, sobald der neue NMR erhältlich ist).

Dir auch ein schönes WE
Martin



>________________________________
> From: Christian Schneider [via ServiceMix] <ml...@n5.nabble.com>
>To: lichtin <li...@yahoo.com> 
>Sent: Friday, August 10, 2012 11:14 AM
>Subject: Re: NMR - why the dependency on CXF
> 
>
>It is more the other way round. Servicemix is a distribution that 
>contains karaf, camel and cxf. So it is the easiest way to start working 
>with these projects together. 
>
>With a raw Karaf 2.2.x you currently have to replace the jre.properties 
>with jre.properties.cxf (both in etc dir). This sets the exports of the 
>system bundle in the way cxf and camel need them. 
>
>In Karaf 2.x you can then install camel and cxf with: 
>features:chooseurl camel 2.9.2 
>features:chooseurl cxf 2.6.1 
>
>The upcoming versions of Karaf (2.3.0 and 3.0.0) will make working with 
>Camel and CXF as easy as in Servicemix. The jre.properties does not have 
>to be changed anymore. 
>
>In Karaf 3 the syntax to install camel and cxf will change slightly: 
>feature:repo-add camel 2.9.2 
>feature:repo-add cxf 2.6.1 
>
>So installing camel and cxf is really easy even on a raw Karaf. A reason 
>to still use servicemix is that it is all in the distro so you do not 
>need an internet connection or a local maven repo. 
>
>Christian 
>
>
>> 
>> This error comes from that system bundle 0 also export jaxb api package, 
>> this doesn't happen in servicemix. Servicemix is fine-tuned with system 
>> packages and other configuration so ensure it can support 
>> camel/cxf/activemq OOTB. 
>> 
>> Good to know. It also means I need to straighten out my understanding of 
>> Karaf vs SMX :-( 
>> I always assumed Karaf is a 'convenience' layer (offering stuff like a 
>> shell, etc) on top of SMX... 
>> 
>> And, thanks for SMX4-1204! 
>> 
>> 
>> 
>> -- 
>> View this message in context: http://servicemix.396122.n5.nabble.com/NMR-why-the-dependency-on-CXF-tp5714084p5714095.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com. -- 
>Christian Schneider 
>http://www.liquid-reality.de
>
>Open Source Architect 
>Talend Application Integration Division http://www.talend.com
>



--
View this message in context: http://servicemix.396122.n5.nabble.com/NMR-why-the-dependency-on-CXF-tp5714084p5714126.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: NMR - why the dependency on CXF

Posted by Christian Schneider <ch...@die-schneider.net>.
It is more the other way round. Servicemix is a distribution that 
contains karaf, camel and cxf. So it is the easiest way to start working 
with these projects together.

With a raw Karaf 2.2.x you currently have to replace the jre.properties 
with jre.properties.cxf (both in etc dir). This sets the exports of the 
system bundle in the way cxf and camel need them.

In Karaf 2.x you can then install camel and cxf with:
features:chooseurl camel 2.9.2
features:chooseurl cxf 2.6.1

The upcoming versions of Karaf (2.3.0 and 3.0.0) will make working with 
Camel and CXF as easy as in Servicemix. The jre.properties does not have 
to be changed anymore.

In Karaf 3 the syntax to install camel and cxf will change slightly:
feature:repo-add camel 2.9.2
feature:repo-add cxf 2.6.1

So installing camel and cxf is really easy even on a raw Karaf. A reason 
to still use servicemix is that it is all in the distro so you do not 
need an internet connection or a local maven repo.

Christian


>
> This error comes from that system bundle 0 also export jaxb api package,
> this doesn't happen in servicemix. Servicemix is fine-tuned with system
> packages and other configuration so ensure it can support
> camel/cxf/activemq OOTB.
>
> Good to know. It also means I need to straighten out my understanding of
> Karaf vs SMX :-(
> I always assumed Karaf is a 'convenience' layer (offering stuff like a
> shell, etc) on top of SMX...
>
> And, thanks for SMX4-1204!
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/NMR-why-the-dependency-on-CXF-tp5714084p5714095.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: NMR - why the dependency on CXF

Posted by lichtin <li...@yahoo.com>.
Freeman-2 wrote
> 
> You need tell us which OSGi container/version you're using. I guess you're
> using Karaf but not Servicemix, right?
> 

Correct. I'm using labs-paxexam-karaf with Karaf version 2.2.8.
The bundles are loaded with a features file containing more or less:

  
<repository>mvn:org.apache.camel.karaf/apache-camel/2.10.0/xml/features</repository>
  
<repository>mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/1.5.0/xml/features</repository>

  
<bundle>mvn:org.apache.servicemix.camel/org.apache.servicemix.camel.component/4.4.2</bundle>
   <feature>nmr</feature>
   <feature>cxf</feature>
   <feature>camel</feature>
   <feature>camel-jms</feature>


Freeman-2 wrote
> 
> This error comes from that system bundle 0 also export jaxb api package,
> this doesn't happen in servicemix. Servicemix is fine-tuned with system
> packages and other configuration so ensure it can support
> camel/cxf/activemq OOTB.
> 

Good to know. It also means I need to straighten out my understanding of
Karaf vs SMX :-(
I always assumed Karaf is a 'convenience' layer (offering stuff like a
shell, etc) on top of SMX...

And, thanks for SMX4-1204!



--
View this message in context: http://servicemix.396122.n5.nabble.com/NMR-why-the-dependency-on-CXF-tp5714084p5714095.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: NMR - why the dependency on CXF

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

You need tell us which OSGi container/version you're using.
I guess you're using Karaf but not Servicemix, right?
This error comes from that system bundle 0 also export jaxb api package, this doesn't happen in servicemix. Servicemix is fine-tuned with system packages and other configuration so ensure it can support camel/cxf/activemq OOTB.

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

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-8-6, at 下午11:39, lichtin wrote:

> Hi
> When trying to use NMR Camel component I'm running into its CXF dependency.
> Could this dependency be removed? It may well be obsolete by now.
> 
> In particular I'm seeing the following problem:
> 
> org.osgi.framework.BundleException: Unable to resolve module
> org.apache.servicemix.camel.component [187.0] because it is exposed to
> package 'javax.xml.bind.annotation' from org.apache.felix.framework [0] and
> org.apache.servicemix.specs.jaxb-api-2.2 [93.0] via two dependency chains.
> 
> Chain 1:
>  org.apache.servicemix.camel.component [187.0]
>    import: (package=javax.xml.bind.annotation)
>     |
>    export: package=javax.xml.bind.annotation
>  org.apache.felix.framework [0]
> 
> Chain 2:
>  org.apache.servicemix.camel.component [187.0]
>    import: (&(package=javax.xml.ws)(version>=2.2.0))
>     |
>    export: package=javax.xml.ws; uses:=javax.xml.bind.annotation
>  org.apache.servicemix.specs.jaxws-api-2.2 [94.0]
>    import: (&(package=javax.xml.bind.annotation)(version>=2.2.0))
>     |
>    export: package=javax.xml.bind.annotation
>  org.apache.servicemix.specs.jaxb-api-2.2 [93.0]
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/NMR-why-the-dependency-on-CXF-tp5714084.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.