You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Hendy Irawan (JIRA)" <ji...@apache.org> on 2009/03/06 17:43:56 UTC

[jira] Created: (CXF-2091) CXF Bundle is hardly usable under OSGi

CXF Bundle is hardly usable under OSGi
--------------------------------------

                 Key: CXF-2091
                 URL: https://issues.apache.org/jira/browse/CXF-2091
             Project: CXF
          Issue Type: Bug
          Components: OSGi
    Affects Versions: 2.1.4
         Environment: Equinox
            Reporter: Hendy Irawan


CXF-Bundle is really hard to use.

The cause is because it's very strict in its Import-Package manifest, version constract. Especially in packages that are provided by default in say, JDK 6, but not exported with version by Equinox.

For example the: Import-Package: javax.xml.stream; version="1.0.0" results in the following error

osgi> start 81
org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: javax.xml.stream; version="1.0.0"
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
        at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:257)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:150)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:287)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:223)
        at java.lang.Thread.run(Thread.java:619)

Which happens because Equinox somehow exports the package without version:

osgi> p javax.xml.stream
javax.xml.stream; version="0.0.0"<System Bundle [0]>
  initial@reference:file:plugins/org.eclipse.update.configurator.jar/ [2] imports
  /.../target/work/webapp/WEB-INF/load/org.apache.servicemix.bundles.neethi-2.0.4_1.jar [55] imports

Note that Neethi packaged by ServiceMix has no problem importing it.

I would vote for these solutions/workarounds:
* remove the version requirement of Import-Package, of all JDK(6) packages
* remove the version requirement for all "1.0.0" packages, or change it to "[0.0.0,2.0.0)" which means "anything before version 2.0.0, which I think is a more practical interpretation of require-version-1.0"
* document where to find the rest of dependencies (OSGi bundles, not plain Java JARs). I have to search through : http://servicemix.apache.org/SMX4/bundles-repository.html , ServiceMix specs, Geronimo specs, and SpringSource Repository and mix and match between them... nightmare :-(

