You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2011/01/14 01:38:45 UTC

[jira] Created: (SMX4-744) specify camel feature bundle start level less than 60

specify camel feature bundle start level less than 60
-----------------------------------------------------

                 Key: SMX4-744
                 URL: https://issues.apache.org/jira/browse/SMX4-744
             Project: ServiceMix 4
          Issue Type: Improvement
            Reporter: Freeman Fang


so that the camel related bundles always get started before end users  bundle, this can avoid  lots of asyn  issues customer may encounter.

More discussion from [1]

[1]http://servicemix.396122.n5.nabble.com/DISCUSS-how-about-specify-camel-feature-bundle-level-less-than-60-td3334566.html

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


[jira] [Commented] (SMX4-744) specify camel feature bundle start level less than 60

Posted by "metatech (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SMX4-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078757#comment-13078757 ] 

metatech commented on SMX4-744:
-------------------------------

Below is an example of full stack trace, for ease of searchability.
The workaround to change the start-level to 50 in apache-camel-2.6.0-features.xml fixed it : the class org.apache.camel.core.osgi.OsgiComponentResolver can find the component.

	14:12:19,918 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Unable to start blueprint container for bundle camel-blueprint
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean camel-1
	at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:635)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:744)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:198)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:137)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.getComponentInstance(BlueprintContainerImpl.java:702)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.camel.blueprint.handler.CamelNamespaceHandler$CamelDependenciesFinder.process(CamelNamespaceHandler.java:499)[78:org.apache.camel.camel-blueprint:2.6.0]
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:479)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:299)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:213)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_25]
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_25]
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_25]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_25]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)[:1.6.0_25]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_25]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_25]
	at java.lang.Thread.run(Thread.java:662)[:1.6.0_25]
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route[[From[jetty:http://0.0.0.0:8192/PersonService?handlers... because of Failed to resolve endpoint: jetty://http://0.0.0.0:8192/PersonService?handlers=mySecurityHandler due to: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'jetty://http://0.0.0.0:8192/PersonService?handlers=mySecurityHandler' could be found
	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:165)
	at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:701)
	at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1623)
	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1412)
	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1321)
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:65)
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1299)
	at org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:77)
	at org.apache.camel.blueprint.BlueprintCamelContext.init(BlueprintCamelContext.java:72)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_25]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_25]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_25]
	at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_25]
	at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:221)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:844)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:633)[7:org.apache.aries.blueprint:0.2.0.incubating]
	... 18 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: jetty://http://0.0.0.0:8192/PersonService?handlers=mySecurityHandler due to: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'jetty://http://0.0.0.0:8192/PersonService?handlers=mySecurityHandler' could be found
	at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:449)
	at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:47)
	at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:175)
	at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:110)
	at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:116)
	at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)
	at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:88)
	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:737)
	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:160)
	... 34 more
Caused by: org.apache.camel.RuntimeCamelException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'jetty://http://0.0.0.0:8192/PersonService?handlers=mySecurityHandler' could be found
	at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)
	at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookup(PropertyPlaceholderDelegateRegistry.java:47)
	at org.apache.camel.impl.DefaultCamelContext.createEndpoint(DefaultCamelContext.java:1975)
	at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:441)
	... 42 more
Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'jetty://http://0.0.0.0:8192/PersonService?handlers=mySecurityHandler' could be found
	at org.apache.aries.blueprint.container.DependencyGraph.getSortedRecipes(DependencyGraph.java:51)
	at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:214)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:198)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:137)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.getComponentInstance(BlueprintContainerImpl.java:702)[7:org.apache.aries.blueprint:0.2.0.incubating]
	at org.apache.camel.blueprint.BlueprintContainerRegistry.lookup(BlueprintContainerRegistry.java:38)
	at org.apache.camel.impl.CompositeRegistry.lookup(CompositeRegistry.java:58)
	at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookup(PropertyPlaceholderDelegateRegistry.java:45)
	... 44 more


