You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Savas Ali Tokmen (JIRA)" <ji...@apache.org> on 2009/07/29 12:02:33 UTC

[jira] Created: (CAMEL-1862) camel-cxf bundle doesn't specify any Import-Package version

camel-cxf bundle doesn't specify any Import-Package version
-----------------------------------------------------------

                 Key: CAMEL-1862
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1862
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-cxf
    Affects Versions: 2.0-M3
         Environment: CAMEL, CXF, OSGi Felix
            Reporter: Savas Ali Tokmen


The camel-cxf component is currently generated against CXF version 2.2.2.

As a result, the camel-cxf module as well as the camel-cxf bundle require CXF 2.2. More importantly, that bundle does not work correctly with CXF 2.0 (note that this is an expected behavior, CXF has had API changes with its 2.2 version).

Now, the trouble is that the camel-cxf JAR's MANIFEST has an Import-Package on org.apache.cxf.* components without specifying any version! As a result, when it looks for CXF and both CXF 2.0 and 2.2 are present on the platform, it sometimes chooses the wrong one.

To solve this issue, version specifiers should be added to the Import-Package declarations of the camel-cxf bundle. I guess an import on version 2.2 would be enough (we don't need to specify 2.2.2 explicitely).

Cheers

S. Ali Tokmen
http://ali.tokmen.com/

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


[jira] Commented: (CAMEL-1862) camel-cxf bundle doesn't specify any Import-Package version

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53040#action_53040 ] 

Claus Ibsen commented on CAMEL-1862:
------------------------------------

Hmm what happens if CXF v2.3 is released, or does the 2.2 3.0 means 2.2-3.0 ?

> camel-cxf bundle doesn't specify any Import-Package version
> -----------------------------------------------------------
>
>                 Key: CAMEL-1862
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1862
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0-M3
>         Environment: CAMEL, CXF, OSGi Felix
>            Reporter: Savas Ali Tokmen
>            Assignee: Willem Jiang
>             Fix For: 1.6.2, 2.0.0
>
>
> The camel-cxf component is currently generated against CXF version 2.2.2.
> As a result, the camel-cxf module as well as the camel-cxf bundle require CXF 2.2. More importantly, that bundle does not work correctly with CXF 2.0 (note that this is an expected behavior, CXF has had API changes with its 2.2 version).
> Now, the trouble is that the camel-cxf JAR's MANIFEST has an Import-Package on org.apache.cxf.* components without specifying any version! As a result, when it looks for CXF and both CXF 2.0 and 2.2 are present on the platform, it sometimes chooses the wrong one.
> To solve this issue, version specifiers should be added to the Import-Package declarations of the camel-cxf bundle. I guess an import on version 2.2 would be enough (we don't need to specify 2.2.2 explicitely).
> Cheers
> S. Ali Tokmen
> http://ali.tokmen.com/

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


[jira] Assigned: (CAMEL-1862) camel-cxf bundle doesn't specify any Import-Package version

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-1862:
-----------------------------------

    Assignee: Willem Jiang

> camel-cxf bundle doesn't specify any Import-Package version
> -----------------------------------------------------------
>
>                 Key: CAMEL-1862
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1862
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0-M3
>         Environment: CAMEL, CXF, OSGi Felix
>            Reporter: Savas Ali Tokmen
>            Assignee: Willem Jiang
>
> The camel-cxf component is currently generated against CXF version 2.2.2.
> As a result, the camel-cxf module as well as the camel-cxf bundle require CXF 2.2. More importantly, that bundle does not work correctly with CXF 2.0 (note that this is an expected behavior, CXF has had API changes with its 2.2 version).
> Now, the trouble is that the camel-cxf JAR's MANIFEST has an Import-Package on org.apache.cxf.* components without specifying any version! As a result, when it looks for CXF and both CXF 2.0 and 2.2 are present on the platform, it sometimes chooses the wrong one.
> To solve this issue, version specifiers should be added to the Import-Package declarations of the camel-cxf bundle. I guess an import on version 2.2 would be enough (we don't need to specify 2.2.2 explicitely).
> Cheers
> S. Ali Tokmen
> http://ali.tokmen.com/

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


[jira] Commented: (CAMEL-1862) camel-cxf bundle doesn't specify any Import-Package version

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53038#action_53038 ] 

Willem Jiang commented on CAMEL-1862:
-------------------------------------

@ S. Ali Tokmen
Please feel free to give it a try ;)

> camel-cxf bundle doesn't specify any Import-Package version
> -----------------------------------------------------------
>
>                 Key: CAMEL-1862
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1862
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0-M3
>         Environment: CAMEL, CXF, OSGi Felix
>            Reporter: Savas Ali Tokmen
>            Assignee: Willem Jiang
>             Fix For: 1.6.2, 2.0.0
>
>
> The camel-cxf component is currently generated against CXF version 2.2.2.
> As a result, the camel-cxf module as well as the camel-cxf bundle require CXF 2.2. More importantly, that bundle does not work correctly with CXF 2.0 (note that this is an expected behavior, CXF has had API changes with its 2.2 version).
> Now, the trouble is that the camel-cxf JAR's MANIFEST has an Import-Package on org.apache.cxf.* components without specifying any version! As a result, when it looks for CXF and both CXF 2.0 and 2.2 are present on the platform, it sometimes chooses the wrong one.
> To solve this issue, version specifiers should be added to the Import-Package declarations of the camel-cxf bundle. I guess an import on version 2.2 would be enough (we don't need to specify 2.2.2 explicitely).
> Cheers
> S. Ali Tokmen
> http://ali.tokmen.com/

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


[jira] Closed: (CAMEL-1862) camel-cxf bundle doesn't specify any Import-Package version

Posted by "Savas Ali Tokmen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Savas Ali Tokmen closed CAMEL-1862.
-----------------------------------


Closing issue

> camel-cxf bundle doesn't specify any Import-Package version
> -----------------------------------------------------------
>
>                 Key: CAMEL-1862
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1862
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0-M3
>         Environment: CAMEL, CXF, OSGi Felix
>            Reporter: Savas Ali Tokmen
>            Assignee: Willem Jiang
>             Fix For: 1.6.2, 2.0.0
>
>
> The camel-cxf component is currently generated against CXF version 2.2.2.
> As a result, the camel-cxf module as well as the camel-cxf bundle require CXF 2.2. More importantly, that bundle does not work correctly with CXF 2.0 (note that this is an expected behavior, CXF has had API changes with its 2.2 version).
> Now, the trouble is that the camel-cxf JAR's MANIFEST has an Import-Package on org.apache.cxf.* components without specifying any version! As a result, when it looks for CXF and both CXF 2.0 and 2.2 are present on the platform, it sometimes chooses the wrong one.
> To solve this issue, version specifiers should be added to the Import-Package declarations of the camel-cxf bundle. I guess an import on version 2.2 would be enough (we don't need to specify 2.2.2 explicitely).
> Cheers
> S. Ali Tokmen
> http://ali.tokmen.com/

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


[jira] Commented: (CAMEL-1862) camel-cxf bundle doesn't specify any Import-Package version

Posted by "Savas Ali Tokmen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53042#action_53042 ] 

Savas Ali Tokmen commented on CAMEL-1862:
-----------------------------------------

@Claus

Hello

[2.2,3.0.0) means "everything that's superior to 2.2, including 2.2 and 2.2.0; but inferior to 3.0.0, therefore excluding 3.0.0 itself".

This means 2.2.0, 2.2.2, 2.3.0 ... 2.999.9999 are valid. 1.x, 2.0.x, 2.1.x and 3.x are not.

Cheers

S. Ali Tokmen
http://ali.tokmen.com/

> camel-cxf bundle doesn't specify any Import-Package version
> -----------------------------------------------------------
>
>                 Key: CAMEL-1862
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1862
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0-M3
>         Environment: CAMEL, CXF, OSGi Felix
>            Reporter: Savas Ali Tokmen
>            Assignee: Willem Jiang
>             Fix For: 1.6.2, 2.0.0
>
>
> The camel-cxf component is currently generated against CXF version 2.2.2.
> As a result, the camel-cxf module as well as the camel-cxf bundle require CXF 2.2. More importantly, that bundle does not work correctly with CXF 2.0 (note that this is an expected behavior, CXF has had API changes with its 2.2 version).
> Now, the trouble is that the camel-cxf JAR's MANIFEST has an Import-Package on org.apache.cxf.* components without specifying any version! As a result, when it looks for CXF and both CXF 2.0 and 2.2 are present on the platform, it sometimes chooses the wrong one.
> To solve this issue, version specifiers should be added to the Import-Package declarations of the camel-cxf bundle. I guess an import on version 2.2 would be enough (we don't need to specify 2.2.2 explicitely).
> Cheers
> S. Ali Tokmen
> http://ali.tokmen.com/

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


[jira] Resolved: (CAMEL-1862) camel-cxf bundle doesn't specify any Import-Package version

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-1862.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
                   1.6.2

trunk
http://svn.apache.org/viewvc?rev=799252&view=rev
camel-1.x branch
http://svn.apache.org/viewvc?rev=799253&view=rev

> camel-cxf bundle doesn't specify any Import-Package version
> -----------------------------------------------------------
>
>                 Key: CAMEL-1862
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1862
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0-M3
>         Environment: CAMEL, CXF, OSGi Felix
>            Reporter: Savas Ali Tokmen
>            Assignee: Willem Jiang
>             Fix For: 1.6.2, 2.0.0
>
>
> The camel-cxf component is currently generated against CXF version 2.2.2.
> As a result, the camel-cxf module as well as the camel-cxf bundle require CXF 2.2. More importantly, that bundle does not work correctly with CXF 2.0 (note that this is an expected behavior, CXF has had API changes with its 2.2 version).
> Now, the trouble is that the camel-cxf JAR's MANIFEST has an Import-Package on org.apache.cxf.* components without specifying any version! As a result, when it looks for CXF and both CXF 2.0 and 2.2 are present on the platform, it sometimes chooses the wrong one.
> To solve this issue, version specifiers should be added to the Import-Package declarations of the camel-cxf bundle. I guess an import on version 2.2 would be enough (we don't need to specify 2.2.2 explicitely).
> Cheers
> S. Ali Tokmen
> http://ali.tokmen.com/

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


[jira] Commented: (CAMEL-1862) camel-cxf bundle doesn't specify any Import-Package version

Posted by "Savas Ali Tokmen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54509#action_54509 ] 

Savas Ali Tokmen commented on CAMEL-1862:
-----------------------------------------

This actually solves half of the issue, by guaranteeing that Camel-CXF won't start if CXF 2.0 or 2.1 is here.

The trouble with CXF is that it registers itself to Spring without specifying its version. As a result, in the case some CXF 2.0 applications are started for real (i.e. registered to Spring), Camel-CXF (with CXF 2.2) will not start with an exception that looks like:

{{    WSDLManagerImpl.registerInitialExtensions : Failed to add extension element.}}
{{    java.lang.ClassNotFoundException: org.xmlsoap.schemas.wsdl.http.AddressType}}
{{           at org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:627)}}
{{           at org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:61)}}
{{           at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1469)}}
{{           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)}}
{{           at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass2(ClassLoaderUtils.java:236)}}
{{           at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:222)}}
{{           at org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions(JAXBExtensionHelper.java:85)}}
{{           at org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLManagerImpl.java:239)}}
{{           at org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLManagerImpl.java:219)}}
{{           at org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:109)}}
{{           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)}}
{{           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)}}
{{           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)}}
{{           at java.lang.reflect.Constructor.newInstance(Constructor.java:494)}}
{{           at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)}}
{{           at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)}}
{{           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)}}
{{           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)}}
{{           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)}}
{{           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)}}

