You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Jeff Melby <jm...@gmail.com> on 2012/01/26 17:05:13 UTC
Suppress javax.jws from JDK 1.6
How can I configure Felix to suppress the javax.ws classes included in JDK
1.6? The problem I am running into is using CXF DOSGi with JAX-WS web
service classes. The cxf-bundle-minimal is unable to find the @WebService
annotation on my web service interfaces because the annotation map has a
different WebService.class object than the cxf bundle is looking for. I
have included the proper javax.jws import in my own bundle's mainifest and
I know that the annotations are picked up... when I debug into the code,
however, I see that the class object for WebService.class is different than
the one that cxf is looking for when it calls
cls.getAnnotation(WebService.class). I am expecting that instead both the
cxf bundle and my own web service bundle should both be using the javax.jws
class from the geronimo-ws-metadata_2.0_spec bundle. I can make the problem
go away by using JDK 1.5 instead (where javax.jws is not included in the
JDK), and everything works. Can anyone help point me in the right direction?
Thanks,
Jeff
Re: Suppress javax.jws from JDK 1.6
Posted by Jeff Melby <jm...@gmail.com>.
I am using the default config.properties in the felix 3.2.1 installation,
so the bootdelegation properties are not set, nor am I exporting any
packages from the system bundle that are not exported by default (not sure
how I would tell what is exported live--is there a gogo command for that?)
Here is what I'm seeing for the which command for the javax.jws.WebService
class:
(For my own bundle with the web service)
g! which 63 javax.jws.WebService
Loaded from: org.apache.geronimo.specs.geronimo-ws-metadata_2.0_spec [23]
(For the CXF bundle)
g! which 7 javax.jws.WebService
Loaded from: boot class loader
On Thu, Jan 26, 2012 at 10:28 AM, Justin Edelson
<ju...@justinedelson.com>wrote:
> Hi Jeff,
> By default, this package should not be visible inside the OSGi
> container. What packages is the system bundle exporting? What is the
> boot delegation property set to?
>
> Justin
>
> On Thu, Jan 26, 2012 at 11:05 AM, Jeff Melby <jm...@gmail.com> wrote:
> > How can I configure Felix to suppress the javax.ws classes included in
> JDK
> > 1.6? The problem I am running into is using CXF DOSGi with JAX-WS web
> > service classes. The cxf-bundle-minimal is unable to find the @WebService
> > annotation on my web service interfaces because the annotation map has a
> > different WebService.class object than the cxf bundle is looking for. I
> > have included the proper javax.jws import in my own bundle's mainifest
> and
> > I know that the annotations are picked up... when I debug into the code,
> > however, I see that the class object for WebService.class is different
> than
> > the one that cxf is looking for when it calls
> > cls.getAnnotation(WebService.class). I am expecting that instead both the
> > cxf bundle and my own web service bundle should both be using the
> javax.jws
> > class from the geronimo-ws-metadata_2.0_spec bundle. I can make the
> problem
> > go away by using JDK 1.5 instead (where javax.jws is not included in the
> > JDK), and everything works. Can anyone help point me in the right
> direction?
> >
> > Thanks,
> > Jeff
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: Suppress javax.jws from JDK 1.6
Posted by Justin Edelson <ju...@justinedelson.com>.
Hi Jeff,
By default, this package should not be visible inside the OSGi
container. What packages is the system bundle exporting? What is the
boot delegation property set to?
Justin
On Thu, Jan 26, 2012 at 11:05 AM, Jeff Melby <jm...@gmail.com> wrote:
> How can I configure Felix to suppress the javax.ws classes included in JDK
> 1.6? The problem I am running into is using CXF DOSGi with JAX-WS web
> service classes. The cxf-bundle-minimal is unable to find the @WebService
> annotation on my web service interfaces because the annotation map has a
> different WebService.class object than the cxf bundle is looking for. I
> have included the proper javax.jws import in my own bundle's mainifest and
> I know that the annotations are picked up... when I debug into the code,
> however, I see that the class object for WebService.class is different than
> the one that cxf is looking for when it calls
> cls.getAnnotation(WebService.class). I am expecting that instead both the
> cxf bundle and my own web service bundle should both be using the javax.jws
> class from the geronimo-ws-metadata_2.0_spec bundle. I can make the problem
> go away by using JDK 1.5 instead (where javax.jws is not included in the
> JDK), and everything works. Can anyone help point me in the right direction?
>
> Thanks,
> Jeff
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Suppress javax.jws from JDK 1.6
Posted by Felix Meschberger <fm...@adobe.com>.
Hi,
Am 27.01.2012 um 07:58 schrieb Christian Schneider:
> Sounds like we could synchronize the Karaf list with Felix. The versions
> sound useful. I will check with the other Karaf developers.
What I have done for Sling (Launchpad Base) is that I took the Felix JRE exports with versions and uses clauses but removed all XML, WS, JTA (mostly javax stuff).
So in the framework I have two options then: Install a system bundle fragment exposing the plattform packages again (Sling has those for XML and Activation) or install bundles exposing these packages as regular bundles.
Thus I have full freedom of exposing whatever is actually needed by the application without touching the static configuration.
Regards
Felix
>
> Christian
>
> Am 27.01.2012 00:30, schrieb Jeff Melby:
>> Thanks for the responses. I confirmed that the system bundle is indeed
>> exporting javax.jws from the jdk:
>>
>> g! inspect package capability 0
>> org.apache.felix.framework [0] exports packages:
>> ------------------------------------------------
>> ...
>> javax.jws; version=0.0.0.1_006_JavaSE imported by:
>> org.apache.cxf.bundle-minimal [7]
>> javax.jws.soap; version=0.0.0.1_006_JavaSE imported by:
>> org.apache.cxf.bundle-minimal [7]
>> ...
>>
>> So, the CXF bundle was grabbing that one and my own bundle was grabbing the
>> one from the geronimo spec bundle.
>>
>> Taking the idea from Christian, I changed the
>> "org.osgi.framework.system.packages" in the felix config.properties file to
>> a modified list of exports. I didn't use the list in the karaf
>> jre.properties.cxf directly as it doesn't specify versions and is missing
>> framework packages--I took the output from the "inspect package capability
>> 0" command and removed the javax.jws and javax.jws.soap exports. This
>> worked... so now both bundles are properly using the geronimo spec bundle
>> versions of the WebService annotation.
>>
>> -Jeff
>>
>>
>> On Thu, Jan 26, 2012 at 12:11 PM, Felix Meschberger<fm...@adobe.com>wrote:
>>
>>> Hi,
>>>
>>> If you use the Felix main distributable there should be a
>>> jre-1.6.properties file which lists the package as a system bundle
>>> "export". You might want to remove it from there.
>>>
>>> Hope this helps
>>>
>>> Regards
>>> Felix
>>>
>>> Am 26.01.2012 um 17:05 schrieb Jeff Melby:
>>>
>>>> How can I configure Felix to suppress the javax.ws classes included in
>>> JDK
>>>> 1.6? The problem I am running into is using CXF DOSGi with JAX-WS web
>>>> service classes. The cxf-bundle-minimal is unable to find the @WebService
>>>> annotation on my web service interfaces because the annotation map has a
>>>> different WebService.class object than the cxf bundle is looking for. I
>>>> have included the proper javax.jws import in my own bundle's mainifest
>>> and
>>>> I know that the annotations are picked up... when I debug into the code,
>>>> however, I see that the class object for WebService.class is different
>>> than
>>>> the one that cxf is looking for when it calls
>>>> cls.getAnnotation(WebService.class). I am expecting that instead both the
>>>> cxf bundle and my own web service bundle should both be using the
>>> javax.jws
>>>> class from the geronimo-ws-metadata_2.0_spec bundle. I can make the
>>> problem
>>>> go away by using JDK 1.5 instead (where javax.jws is not included in the
>>>> JDK), and everything works. Can anyone help point me in the right
>>> direction?
>>>> Thanks,
>>>> Jeff
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>
>
> --
>
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Suppress javax.jws from JDK 1.6
Posted by Christian Schneider <ch...@die-schneider.net>.
Sounds like we could synchronize the Karaf list with Felix. The versions
sound useful. I will check with the other Karaf developers.
Christian
Am 27.01.2012 00:30, schrieb Jeff Melby:
> Thanks for the responses. I confirmed that the system bundle is indeed
> exporting javax.jws from the jdk:
>
> g! inspect package capability 0
> org.apache.felix.framework [0] exports packages:
> ------------------------------------------------
> ...
> javax.jws; version=0.0.0.1_006_JavaSE imported by:
> org.apache.cxf.bundle-minimal [7]
> javax.jws.soap; version=0.0.0.1_006_JavaSE imported by:
> org.apache.cxf.bundle-minimal [7]
> ...
>
> So, the CXF bundle was grabbing that one and my own bundle was grabbing the
> one from the geronimo spec bundle.
>
> Taking the idea from Christian, I changed the
> "org.osgi.framework.system.packages" in the felix config.properties file to
> a modified list of exports. I didn't use the list in the karaf
> jre.properties.cxf directly as it doesn't specify versions and is missing
> framework packages--I took the output from the "inspect package capability
> 0" command and removed the javax.jws and javax.jws.soap exports. This
> worked... so now both bundles are properly using the geronimo spec bundle
> versions of the WebService annotation.
>
> -Jeff
>
>
> On Thu, Jan 26, 2012 at 12:11 PM, Felix Meschberger<fm...@adobe.com>wrote:
>
>> Hi,
>>
>> If you use the Felix main distributable there should be a
>> jre-1.6.properties file which lists the package as a system bundle
>> "export". You might want to remove it from there.
>>
>> Hope this helps
>>
>> Regards
>> Felix
>>
>> Am 26.01.2012 um 17:05 schrieb Jeff Melby:
>>
>>> How can I configure Felix to suppress the javax.ws classes included in
>> JDK
>>> 1.6? The problem I am running into is using CXF DOSGi with JAX-WS web
>>> service classes. The cxf-bundle-minimal is unable to find the @WebService
>>> annotation on my web service interfaces because the annotation map has a
>>> different WebService.class object than the cxf bundle is looking for. I
>>> have included the proper javax.jws import in my own bundle's mainifest
>> and
>>> I know that the annotations are picked up... when I debug into the code,
>>> however, I see that the class object for WebService.class is different
>> than
>>> the one that cxf is looking for when it calls
>>> cls.getAnnotation(WebService.class). I am expecting that instead both the
>>> cxf bundle and my own web service bundle should both be using the
>> javax.jws
>>> class from the geronimo-ws-metadata_2.0_spec bundle. I can make the
>> problem
>>> go away by using JDK 1.5 instead (where javax.jws is not included in the
>>> JDK), and everything works. Can anyone help point me in the right
>> direction?
>>> Thanks,
>>> Jeff
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Suppress javax.jws from JDK 1.6
Posted by Jeff Melby <jm...@gmail.com>.
Thanks for the responses. I confirmed that the system bundle is indeed
exporting javax.jws from the jdk:
g! inspect package capability 0
org.apache.felix.framework [0] exports packages:
------------------------------------------------
...
javax.jws; version=0.0.0.1_006_JavaSE imported by:
org.apache.cxf.bundle-minimal [7]
javax.jws.soap; version=0.0.0.1_006_JavaSE imported by:
org.apache.cxf.bundle-minimal [7]
...
So, the CXF bundle was grabbing that one and my own bundle was grabbing the
one from the geronimo spec bundle.
Taking the idea from Christian, I changed the
"org.osgi.framework.system.packages" in the felix config.properties file to
a modified list of exports. I didn't use the list in the karaf
jre.properties.cxf directly as it doesn't specify versions and is missing
framework packages--I took the output from the "inspect package capability
0" command and removed the javax.jws and javax.jws.soap exports. This
worked... so now both bundles are properly using the geronimo spec bundle
versions of the WebService annotation.
-Jeff
On Thu, Jan 26, 2012 at 12:11 PM, Felix Meschberger <fm...@adobe.com>wrote:
> Hi,
>
> If you use the Felix main distributable there should be a
> jre-1.6.properties file which lists the package as a system bundle
> "export". You might want to remove it from there.
>
> Hope this helps
>
> Regards
> Felix
>
> Am 26.01.2012 um 17:05 schrieb Jeff Melby:
>
> > How can I configure Felix to suppress the javax.ws classes included in
> JDK
> > 1.6? The problem I am running into is using CXF DOSGi with JAX-WS web
> > service classes. The cxf-bundle-minimal is unable to find the @WebService
> > annotation on my web service interfaces because the annotation map has a
> > different WebService.class object than the cxf bundle is looking for. I
> > have included the proper javax.jws import in my own bundle's mainifest
> and
> > I know that the annotations are picked up... when I debug into the code,
> > however, I see that the class object for WebService.class is different
> than
> > the one that cxf is looking for when it calls
> > cls.getAnnotation(WebService.class). I am expecting that instead both the
> > cxf bundle and my own web service bundle should both be using the
> javax.jws
> > class from the geronimo-ws-metadata_2.0_spec bundle. I can make the
> problem
> > go away by using JDK 1.5 instead (where javax.jws is not included in the
> > JDK), and everything works. Can anyone help point me in the right
> direction?
> >
> > Thanks,
> > Jeff
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: Suppress javax.jws from JDK 1.6
Posted by Felix Meschberger <fm...@adobe.com>.
Hi,
If you use the Felix main distributable there should be a jre-1.6.properties file which lists the package as a system bundle "export". You might want to remove it from there.
Hope this helps
Regards
Felix
Am 26.01.2012 um 17:05 schrieb Jeff Melby:
> How can I configure Felix to suppress the javax.ws classes included in JDK
> 1.6? The problem I am running into is using CXF DOSGi with JAX-WS web
> service classes. The cxf-bundle-minimal is unable to find the @WebService
> annotation on my web service interfaces because the annotation map has a
> different WebService.class object than the cxf bundle is looking for. I
> have included the proper javax.jws import in my own bundle's mainifest and
> I know that the annotations are picked up... when I debug into the code,
> however, I see that the class object for WebService.class is different than
> the one that cxf is looking for when it calls
> cls.getAnnotation(WebService.class). I am expecting that instead both the
> cxf bundle and my own web service bundle should both be using the javax.jws
> class from the geronimo-ws-metadata_2.0_spec bundle. I can make the problem
> go away by using JDK 1.5 instead (where javax.jws is not included in the
> JDK), and everything works. Can anyone help point me in the right direction?
>
> Thanks,
> Jeff
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Suppress javax.jws from JDK 1.6
Posted by Christian Schneider <ch...@die-schneider.net>.
In the current Apache Karaf 2.2.5 there is a config file
jre.properties.cxf with exports optimized for CXF. You might try this one.
See also:
http://www.liquid-reality.de/display/liquid/2011/12/22/Karaf+Tutorial+Part+4+-+CXF+Services+in+OSGi
Btw. the next CXF version 2.6.0 will have some great improvements for OSGi.
Christian
Am 26.01.2012 17:05, schrieb Jeff Melby:
> How can I configure Felix to suppress the javax.ws classes included in JDK
> 1.6? The problem I am running into is using CXF DOSGi with JAX-WS web
> service classes. The cxf-bundle-minimal is unable to find the @WebService
> annotation on my web service interfaces because the annotation map has a
> different WebService.class object than the cxf bundle is looking for. I
> have included the proper javax.jws import in my own bundle's mainifest and
> I know that the annotations are picked up... when I debug into the code,
> however, I see that the class object for WebService.class is different than
> the one that cxf is looking for when it calls
> cls.getAnnotation(WebService.class). I am expecting that instead both the
> cxf bundle and my own web service bundle should both be using the javax.jws
> class from the geronimo-ws-metadata_2.0_spec bundle. I can make the problem
> go away by using JDK 1.5 instead (where javax.jws is not included in the
> JDK), and everything works. Can anyone help point me in the right direction?
>
> Thanks,
> Jeff
>
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org