Also important: Even if I can find those bundles, simply installing (e.g. javax.*) bundles which has the proper exported version is usually not enough, because these packages are already exported by system bundle... these packages will have two suppliers.... resulting in "uses conflict" errors. Happens to my case. :-(

osgi> b 81
/.../target/work/webapp/WEB-INF/load/cxf-bundle-jaxrs-2.1.4.jar [81]
  Id=81, Status=INSTALLED   Data Root=/.../target/work/eclipse/configuration/org.eclipse.osgi/bundles/81/data                                                                                          
  No registered services.                                                                                              
  No services in use.                                                                                                  
  Exported packages                                                                                                    
    org.apache.cxf.configuration.jsse; version="2.1.4"[exported]                                                       
    org.apache.cxf.jaxrs.utils; version="2.1.4"[exported]                                                              
    org.apache.cxf.service.invoker; version="2.1.4"[exported]                                                          
    org.codehaus.xfire.aegis.type.java5; version="0.0.0"[exported]                                                     
    org.apache.cxf.binding.xml; version="2.1.4"[exported]                                                              
    org.apache.cxf.configuration.security; version="2.1.4"[exported]                                                   
    org.apache.cxf.bus.spring; version="2.1.4"[exported]                                                               
    org.apache.cxf.clustering.spring; version="2.1.4"[exported]                                                        
    org.apache.cxf.jaxrs.utils.schemas; version="2.1.4"[exported]                                                      
    org.apache.cxf.management.annotation; version="2.1.4"[exported]                                                    
    org.apache.cxf.transport.http.gzip; version="2.1.4"[exported]                                                      
    org.apache.cxf.aegis.util; version="2.1.4"[exported]                                                               
    org.apache.cxf.transport.https; version="2.1.4"[exported]                                                          
    org.apache.cxf.binding.soap.wsdl11; version="2.1.4"[exported]                                                      
    org.apache.cxf.resource; version="2.1.4"[exported]                                                                 
    org.apache.cxf.jaxb; version="2.1.4"[exported]                                                                     
    org.apache.cxf.transports.http_jetty.configuration; version="2.1.4"[exported]                                      
    org.apache.cxf.workqueue; version="2.1.4"[exported]                                                                
    org.apache.cxf.databinding; version="2.1.4"[exported]                                                              
    org.apache.cxf.endpoint; version="2.1.4"[exported]                                                                 
    org.apache.cxf.jaxrs.provider; version="2.1.4"[exported]                                                           
    org.apache.cxf.aegis.xml.stax; version="2.1.4"[exported]                                                           
    org.apache.cxf.databinding.source; version="2.1.4"[exported]                                                       
    org.apache.cxf.tools.validator; version="2.1.4"[exported]                                                          
    org.apache.cxf.jaxrs.utils.multipart; version="2.1.4"[exported]                                                    
    org.apache.cxf.binding.soap.saaj; version="2.1.4"[exported]                                                        
    org.apache.cxf.aegis.type.encoded; version="2.1.4"[exported]                                                       
    org.apache.cxf.transport.http.spring; version="2.1.4"[exported]                                                    
    org.apache.cxf.ws.addressing.v200403; version="2.1.4"[exported]                                                    
    org.apache.cxf.bus; version="2.1.4"[exported]                                                                      
    org.apache.cxf.frontend.spring; version="2.1.4"[exported]                                                          
    org.apache.cxf.common.annotation; version="2.1.4"[exported]                                                        
    org.apache.cxf.security.transport; version="2.1.4"[exported]                                                       
    org.apache.cxf.feature; version="2.1.4"[exported]                                                                  
    org.apache.cxf.phase; version="2.1.4"[exported]                                                                    
    org.apache.cxf.configuration.jsse.spring; version="2.1.4"[exported]                                                
    org.apache.cxf.binding.xml.wsdl11; version="2.1.4"[exported]                                                       
    org.apache.cxf.attachment; version="2.1.4"[exported]                                                               
    org.apache.cxf.jaxb.io; version="2.1.4"[exported]                                                                  
    org.apache.cxf.version; version="2.1.4"[exported]                                                                  
    org.apache.cxf.tools.common; version="2.1.4"[exported]                                                             
    org.apache.cxf.binding; version="2.1.4"[exported]                                                                  
    org.apache.cxf.aegis.type.java5; version="2.1.4"[exported]                                                         
    org.apache.cxf.endpoint.dynamic; version="2.1.4"[exported]                                                         
    org.apache.cxf.ws.addressing.v200408; version="2.1.4"[exported]                                                    
    org.apache.cxf.event; version="2.1.4"[exported]                                                                    
    org.apache.cxf.tools.common.dom; version="2.1.4"[exported]                                                         
    org.apache.cxf.common.commands; version="2.1.4"[exported]                                                          
    org.apache.cxf.binding.xml.interceptor; version="2.1.4"[exported]                                                  
    org.apache.cxf.jca.outbound; version="2.1.4"[exported]                                                             
    org.apache.cxf.service.model; version="2.1.4"[exported]                                                            
    org.apache.cxf.simple; version="2.1.4"[exported]                                                                   
    org.apache.cxf.interceptor; version="2.1.4"[exported]                                                              
    org.apache.cxf.transport; version="2.1.4"[exported]                                                                
    org.apache.cxf.management; version="2.1.4"[exported]                                                               
    org.apache.cxf.common.xmlschema; version="2.1.4"[exported]                                                         
    org.apache.cxf.configuration; version="2.1.4"[exported]                                                            
    org.apache.cxf.jaxrs.lifecycle; version="2.1.4"[exported]                                                          
    org.apache.cxf.binding.soap; version="2.1.4"[exported]                                                             
    org.apache.cxf.aegis.util.date; version="2.1.4"[exported]                                                          
    org.apache.cxf; version="2.1.4"[exported]                                                                          
    org.apache.cxf.clustering; version="2.1.4"[exported]                                                               
    org.apache.cxf.transport.http_jetty.spring; version="2.1.4"[exported]                                              
    org.apache.cxf.security; version="2.1.4"[exported]                                                                 
    org.apache.cxf.staxutils; version="2.1.4"[exported]                                                                
    org.apache.cxf.helpers; version="2.1.4"[exported]                                                                  
    org.apache.cxf.headers; version="2.1.4"[exported]                                                                  
    org.apache.cxf.transport.http_jetty; version="2.1.4"[exported]                                                     
    org.apache.cxf.tools.common.extensions.soap; version="2.1.4"[exported]                                             
    org.apache.cxf.jaxb.attachment; version="2.1.4"[exported]                                                          
    org.apache.cxf.frontend; version="2.1.4"[exported]                                                                 
    org.apache.cxf.common.i18n; version="2.1.4"[exported]                                                              
    org.apache.cxf.bindings.xformat; version="2.1.4"[exported]                                                         
    org.apache.cxf.ws.policy.builder.primitive; version="2.1.4"[exported]                                              
    org.apache.cxf.service.factory; version="2.1.4"[exported]                                                          
    org.apache.cxf.jaxrs.model; version="2.1.4"[exported]                                                              
    org.apache.cxf.jaxrs.impl; version="2.1.4"[exported]                                                               
    META-INF.cxf; version="0.0.0"[exported]                                                                            
    org.apache.cxf.aegis.type.mtom; version="2.1.4"[exported]                                                          
    org.apache.cxf.ws.policy; version="2.1.4"[exported]                                                                
    org.apache.cxf.transport.http; version="2.1.4"[exported]                                                           
    org.apache.cxf.ws.policy.builder.xml; version="2.1.4"[exported]                                                    
    org.apache.cxf.jaxrs.ext; version="2.1.4"[exported]                                                                
    org.apache.cxf.transports.http; version="2.1.4"[exported]                                                          
    org.apache.cxf.aegis.type.basic; version="2.1.4"[exported]                                                         
    org.apache.cxf.buslifecycle; version="2.1.4"[exported]                                                             
    org.apache.cxf.wsdl.http; version="2.1.4"[exported]                                                                
    org.apache.cxf.bus.extension; version="2.1.4"[exported]                                                            
    org.apache.cxf.tools.util; version="2.1.4"[exported]                                                               
    org.apache.cxf.common.classloader; version="2.1.4"[exported]                                                       
    org.apache.cxf.ws.policy.util; version="2.1.4"[exported]                                                           
    org.apache.cxf.jaxrs; version="2.1.4"[exported]                                                                    
    org.apache.cxf.common.injection; version="2.1.4"[exported]                                                         
    org.apache.cxf.configuration.spring; version="2.1.4"[exported]                                                     
    org.apache.cxf.jaxrs.interceptor; version="2.1.4"[exported]                                                        
    org.apache.cxf.aegis.type.collection; version="2.1.4"[exported]                                                    
    org.apache.cxf.wsdl11; version="2.1.4"[exported]                                                                   
    org.apache.cxf.transport.http.policy; version="2.1.4"[exported]                                                    
    org.apache.cxf.transport.servlet; version="2.1.4"[exported]                                                        
    org.apache.cxf.common.logging; version="2.1.4"[exported]                                                           
    org.apache.cxf.catalog; version="2.1.4"[exported]                                                                  
    org.apache.cxf.tools.common.model; version="2.1.4"[exported]                                                       
    org.apache.cxf.aegis.databinding; version="2.1.4"[exported]                                                        
    org.apache.cxf.aegis; version="2.1.4"[exported]                                                                    
    org.apache.cxf.extension; version="2.1.4"[exported]                                                                
    org.apache.cxf.transport.https_jetty; version="2.1.4"[exported]                                                    
    org.apache.cxf.binding.soap.spring; version="2.1.4"[exported]                                                      
    org.apache.cxf.message; version="2.1.4"[exported]                                                                  
    org.apache.cxf.common.util; version="2.1.4"[exported]                                                              
    org.apache.cxf.binding.soap.interceptor; version="2.1.4"[exported]                                                 
    org.apache.cxf.tools.common.toolspec; version="2.1.4"[exported]                                                    
    org.apache.cxf.aegis.util.jdom; version="2.1.4"[exported]                                                          
    org.apache.cxf.ws.addressing; version="2.1.4"[exported]                                                            
    org.apache.cxf.aegis.util.stax; version="2.1.4"[exported]                                                          
    org.apache.cxf.service; version="2.1.4"[exported]                                                                  
    org.apache.cxf.wsdl; version="2.1.4"[exported]                                                                     
    org.apache.cxf.aegis.xml.jdom; version="2.1.4"[exported]                                                           
    org.apache.cxf.databinding.stax; version="2.1.4"[exported]                                                         
    org.apache.cxf.test; version="2.1.4"[exported]                                                                     
    org.apache.cxf.binding.soap.model; version="2.1.4"[exported]                                                       
    org.apache.cxf.jaxrs.ext.multipart; version="2.1.4"[exported]                                                      
    org.apache.cxf.tools.common.toolspec.parser; version="2.1.4"[exported]                                             
    org.apache.cxf.aegis.type.xml; version="2.1.4"[exported]                                                           
    org.apache.cxf.aegis.xml; version="2.1.4"[exported]                                                                
    org.apache.cxf.databinding.source.mime; version="2.1.4"[exported]                                                  
    org.apache.cxf.bus.resource; version="2.1.4"[exported]                                                             
    org.apache.cxf.aegis.type; version="2.1.4"[exported]                                                               
    org.apache.cxf.jaxrs.impl.tl; version="2.1.4"[exported]                                                            
    org.apache.cxf.io; version="2.1.4"[exported]                                                                       
    org.apache.cxf.jaxrs.spring; version="2.1.4"[exported]                                                             
    org.apache.cxf.transport.http_jetty.continuations; version="2.1.4"[exported]                                       
    org.apache.cxf.ws.policy.builder.jaxb; version="2.1.4"[exported]                                                   
    org.apache.cxf.ws.addressing.wsdl; version="2.1.4"[exported]                                                       
    org.apache.cxf.transports.http.configuration; version="2.1.4"[exported]                                            
    org.apache.cxf.continuations; version="2.1.4"[exported]                                                            
  No imported packages
  No fragment bundles
  No named class spaces
  No required bundles



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-2091) CXF Bundle is hardly usable under OSGi

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2091.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.6
         Assignee: Daniel Kulp