> specify camel feature bundle start level less than 60
> -----------------------------------------------------
>
>                 Key: SMX4-744
>                 URL: https://issues.apache.org/jira/browse/SMX4-744
>             Project: ServiceMix 4
>          Issue Type: Improvement
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>             Fix For: 4.4.0
>
>
> so that the camel related bundles always get started before end users  bundle, this can avoid  lots of asyn  issues customer may encounter.
> More discussion from [1]
> [1]http://servicemix.396122.n5.nabble.com/DISCUSS-how-about-specify-camel-feature-bundle-level-less-than-60-td3334566.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (SMX4-744) specify camel feature bundle start level less than 60

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

Freeman Fang resolved SMX4-744.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 4.4.0

> specify camel feature bundle start level less than 60
> -----------------------------------------------------
>
>                 Key: SMX4-744
>                 URL: https://issues.apache.org/jira/browse/SMX4-744
>             Project: ServiceMix 4
>          Issue Type: Improvement
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>             Fix For: 4.4.0
>
>
> so that the camel related bundles always get started before end users  bundle, this can avoid  lots of asyn  issues customer may encounter.
> More discussion from [1]
> [1]http://servicemix.396122.n5.nabble.com/DISCUSS-how-about-specify-camel-feature-bundle-level-less-than-60-td3334566.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SMX4-744) specify camel feature bundle start level less than 60

Posted by "metatech (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SMX4-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287402#comment-13287402 ] 

metatech commented on SMX4-744:
-------------------------------

The "osgi:reference" has one drawback : the referenced component (in this example camel-jetty) cannot be hot-redeployed.  Probably because once the OSGi reference becomes invalid, the using bundles are waiting to rebind it, which prevents the using bundles from being cleanly stopped (see log below).