{{           at java.security.AccessController.doPrivileged(Native Method)}}
{{           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)}}
{{           at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)}}
{{           at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)}}
{{           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)}}
{{           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)}}
{{           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)}}
{{           at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)}}
{{           at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)}}
{{           at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)}}
{{           at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)}}
{{           at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)}}
{{           at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)}}
{{           at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86)}}
{{           at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64)}}
{{           at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53)}}
{{           at org.ow2.jonas.camel.cxf.servlet.OsgiHttpServiceCXFServlet.loadBus(OsgiHttpServiceCXFServlet.java:75)}}
{{           at org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:79)}}
{{           at org.ow2.jonas.web.httpServiceTomcat6.HttpServiceImpl.registerServlet(HttpServiceImpl.java:231)}}
{{           at org.ow2.jonas.camel.cxf.servlet.OsgiCXFServletDeployer.__start(OsgiCXFServletDeployer.java:74)}}
{{           at org.ow2.jonas.camel.cxf.servlet.OsgiCXFServletDeployer.start(OsgiCXFServletDeployer.java)}}
{{           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:585)}}
{{           at org.apache.felix.ipojo.util.Callback.call(Callback.java:235)}}
{{           at org.apache.felix.ipojo.util.Callback.call(Callback.java:191)}}
{{           at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallback.call(LifecycleCallback.java:86)}}
{{           at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.__stateChanged(LifecycleCallbackHandler.java:162)}}
{{           at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.stateChanged(LifecycleCallbackHandler.java)}}
{{           at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:428)}}
{{           at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:309)}}
{{           at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:155)}}
{{           at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:283)}}
{{           at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:220)}}
{{           at org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:349)}}
{{           at org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:84)}}
{{           at org.apache.felix.ipojo.Extender.parse(Extender.java:269)}}
{{           at org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)}}
{{           at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)}}
{{           at org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:669)}}
{{           at java.lang.Thread.run(Thread.java:595)}}

As a result, my previous comment:

bq. When both CXF 2.0.11 and 2.2.2 are present, the bundle does resolve and when started seems to take the good version

May or may not be valid depending on what has been done with which CXF version and the order in which these actions have been done

Long story short: don't try to have two CXF bundles on the same OSGi platform...

> camel-cxf bundle doesn't specify any Import-Package version
> -----------------------------------------------------------
>
>                 Key: CAMEL-1862
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1862
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0-M3
>         Environment: CAMEL, CXF, OSGi Felix
>            Reporter: Savas Ali Tokmen
>            Assignee: Willem Jiang
>             Fix For: 1.6.2, 2.0.0
>
>
> The camel-cxf component is currently generated against CXF version 2.2.2.
> As a result, the camel-cxf module as well as the camel-cxf bundle require CXF 2.2. More importantly, that bundle does not work correctly with CXF 2.0 (note that this is an expected behavior, CXF has had API changes with its 2.2 version).
> Now, the trouble is that the camel-cxf JAR's MANIFEST has an Import-Package on org.apache.cxf.* components without specifying any version! As a result, when it looks for CXF and both CXF 2.0 and 2.2 are present on the platform, it sometimes chooses the wrong one.
> To solve this issue, version specifiers should be added to the Import-Package declarations of the camel-cxf bundle. I guess an import on version 2.2 would be enough (we don't need to specify 2.2.2 explicitely).
> Cheers
> S. Ali Tokmen
> http://ali.tokmen.com/

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


[jira] Issue Comment Edited: (CAMEL-1862) camel-cxf bundle doesn't specify any Import-Package version

Posted by "Savas Ali Tokmen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54509#action_54509 ] 

Savas Ali Tokmen edited comment on CAMEL-1862 at 9/25/09 6:22 AM:
------------------------------------------------------------------

This actually solves half of the issue, by guaranteeing that Camel-CXF won't start if CXF 2.0 or 2.1 is here.

The trouble with CXF is that it registers itself to Spring without specifying its version. As a result, in the case some CXF 2.0 applications are started for real (i.e. registered to Spring), Camel-CXF (with CXF 2.2) will not start with an exception that looks like:

{quote}
    WSDLManagerImpl.registerInitialExtensions : Failed to add extension element.
    java.lang.ClassNotFoundException: org.xmlsoap.schemas.wsdl.http.AddressType
           at org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:627)
           at org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:61)
           at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1469)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
           at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass2(ClassLoaderUtils.java:236)
           at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:222)
           at org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions(JAXBExtensionHelper.java:85)
           at org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLManagerImpl.java:239)
           at org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLManagerImpl.java:219)
           at org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:109)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
           at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
           at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

           at java.security.AccessController.doPrivileged(Native Method)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
           at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
           at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
           at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
           at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
           at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
           at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)
           at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)
           at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
           at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86)
           at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64)
           at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53)
           at org.ow2.jonas.camel.cxf.servlet.OsgiHttpServiceCXFServlet.loadBus(OsgiHttpServiceCXFServlet.java:75)
           at org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:79)
           at org.ow2.jonas.web.httpServiceTomcat6.HttpServiceImpl.registerServlet(HttpServiceImpl.java:231)
           at org.ow2.jonas.camel.cxf.servlet.OsgiCXFServletDeployer.__start(OsgiCXFServletDeployer.java:74)
           at org.ow2.jonas.camel.cxf.servlet.OsgiCXFServletDeployer.start(OsgiCXFServletDeployer.java)
           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:585)
           at org.apache.felix.ipojo.util.Callback.call(Callback.java:235)
           at org.apache.felix.ipojo.util.Callback.call(Callback.java:191)
           at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallback.call(LifecycleCallback.java:86)
           at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.__stateChanged(LifecycleCallbackHandler.java:162)
           at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.stateChanged(LifecycleCallbackHandler.java)
           at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:428)
           at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:309)
           at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:155)
           at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:283)
           at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:220)
           at org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:349)
           at org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:84)
           at org.apache.felix.ipojo.Extender.parse(Extender.java:269)
           at org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
           at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
           at org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:669)
           at java.lang.Thread.run(Thread.java:595)
{quote}

As a result, my previous comment:

bq. When both CXF 2.0.11 and 2.2.2 are present, the bundle does resolve and when started seems to take the good version

May or may not be valid depending on what has been done with which CXF version and the order in which these actions have been done

Long story short: don't try to have two CXF bundles on the same OSGi platform...

      was (Author: alitokmen):
    This actually solves half of the issue, by guaranteeing that Camel-CXF won't start if CXF 2.0 or 2.1 is here.

The trouble with CXF is that it registers itself to Spring without specifying its version. As a result, in the case some CXF 2.0 applications are started for real (i.e. registered to Spring), Camel-CXF (with CXF 2.2) will not start with an exception that looks like:

{{    WSDLManagerImpl.registerInitialExtensions : Failed to add extension element.}}
{{    java.lang.ClassNotFoundException: org.xmlsoap.schemas.wsdl.http.AddressType}}
{{           at org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:627)}}
{{           at org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:61)}}
{{           at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1469)}}
{{           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)}}
{{           at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass2(ClassLoaderUtils.java:236)}}
{{           at org.apache.cxf.common.classloader.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:222)}}
{{           at org.apache.cxf.wsdl.JAXBExtensionHelper.addExtensions(JAXBExtensionHelper.java:85)}}
{{           at org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLManagerImpl.java:239)}}
{{           at org.apache.cxf.wsdl11.WSDLManagerImpl.registerInitialExtensions(WSDLManagerImpl.java:219)}}
{{           at org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:109)}}
{{           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)}}
{{           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)}}
{{           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)}}
{{           at java.lang.reflect.Constructor.newInstance(Constructor.java:494)}}
{{           at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)}}
{{           at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)}}
{{           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)}}
{{           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)}}
{{           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)}}
{{           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)}}

{{           at java.security.AccessController.doPrivileged(Native Method)}}
{{           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)}}
{{           at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)}}
{{           at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)}}
{{           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)}}
{{           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)}}
{{           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)}}
{{           at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)}}
{{           at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)}}
{{           at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)}}
{{           at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)}}
{{           at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)}}
{{           at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)}}
{{           at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86)}}
{{           at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64)}}
{{           at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53)}}
{{           at org.ow2.jonas.camel.cxf.servlet.OsgiHttpServiceCXFServlet.loadBus(OsgiHttpServiceCXFServlet.java:75)}}
{{           at org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:79)}}
{{           at org.ow2.jonas.web.httpServiceTomcat6.HttpServiceImpl.registerServlet(HttpServiceImpl.java:231)}}
{{           at org.ow2.jonas.camel.cxf.servlet.OsgiCXFServletDeployer.__start(OsgiCXFServletDeployer.java:74)}}
{{           at org.ow2.jonas.camel.cxf.servlet.OsgiCXFServletDeployer.start(OsgiCXFServletDeployer.java)}}
{{           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:585)}}
{{           at org.apache.felix.ipojo.util.Callback.call(Callback.java:235)}}
{{           at org.apache.felix.ipojo.util.Callback.call(Callback.java:191)}}
{{           at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallback.call(LifecycleCallback.java:86)}}
{{           at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.__stateChanged(LifecycleCallbackHandler.java:162)}}
{{           at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.stateChanged(LifecycleCallbackHandler.java)}}
{{           at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:428)}}
{{           at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:309)}}
{{           at org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.java:155)}}
{{           at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:283)}}
{{           at org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory.java:220)}}
{{           at org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCreator.java:349)}}
{{           at org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:84)}}
{{           at org.apache.felix.ipojo.Extender.parse(Extender.java:269)}}
{{           at org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)}}
{{           at org.apache.felix.ipojo.Extender.access$600(Extender.java:52)}}
{{           at org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:669)}}
{{           at java.lang.Thread.run(Thread.java:595)}}

As a result, my previous comment:

bq. When both CXF 2.0.11 and 2.2.2 are present, the bundle does resolve and when started seems to take the good version

May or may not be valid depending on what has been done with which CXF version and the order in which these actions have been done

Long story short: don't try to have two CXF bundles on the same OSGi platform...
  
> camel-cxf bundle doesn't specify any Import-Package version
> -----------------------------------------------------------
>
>                 Key: CAMEL-1862
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1862
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0-M3
>         Environment: CAMEL, CXF, OSGi Felix
>            Reporter: Savas Ali Tokmen
>            Assignee: Willem Jiang
>             Fix For: 1.6.2, 2.0.0
>
>
> The camel-cxf component is currently generated against CXF version 2.2.2.
> As a result, the camel-cxf module as well as the camel-cxf bundle require CXF 2.2. More importantly, that bundle does not work correctly with CXF 2.0 (note that this is an expected behavior, CXF has had API changes with its 2.2 version).
> Now, the trouble is that the camel-cxf JAR's MANIFEST has an Import-Package on org.apache.cxf.* components without specifying any version! As a result, when it looks for CXF and both CXF 2.0 and 2.2 are present on the platform, it sometimes chooses the wrong one.
> To solve this issue, version specifiers should be added to the Import-Package declarations of the camel-cxf bundle. I guess an import on version 2.2 would be enough (we don't need to specify 2.2.2 explicitely).
> Cheers
> S. Ali Tokmen
> http://ali.tokmen.com/

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


[jira] Commented: (CAMEL-1862) camel-cxf bundle doesn't specify any Import-Package version

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53043#action_53043 ] 

Claus Ibsen commented on CAMEL-1862:
------------------------------------

@Savas

Thanks for the explanation.

> camel-cxf bundle doesn't specify any Import-Package version
> -----------------------------------------------------------
>
>                 Key: CAMEL-1862
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1862
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0-M3
>         Environment: CAMEL, CXF, OSGi Felix
>            Reporter: Savas Ali Tokmen
>            Assignee: Willem Jiang
>             Fix For: 1.6.2, 2.0.0
>
>
> The camel-cxf component is currently generated against CXF version 2.2.2.
> As a result, the camel-cxf module as well as the camel-cxf bundle require CXF 2.2. More importantly, that bundle does not work correctly with CXF 2.0 (note that this is an expected behavior, CXF has had API changes with its 2.2 version).
> Now, the trouble is that the camel-cxf JAR's MANIFEST has an Import-Package on org.apache.cxf.* components without specifying any version! As a result, when it looks for CXF and both CXF 2.0 and 2.2 are present on the platform, it sometimes chooses the wrong one.
> To solve this issue, version specifiers should be added to the Import-Package declarations of the camel-cxf bundle. I guess an import on version 2.2 would be enough (we don't need to specify 2.2.2 explicitely).
> Cheers
> S. Ali Tokmen
> http://ali.tokmen.com/

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


[jira] Commented: (CAMEL-1862) camel-cxf bundle doesn't specify any Import-Package version

Posted by "Savas Ali Tokmen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53036#action_53036 ] 

Savas Ali Tokmen commented on CAMEL-1862:
-----------------------------------------

Hello

Looks like http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/pom.xml?view=diff&r1=799251&r2=799252&pathrev=799252 fixes this :)

Cheers

S. Ali Tokmen
http://ali.tokmen.com/

> camel-cxf bundle doesn't specify any Import-Package version
> -----------------------------------------------------------
>
>                 Key: CAMEL-1862
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1862
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0-M3
>         Environment: CAMEL, CXF, OSGi Felix
>            Reporter: Savas Ali Tokmen
>            Assignee: Willem Jiang
>
> The camel-cxf component is currently generated against CXF version 2.2.2.
> As a result, the camel-cxf module as well as the camel-cxf bundle require CXF 2.2. More importantly, that bundle does not work correctly with CXF 2.0 (note that this is an expected behavior, CXF has had API changes with its 2.2 version).
> Now, the trouble is that the camel-cxf JAR's MANIFEST has an Import-Package on org.apache.cxf.* components without specifying any version! As a result, when it looks for CXF and both CXF 2.0 and 2.2 are present on the platform, it sometimes chooses the wrong one.
> To solve this issue, version specifiers should be added to the Import-Package declarations of the camel-cxf bundle. I guess an import on version 2.2 would be enough (we don't need to specify 2.2.2 explicitely).
> Cheers
> S. Ali Tokmen
> http://ali.tokmen.com/

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


[jira] Commented: (CAMEL-1862) camel-cxf bundle doesn't specify any Import-Package version

Posted by "Savas Ali Tokmen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53041#action_53041 ] 

Savas Ali Tokmen commented on CAMEL-1862:
-----------------------------------------

Hello

I've applied the patch on the CAMEL-CXF 2.0-M3 tag, and retried launching the platform with various versions of CXF. The behavior is as follows:

 - When only CXF 2.2.2 is present, all my tests pass (i.e., no regression)
 - When only CXF 2.0.11 is present, the bundle does not resolve but (as expected) says things like: Unresolved constraint in bundle 132: package; (&(package=org.apache.cxf.headers)(version>=2.2.0)(!(version>=3.0.0)))
 - When both CXF 2.0.11 and 2.2.2 are present, the bundle does resolve and when started seems to take the good version

This bug can therefore be marked "closed, fixed".

Cheers

S. Ali Tokmen
http://ali.tokmen.com/

> camel-cxf bundle doesn't specify any Import-Package version
> -----------------------------------------------------------
>
>                 Key: CAMEL-1862
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1862
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0-M3
>         Environment: CAMEL, CXF, OSGi Felix
>            Reporter: Savas Ali Tokmen
>            Assignee: Willem Jiang
>             Fix For: 1.6.2, 2.0.0
>
>
> The camel-cxf component is currently generated against CXF version 2.2.2.
> As a result, the camel-cxf module as well as the camel-cxf bundle require CXF 2.2. More importantly, that bundle does not work correctly with CXF 2.0 (note that this is an expected behavior, CXF has had API changes with its 2.2 version).
> Now, the trouble is that the camel-cxf JAR's MANIFEST has an Import-Package on org.apache.cxf.* components without specifying any version! As a result, when it looks for CXF and both CXF 2.0 and 2.2 are present on the platform, it sometimes chooses the wrong one.
> To solve this issue, version specifiers should be added to the Import-Package declarations of the camel-cxf bundle. I guess an import on version 2.2 would be enough (we don't need to specify 2.2.2 explicitely).
> Cheers
> S. Ali Tokmen
> http://ali.tokmen.com/

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