Managed to get the versions to be ranges from [0.0,#)  so the 0.0 version that equinox uses should be OK.

> CXF Bundle is hardly usable under OSGi
> --------------------------------------
>
>                 Key: CXF-2091
>                 URL: https://issues.apache.org/jira/browse/CXF-2091
>             Project: CXF
>          Issue Type: Bug
>          Components: OSGi
>    Affects Versions: 2.1.4
>         Environment: Equinox
>            Reporter: Hendy Irawan
>            Assignee: Daniel Kulp
>             Fix For: 2.2.6
>
>
> CXF-Bundle is really hard to use.
> The cause is because it's very strict in its Import-Package manifest, version constract. Especially in packages that are provided by default in say, JDK 6, but not exported with version by Equinox.
> For example the: Import-Package: javax.xml.stream; version="1.0.0" results in the following error
> osgi> start 81
> org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: javax.xml.stream; version="1.0.0"
>         at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305)
>         at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
>         at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
>         at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:257)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:150)
>         at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302)
>         at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:287)
>         at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:223)
>         at java.lang.Thread.run(Thread.java:619)
> Which happens because Equinox somehow exports the package without version:
> osgi> p javax.xml.stream
> javax.xml.stream; version="0.0.0"<System Bundle [0]>
>   initial@reference:file:plugins/org.eclipse.update.configurator.jar/ [2] imports
>   /.../target/work/webapp/WEB-INF/load/org.apache.servicemix.bundles.neethi-2.0.4_1.jar [55] imports
> Note that Neethi packaged by ServiceMix has no problem importing it.
> I would vote for these solutions/workarounds:
> * remove the version requirement of Import-Package, of all JDK(6) packages
> * remove the version requirement for all "1.0.0" packages, or change it to "[0.0.0,2.0.0)" which means "anything before version 2.0.0, which I think is a more practical interpretation of require-version-1.0"
> * document where to find the rest of dependencies (OSGi bundles, not plain Java JARs). I have to search through : http://servicemix.apache.org/SMX4/bundles-repository.html , ServiceMix specs, Geronimo specs, and SpringSource Repository and mix and match between them... nightmare :-(
> Also important: Even if I can find those bundles, simply installing (e.g. javax.*) bundles which has the proper exported version is usually not enough, because these packages are already exported by system bundle... these packages will have two suppliers.... resulting in "uses conflict" errors. Happens to my case. :-(
> osgi> b 81
> /.../target/work/webapp/WEB-INF/load/cxf-bundle-jaxrs-2.1.4.jar [81]
>   Id=81, Status=INSTALLED   Data Root=/.../target/work/eclipse/configuration/org.eclipse.osgi/bundles/81/data                                                                                          
>   No registered services.                                                                                              
>   No services in use.                                                                                                  
>   Exported packages                                                                                                    
>     org.apache.cxf.configuration.jsse; version="2.1.4"[exported]                                                       
>     org.apache.cxf.jaxrs.utils; version="2.1.4"[exported]                                                              
>     org.apache.cxf.service.invoker; version="2.1.4"[exported]                                                          
>     org.codehaus.xfire.aegis.type.java5; version="0.0.0"[exported]                                                     
>     org.apache.cxf.binding.xml; version="2.1.4"[exported]                                                              
>     org.apache.cxf.configuration.security; version="2.1.4"[exported]                                                   
>     org.apache.cxf.bus.spring; version="2.1.4"[exported]                                                               
>     org.apache.cxf.clustering.spring; version="2.1.4"[exported]                                                        
>     org.apache.cxf.jaxrs.utils.schemas; version="2.1.4"[exported]                                                      
>     org.apache.cxf.management.annotation; version="2.1.4"[exported]                                                    
>     org.apache.cxf.transport.http.gzip; version="2.1.4"[exported]                                                      
>     org.apache.cxf.aegis.util; version="2.1.4"[exported]                                                               
>     org.apache.cxf.transport.https; version="2.1.4"[exported]                                                          
>     org.apache.cxf.binding.soap.wsdl11; version="2.1.4"[exported]                                                      
>     org.apache.cxf.resource; version="2.1.4"[exported]                                                                 
>     org.apache.cxf.jaxb; version="2.1.4"[exported]                                                                     
>     org.apache.cxf.transports.http_jetty.configuration; version="2.1.4"[exported]                                      
>     org.apache.cxf.workqueue; version="2.1.4"[exported]                                                                
>     org.apache.cxf.databinding; version="2.1.4"[exported]                                                              
>     org.apache.cxf.endpoint; version="2.1.4"[exported]                                                                 
>     org.apache.cxf.jaxrs.provider; version="2.1.4"[exported]                                                           
>     org.apache.cxf.aegis.xml.stax; version="2.1.4"[exported]                                                           
>     org.apache.cxf.databinding.source; version="2.1.4"[exported]                                                       
>     org.apache.cxf.tools.validator; version="2.1.4"[exported]                                                          
>     org.apache.cxf.jaxrs.utils.multipart; version="2.1.4"[exported]                                                    
>     org.apache.cxf.binding.soap.saaj; version="2.1.4"[exported]                                                        
>     org.apache.cxf.aegis.type.encoded; version="2.1.4"[exported]                                                       
>     org.apache.cxf.transport.http.spring; version="2.1.4"[exported]                                                    
>     org.apache.cxf.ws.addressing.v200403; version="2.1.4"[exported]                                                    
>     org.apache.cxf.bus; version="2.1.4"[exported]                                                                      
>     org.apache.cxf.frontend.spring; version="2.1.4"[exported]                                                          
>     org.apache.cxf.common.annotation; version="2.1.4"[exported]                                                        
>     org.apache.cxf.security.transport; version="2.1.4"[exported]                                                       
>     org.apache.cxf.feature; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.phase; version="2.1.4"[exported]                                                                    
>     org.apache.cxf.configuration.jsse.spring; version="2.1.4"[exported]                                                
>     org.apache.cxf.binding.xml.wsdl11; version="2.1.4"[exported]                                                       
>     org.apache.cxf.attachment; version="2.1.4"[exported]                                                               
>     org.apache.cxf.jaxb.io; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.version; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.tools.common; version="2.1.4"[exported]                                                             
>     org.apache.cxf.binding; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.aegis.type.java5; version="2.1.4"[exported]                                                         
>     org.apache.cxf.endpoint.dynamic; version="2.1.4"[exported]                                                         
>     org.apache.cxf.ws.addressing.v200408; version="2.1.4"[exported]                                                    
>     org.apache.cxf.event; version="2.1.4"[exported]                                                                    
>     org.apache.cxf.tools.common.dom; version="2.1.4"[exported]                                                         
>     org.apache.cxf.common.commands; version="2.1.4"[exported]                                                          
>     org.apache.cxf.binding.xml.interceptor; version="2.1.4"[exported]                                                  
>     org.apache.cxf.jca.outbound; version="2.1.4"[exported]                                                             
>     org.apache.cxf.service.model; version="2.1.4"[exported]                                                            
>     org.apache.cxf.simple; version="2.1.4"[exported]                                                                   
>     org.apache.cxf.interceptor; version="2.1.4"[exported]                                                              
>     org.apache.cxf.transport; version="2.1.4"[exported]                                                                
>     org.apache.cxf.management; version="2.1.4"[exported]                                                               
>     org.apache.cxf.common.xmlschema; version="2.1.4"[exported]                                                         
>     org.apache.cxf.configuration; version="2.1.4"[exported]                                                            
>     org.apache.cxf.jaxrs.lifecycle; version="2.1.4"[exported]                                                          
>     org.apache.cxf.binding.soap; version="2.1.4"[exported]                                                             
>     org.apache.cxf.aegis.util.date; version="2.1.4"[exported]                                                          
>     org.apache.cxf; version="2.1.4"[exported]                                                                          
>     org.apache.cxf.clustering; version="2.1.4"[exported]                                                               
>     org.apache.cxf.transport.http_jetty.spring; version="2.1.4"[exported]                                              
>     org.apache.cxf.security; version="2.1.4"[exported]                                                                 
>     org.apache.cxf.staxutils; version="2.1.4"[exported]                                                                
>     org.apache.cxf.helpers; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.headers; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.transport.http_jetty; version="2.1.4"[exported]                                                     
>     org.apache.cxf.tools.common.extensions.soap; version="2.1.4"[exported]                                             
>     org.apache.cxf.jaxb.attachment; version="2.1.4"[exported]                                                          
>     org.apache.cxf.frontend; version="2.1.4"[exported]                                                                 
>     org.apache.cxf.common.i18n; version="2.1.4"[exported]                                                              
>     org.apache.cxf.bindings.xformat; version="2.1.4"[exported]                                                         
>     org.apache.cxf.ws.policy.builder.primitive; version="2.1.4"[exported]                                              
>     org.apache.cxf.service.factory; version="2.1.4"[exported]                                                          
>     org.apache.cxf.jaxrs.model; version="2.1.4"[exported]                                                              
>     org.apache.cxf.jaxrs.impl; version="2.1.4"[exported]                                                               
>     META-INF.cxf; version="0.0.0"[exported]                                                                            
>     org.apache.cxf.aegis.type.mtom; version="2.1.4"[exported]                                                          
>     org.apache.cxf.ws.policy; version="2.1.4"[exported]                                                                
>     org.apache.cxf.transport.http; version="2.1.4"[exported]                                                           
>     org.apache.cxf.ws.policy.builder.xml; version="2.1.4"[exported]                                                    
>     org.apache.cxf.jaxrs.ext; version="2.1.4"[exported]                                                                
>     org.apache.cxf.transports.http; version="2.1.4"[exported]                                                          
>     org.apache.cxf.aegis.type.basic; version="2.1.4"[exported]                                                         
>     org.apache.cxf.buslifecycle; version="2.1.4"[exported]                                                             
>     org.apache.cxf.wsdl.http; version="2.1.4"[exported]                                                                
>     org.apache.cxf.bus.extension; version="2.1.4"[exported]                                                            
>     org.apache.cxf.tools.util; version="2.1.4"[exported]                                                               
>     org.apache.cxf.common.classloader; version="2.1.4"[exported]                                                       
>     org.apache.cxf.ws.policy.util; version="2.1.4"[exported]                                                           
>     org.apache.cxf.jaxrs; version="2.1.4"[exported]                                                                    
>     org.apache.cxf.common.injection; version="2.1.4"[exported]                                                         
>     org.apache.cxf.configuration.spring; version="2.1.4"[exported]                                                     
>     org.apache.cxf.jaxrs.interceptor; version="2.1.4"[exported]                                                        
>     org.apache.cxf.aegis.type.collection; version="2.1.4"[exported]                                                    
>     org.apache.cxf.wsdl11; version="2.1.4"[exported]                                                                   
>     org.apache.cxf.transport.http.policy; version="2.1.4"[exported]                                                    
>     org.apache.cxf.transport.servlet; version="2.1.4"[exported]                                                        
>     org.apache.cxf.common.logging; version="2.1.4"[exported]                                                           
>     org.apache.cxf.catalog; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.tools.common.model; version="2.1.4"[exported]                                                       
>     org.apache.cxf.aegis.databinding; version="2.1.4"[exported]                                                        
>     org.apache.cxf.aegis; version="2.1.4"[exported]                                                                    
>     org.apache.cxf.extension; version="2.1.4"[exported]                                                                
>     org.apache.cxf.transport.https_jetty; version="2.1.4"[exported]                                                    
>     org.apache.cxf.binding.soap.spring; version="2.1.4"[exported]                                                      
>     org.apache.cxf.message; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.common.util; version="2.1.4"[exported]                                                              
>     org.apache.cxf.binding.soap.interceptor; version="2.1.4"[exported]                                                 
>     org.apache.cxf.tools.common.toolspec; version="2.1.4"[exported]                                                    
>     org.apache.cxf.aegis.util.jdom; version="2.1.4"[exported]                                                          
>     org.apache.cxf.ws.addressing; version="2.1.4"[exported]                                                            
>     org.apache.cxf.aegis.util.stax; version="2.1.4"[exported]                                                          
>     org.apache.cxf.service; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.wsdl; version="2.1.4"[exported]                                                                     
>     org.apache.cxf.aegis.xml.jdom; version="2.1.4"[exported]                                                           
>     org.apache.cxf.databinding.stax; version="2.1.4"[exported]                                                         
>     org.apache.cxf.test; version="2.1.4"[exported]                                                                     
>     org.apache.cxf.binding.soap.model; version="2.1.4"[exported]                                                       
>     org.apache.cxf.jaxrs.ext.multipart; version="2.1.4"[exported]                                                      
>     org.apache.cxf.tools.common.toolspec.parser; version="2.1.4"[exported]                                             
>     org.apache.cxf.aegis.type.xml; version="2.1.4"[exported]                                                           
>     org.apache.cxf.aegis.xml; version="2.1.4"[exported]                                                                
>     org.apache.cxf.databinding.source.mime; version="2.1.4"[exported]                                                  
>     org.apache.cxf.bus.resource; version="2.1.4"[exported]                                                             
>     org.apache.cxf.aegis.type; version="2.1.4"[exported]                                                               
>     org.apache.cxf.jaxrs.impl.tl; version="2.1.4"[exported]                                                            
>     org.apache.cxf.io; version="2.1.4"[exported]                                                                       
>     org.apache.cxf.jaxrs.spring; version="2.1.4"[exported]                                                             
>     org.apache.cxf.transport.http_jetty.continuations; version="2.1.4"[exported]                                       
>     org.apache.cxf.ws.policy.builder.jaxb; version="2.1.4"[exported]                                                   
>     org.apache.cxf.ws.addressing.wsdl; version="2.1.4"[exported]                                                       
>     org.apache.cxf.transports.http.configuration; version="2.1.4"[exported]                                            
>     org.apache.cxf.continuations; version="2.1.4"[exported]                                                            
>   No imported packages
>   No fragment bundles
>   No named class spaces
>   No required bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2091) CXF Bundle is hardly usable under OSGi

Posted by "Hendy Irawan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679648#action_12679648 ] 

Hendy Irawan commented on CXF-2091:
-----------------------------------

Spelling correction: 

The cause is because it's very strict in its Import-Package manifest, version **constraint**. 

> CXF Bundle is hardly usable under OSGi
> --------------------------------------
>
>                 Key: CXF-2091
>                 URL: https://issues.apache.org/jira/browse/CXF-2091
>             Project: CXF
>          Issue Type: Bug
>          Components: OSGi
>    Affects Versions: 2.1.4
>         Environment: Equinox
>            Reporter: Hendy Irawan
>
> CXF-Bundle is really hard to use.
> The cause is because it's very strict in its Import-Package manifest, version constract. Especially in packages that are provided by default in say, JDK 6, but not exported with version by Equinox.
> For example the: Import-Package: javax.xml.stream; version="1.0.0" results in the following error
> osgi> start 81
> org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: javax.xml.stream; version="1.0.0"
>         at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305)
>         at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
>         at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
>         at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:257)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:150)
>         at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302)
>         at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:287)
>         at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:223)
>         at java.lang.Thread.run(Thread.java:619)
> Which happens because Equinox somehow exports the package without version:
> osgi> p javax.xml.stream
> javax.xml.stream; version="0.0.0"<System Bundle [0]>
>   initial@reference:file:plugins/org.eclipse.update.configurator.jar/ [2] imports
>   /.../target/work/webapp/WEB-INF/load/org.apache.servicemix.bundles.neethi-2.0.4_1.jar [55] imports
> Note that Neethi packaged by ServiceMix has no problem importing it.
> I would vote for these solutions/workarounds:
> * remove the version requirement of Import-Package, of all JDK(6) packages
> * remove the version requirement for all "1.0.0" packages, or change it to "[0.0.0,2.0.0)" which means "anything before version 2.0.0, which I think is a more practical interpretation of require-version-1.0"
> * document where to find the rest of dependencies (OSGi bundles, not plain Java JARs). I have to search through : http://servicemix.apache.org/SMX4/bundles-repository.html , ServiceMix specs, Geronimo specs, and SpringSource Repository and mix and match between them... nightmare :-(
> Also important: Even if I can find those bundles, simply installing (e.g. javax.*) bundles which has the proper exported version is usually not enough, because these packages are already exported by system bundle... these packages will have two suppliers.... resulting in "uses conflict" errors. Happens to my case. :-(
> osgi> b 81
> /.../target/work/webapp/WEB-INF/load/cxf-bundle-jaxrs-2.1.4.jar [81]
>   Id=81, Status=INSTALLED   Data Root=/.../target/work/eclipse/configuration/org.eclipse.osgi/bundles/81/data                                                                                          
>   No registered services.                                                                                              
>   No services in use.                                                                                                  
>   Exported packages                                                                                                    
>     org.apache.cxf.configuration.jsse; version="2.1.4"[exported]                                                       
>     org.apache.cxf.jaxrs.utils; version="2.1.4"[exported]                                                              
>     org.apache.cxf.service.invoker; version="2.1.4"[exported]                                                          
>     org.codehaus.xfire.aegis.type.java5; version="0.0.0"[exported]                                                     
>     org.apache.cxf.binding.xml; version="2.1.4"[exported]                                                              
>     org.apache.cxf.configuration.security; version="2.1.4"[exported]                                                   
>     org.apache.cxf.bus.spring; version="2.1.4"[exported]                                                               
>     org.apache.cxf.clustering.spring; version="2.1.4"[exported]                                                        
>     org.apache.cxf.jaxrs.utils.schemas; version="2.1.4"[exported]                                                      
>     org.apache.cxf.management.annotation; version="2.1.4"[exported]                                                    
>     org.apache.cxf.transport.http.gzip; version="2.1.4"[exported]                                                      
>     org.apache.cxf.aegis.util; version="2.1.4"[exported]                                                               
>     org.apache.cxf.transport.https; version="2.1.4"[exported]                                                          
>     org.apache.cxf.binding.soap.wsdl11; version="2.1.4"[exported]                                                      
>     org.apache.cxf.resource; version="2.1.4"[exported]                                                                 
>     org.apache.cxf.jaxb; version="2.1.4"[exported]                                                                     
>     org.apache.cxf.transports.http_jetty.configuration; version="2.1.4"[exported]                                      
>     org.apache.cxf.workqueue; version="2.1.4"[exported]                                                                
>     org.apache.cxf.databinding; version="2.1.4"[exported]                                                              
>     org.apache.cxf.endpoint; version="2.1.4"[exported]                                                                 
>     org.apache.cxf.jaxrs.provider; version="2.1.4"[exported]                                                           
>     org.apache.cxf.aegis.xml.stax; version="2.1.4"[exported]                                                           
>     org.apache.cxf.databinding.source; version="2.1.4"[exported]                                                       
>     org.apache.cxf.tools.validator; version="2.1.4"[exported]                                                          
>     org.apache.cxf.jaxrs.utils.multipart; version="2.1.4"[exported]                                                    
>     org.apache.cxf.binding.soap.saaj; version="2.1.4"[exported]                                                        
>     org.apache.cxf.aegis.type.encoded; version="2.1.4"[exported]                                                       
>     org.apache.cxf.transport.http.spring; version="2.1.4"[exported]                                                    
>     org.apache.cxf.ws.addressing.v200403; version="2.1.4"[exported]                                                    
>     org.apache.cxf.bus; version="2.1.4"[exported]                                                                      
>     org.apache.cxf.frontend.spring; version="2.1.4"[exported]                                                          
>     org.apache.cxf.common.annotation; version="2.1.4"[exported]                                                        
>     org.apache.cxf.security.transport; version="2.1.4"[exported]                                                       
>     org.apache.cxf.feature; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.phase; version="2.1.4"[exported]                                                                    
>     org.apache.cxf.configuration.jsse.spring; version="2.1.4"[exported]                                                
>     org.apache.cxf.binding.xml.wsdl11; version="2.1.4"[exported]                                                       
>     org.apache.cxf.attachment; version="2.1.4"[exported]                                                               
>     org.apache.cxf.jaxb.io; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.version; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.tools.common; version="2.1.4"[exported]                                                             
>     org.apache.cxf.binding; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.aegis.type.java5; version="2.1.4"[exported]                                                         
>     org.apache.cxf.endpoint.dynamic; version="2.1.4"[exported]                                                         
>     org.apache.cxf.ws.addressing.v200408; version="2.1.4"[exported]                                                    
>     org.apache.cxf.event; version="2.1.4"[exported]                                                                    
>     org.apache.cxf.tools.common.dom; version="2.1.4"[exported]                                                         
>     org.apache.cxf.common.commands; version="2.1.4"[exported]                                                          
>     org.apache.cxf.binding.xml.interceptor; version="2.1.4"[exported]                                                  
>     org.apache.cxf.jca.outbound; version="2.1.4"[exported]                                                             
>     org.apache.cxf.service.model; version="2.1.4"[exported]                                                            
>     org.apache.cxf.simple; version="2.1.4"[exported]                                                                   
>     org.apache.cxf.interceptor; version="2.1.4"[exported]                                                              
>     org.apache.cxf.transport; version="2.1.4"[exported]                                                                
>     org.apache.cxf.management; version="2.1.4"[exported]                                                               
>     org.apache.cxf.common.xmlschema; version="2.1.4"[exported]                                                         
>     org.apache.cxf.configuration; version="2.1.4"[exported]                                                            
>     org.apache.cxf.jaxrs.lifecycle; version="2.1.4"[exported]                                                          
>     org.apache.cxf.binding.soap; version="2.1.4"[exported]                                                             
>     org.apache.cxf.aegis.util.date; version="2.1.4"[exported]                                                          
>     org.apache.cxf; version="2.1.4"[exported]                                                                          
>     org.apache.cxf.clustering; version="2.1.4"[exported]                                                               
>     org.apache.cxf.transport.http_jetty.spring; version="2.1.4"[exported]                                              
>     org.apache.cxf.security; version="2.1.4"[exported]                                                                 
>     org.apache.cxf.staxutils; version="2.1.4"[exported]                                                                
>     org.apache.cxf.helpers; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.headers; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.transport.http_jetty; version="2.1.4"[exported]                                                     
>     org.apache.cxf.tools.common.extensions.soap; version="2.1.4"[exported]                                             
>     org.apache.cxf.jaxb.attachment; version="2.1.4"[exported]                                                          
>     org.apache.cxf.frontend; version="2.1.4"[exported]                                                                 
>     org.apache.cxf.common.i18n; version="2.1.4"[exported]                                                              
>     org.apache.cxf.bindings.xformat; version="2.1.4"[exported]                                                         
>     org.apache.cxf.ws.policy.builder.primitive; version="2.1.4"[exported]                                              
>     org.apache.cxf.service.factory; version="2.1.4"[exported]                                                          
>     org.apache.cxf.jaxrs.model; version="2.1.4"[exported]                                                              
>     org.apache.cxf.jaxrs.impl; version="2.1.4"[exported]                                                               
>     META-INF.cxf; version="0.0.0"[exported]                                                                            
>     org.apache.cxf.aegis.type.mtom; version="2.1.4"[exported]                                                          
>     org.apache.cxf.ws.policy; version="2.1.4"[exported]                                                                
>     org.apache.cxf.transport.http; version="2.1.4"[exported]                                                           
>     org.apache.cxf.ws.policy.builder.xml; version="2.1.4"[exported]                                                    
>     org.apache.cxf.jaxrs.ext; version="2.1.4"[exported]                                                                
>     org.apache.cxf.transports.http; version="2.1.4"[exported]                                                          
>     org.apache.cxf.aegis.type.basic; version="2.1.4"[exported]                                                         
>     org.apache.cxf.buslifecycle; version="2.1.4"[exported]                                                             
>     org.apache.cxf.wsdl.http; version="2.1.4"[exported]                                                                
>     org.apache.cxf.bus.extension; version="2.1.4"[exported]                                                            
>     org.apache.cxf.tools.util; version="2.1.4"[exported]                                                               
>     org.apache.cxf.common.classloader; version="2.1.4"[exported]                                                       
>     org.apache.cxf.ws.policy.util; version="2.1.4"[exported]                                                           
>     org.apache.cxf.jaxrs; version="2.1.4"[exported]                                                                    
>     org.apache.cxf.common.injection; version="2.1.4"[exported]                                                         
>     org.apache.cxf.configuration.spring; version="2.1.4"[exported]                                                     
>     org.apache.cxf.jaxrs.interceptor; version="2.1.4"[exported]                                                        
>     org.apache.cxf.aegis.type.collection; version="2.1.4"[exported]                                                    
>     org.apache.cxf.wsdl11; version="2.1.4"[exported]                                                                   
>     org.apache.cxf.transport.http.policy; version="2.1.4"[exported]                                                    
>     org.apache.cxf.transport.servlet; version="2.1.4"[exported]                                                        
>     org.apache.cxf.common.logging; version="2.1.4"[exported]                                                           
>     org.apache.cxf.catalog; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.tools.common.model; version="2.1.4"[exported]                                                       
>     org.apache.cxf.aegis.databinding; version="2.1.4"[exported]                                                        
>     org.apache.cxf.aegis; version="2.1.4"[exported]                                                                    
>     org.apache.cxf.extension; version="2.1.4"[exported]                                                                
>     org.apache.cxf.transport.https_jetty; version="2.1.4"[exported]                                                    
>     org.apache.cxf.binding.soap.spring; version="2.1.4"[exported]                                                      
>     org.apache.cxf.message; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.common.util; version="2.1.4"[exported]                                                              
>     org.apache.cxf.binding.soap.interceptor; version="2.1.4"[exported]                                                 
>     org.apache.cxf.tools.common.toolspec; version="2.1.4"[exported]                                                    
>     org.apache.cxf.aegis.util.jdom; version="2.1.4"[exported]                                                          
>     org.apache.cxf.ws.addressing; version="2.1.4"[exported]                                                            
>     org.apache.cxf.aegis.util.stax; version="2.1.4"[exported]                                                          
>     org.apache.cxf.service; version="2.1.4"[exported]                                                                  
>     org.apache.cxf.wsdl; version="2.1.4"[exported]                                                                     
>     org.apache.cxf.aegis.xml.jdom; version="2.1.4"[exported]                                                           
>     org.apache.cxf.databinding.stax; version="2.1.4"[exported]                                                         
>     org.apache.cxf.test; version="2.1.4"[exported]                                                                     
>     org.apache.cxf.binding.soap.model; version="2.1.4"[exported]                                                       
>     org.apache.cxf.jaxrs.ext.multipart; version="2.1.4"[exported]                                                      
>     org.apache.cxf.tools.common.toolspec.parser; version="2.1.4"[exported]                                             
>     org.apache.cxf.aegis.type.xml; version="2.1.4"[exported]                                                           
>     org.apache.cxf.aegis.xml; version="2.1.4"[exported]                                                                
>     org.apache.cxf.databinding.source.mime; version="2.1.4"[exported]                                                  
>     org.apache.cxf.bus.resource; version="2.1.4"[exported]                                                             
>     org.apache.cxf.aegis.type; version="2.1.4"[exported]                                                               
>     org.apache.cxf.jaxrs.impl.tl; version="2.1.4"[exported]                                                            
>     org.apache.cxf.io; version="2.1.4"[exported]                                                                       
>     org.apache.cxf.jaxrs.spring; version="2.1.4"[exported]                                                             
>     org.apache.cxf.transport.http_jetty.continuations; version="2.1.4"[exported]                                       
>     org.apache.cxf.ws.policy.builder.jaxb; version="2.1.4"[exported]                                                   
>     org.apache.cxf.ws.addressing.wsdl; version="2.1.4"[exported]                                                       
>     org.apache.cxf.transports.http.configuration; version="2.1.4"[exported]                                            
>     org.apache.cxf.continuations; version="2.1.4"[exported]                                                            
>   No imported packages
>   No fragment bundles
>   No named class spaces
>   No required bundles

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.