{code}
OcsgiServiceProxyFactoryBean      | Service reference [[org.apache.camel.spi.ComponentResolver]] was unregistered and unbound from the service proxy
OsgiServiceBindingUtils          | Calling unbind on org.springframework.osgi.service.importer.support.internal.aop.ServiceProviderTCCLInterceptor$ServiceProviderTCCLListener@1840879 w/ reference [org.apache.camel.spi.ComponentResolver]
RunnableTimedExecution           | Closing runnable for context OsgiBundleXmlApplicationContext(bundle=mycomponent, config=osgibundle:/META-INF/spring/*.xml) did not finish in 10000ms; consider taking a snapshot and then shutdown the VM in case the thread still hangs
{code}

                
> specify camel feature bundle start level less than 60
> -----------------------------------------------------
>
>                 Key: SMX4-744
>                 URL: https://issues.apache.org/jira/browse/SMX4-744
>             Project: ServiceMix 4
>          Issue Type: Improvement
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>             Fix For: 4.4.0
>
>
> so that the camel related bundles always get started before end users  bundle, this can avoid  lots of asyn  issues customer may encounter.
> More discussion from [1]
> [1]http://servicemix.396122.n5.nabble.com/DISCUSS-how-about-specify-camel-feature-bundle-level-less-than-60-td3334566.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SMX4-744) specify camel feature bundle start level less than 60

Posted by "metatech (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SMX4-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187725#comment-13187725 ] 

metatech commented on SMX4-744:
-------------------------------

Here is a safe way to declare a runtime dependency.
The using bundle will wait until the Camel component is available in the OSGi registry, which means that it is fully initialized.
Extract from camel-config.xml : 
{code} 
<osgi:reference id="jetty" interface="org.apache.camel.spi.ComponentResolver" filter="(component=jetty)"/>
{code}

                
> specify camel feature bundle start level less than 60
> -----------------------------------------------------
>
>                 Key: SMX4-744
>                 URL: https://issues.apache.org/jira/browse/SMX4-744
>             Project: ServiceMix 4
>          Issue Type: Improvement
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>             Fix For: 4.4.0
>
>
> so that the camel related bundles always get started before end users  bundle, this can avoid  lots of asyn  issues customer may encounter.
> More discussion from [1]
> [1]http://servicemix.396122.n5.nabble.com/DISCUSS-how-about-specify-camel-feature-bundle-level-less-than-60-td3334566.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SMX4-744) specify camel feature bundle start level less than 60

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SMX4-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13023069#comment-13023069 ] 

Freeman Fang commented on SMX4-744:
-----------------------------------

KARAF-576 introduce start-level for feature, this will be in karaf 2.2.1 release which is coming soon.
Once karaf 2.2.1 is out, I'll patch camel features.xml to leverage this and ensure bundles in camel features can start early then normal customer router bundles.

> specify camel feature bundle start level less than 60
> -----------------------------------------------------
>
>                 Key: SMX4-744
>                 URL: https://issues.apache.org/jira/browse/SMX4-744
>             Project: ServiceMix 4
>          Issue Type: Improvement
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>
> so that the camel related bundles always get started before end users  bundle, this can avoid  lots of asyn  issues customer may encounter.
> More discussion from [1]
> [1]http://servicemix.396122.n5.nabble.com/DISCUSS-how-about-specify-camel-feature-bundle-level-less-than-60-td3334566.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (SMX4-744) specify camel feature bundle start level less than 60

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SMX4-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053048#comment-13053048 ] 

Freeman Fang commented on SMX4-744:
-----------------------------------

yeah, just mark it as resolved.

> specify camel feature bundle start level less than 60
> -----------------------------------------------------
>
>                 Key: SMX4-744
>                 URL: https://issues.apache.org/jira/browse/SMX4-744
>             Project: ServiceMix 4
>          Issue Type: Improvement
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>             Fix For: 4.4.0
>
>
> so that the camel related bundles always get started before end users  bundle, this can avoid  lots of asyn  issues customer may encounter.
> More discussion from [1]
> [1]http://servicemix.396122.n5.nabble.com/DISCUSS-how-about-specify-camel-feature-bundle-level-less-than-60-td3334566.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SMX4-744) specify camel feature bundle start level less than 60

Posted by "metatech (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SMX4-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161665#comment-13161665 ] 

metatech commented on SMX4-744:
-------------------------------

Beware : the workaround reduces the likelihood of the race condition to occur, but does not remove it.
See sample error :
org.apache.camel.RuntimeCamelException: org.apache.camel.TypeConverterLoaderException: Failed to load type converters because of: Cannot find any type converter classes from the following packages: [org.apache.camel.component.file, org.apache.camel.component.bean, org.apache.camel.converter] 
which is discussed here :
http://camel.465427.n5.nabble.com/Camel-under-OSGi-without-Spring-et-al-tp4507473p5038265.html

                
> specify camel feature bundle start level less than 60
> -----------------------------------------------------
>
>                 Key: SMX4-744
>                 URL: https://issues.apache.org/jira/browse/SMX4-744
>             Project: ServiceMix 4
>          Issue Type: Improvement
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>             Fix For: 4.4.0
>
>
> so that the camel related bundles always get started before end users  bundle, this can avoid  lots of asyn  issues customer may encounter.
> More discussion from [1]
> [1]http://servicemix.396122.n5.nabble.com/DISCUSS-how-about-specify-camel-feature-bundle-level-less-than-60-td3334566.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (SMX4-744) specify camel feature bundle start level less than 60

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

Freeman Fang reassigned SMX4-744:
---------------------------------

    Assignee: Freeman Fang

> specify camel feature bundle start level less than 60
> -----------------------------------------------------
>
>                 Key: SMX4-744
>                 URL: https://issues.apache.org/jira/browse/SMX4-744
>             Project: ServiceMix 4
>          Issue Type: Improvement
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>
> so that the camel related bundles always get started before end users  bundle, this can avoid  lots of asyn  issues customer may encounter.
> More discussion from [1]
> [1]http://servicemix.396122.n5.nabble.com/DISCUSS-how-about-specify-camel-feature-bundle-level-less-than-60-td3334566.html

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


[jira] [Commented] (SMX4-744) specify camel feature bundle start level less than 60

Posted by "Fernando Ribeiro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SMX4-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053036#comment-13053036 ] 

Fernando Ribeiro commented on SMX4-744:
---------------------------------------

Can this issue be closed already?

> specify camel feature bundle start level less than 60
> -----------------------------------------------------
>
>                 Key: SMX4-744
>                 URL: https://issues.apache.org/jira/browse/SMX4-744
>             Project: ServiceMix 4
>          Issue Type: Improvement
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>
> so that the camel related bundles always get started before end users  bundle, this can avoid  lots of asyn  issues customer may encounter.
> More discussion from [1]
> [1]http://servicemix.396122.n5.nabble.com/DISCUSS-how-about-specify-camel-feature-bundle-level-less-than-60-td3334566.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira