OK, I found what breaks it!

When I add this Camel route in a separate Blueprint XML in the same directory:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint 
        xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
        xmlns:camel="http://camel.apache.org/schema/blueprint"; 
        xsi:schemaLocation="
             http://www.osgi.org/xmlns/blueprint/v1.0.0 
             https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd";>
        
        <camelContext id="ra-aggregator" trace="true" streamCache="false" 
xmlns="http://camel.apache.org/schema/blueprint";>
                
                <route id="aggregator-timer">
                        <from 
uri="aggregator-quartz://aggregator-timer?cron={{ra.aggregator.scheduling.cron}}"
 />
                        <to uri="direct:aggregator" />                  
                </route>


The Quartz component is defines as a bean in the beans.xml Blueprint:

        <bean id="aggregator-quartz" 
class="org.apache.camel.component.quartz2.QuartzComponent">
            <property name="startDelayedSeconds" 
value="#{ra.aggregator.scheduling.startDelaySeconds}"/>
            <property name="properties">
                <props>
                        <prop key="org.quartz.threadPool.threadCount">1</prop>
                        <prop 
key="org.quartz.jobStore.misfireThreshold">#{ra.scheduling.misfireThreshold}</prop>
                </props>
            </property>
        </bean>  


The place  holders are defined in the beans.xml Blueprint :

                <cm:property name="ra.scheduling.misfireThreshold" 
value="60000"/>
                <cm:property name="ra.aggregator.scheduling.startDelaySeconds" 
value="5"/>
                <cm:property name="ra.aggregator.scheduling.cron" value="0 0/5 
* * * ?”/>

I have other Camel routes that use the {{}}  place holders and did not cause 
any problem, it is only this one with a Quartz component.  Any idea?

Best regards,
Alex soto


> On Sep 2, 2016, at 9:28 AM, Jean-Baptiste Onofré <[email protected]> wrote:
> 
> Do you use both cm and ext namespaces or only ext ?
> 
> Can you share your blueprint.xml ?
> 
> Thanks,
> Regards
> JB
> 
> On 09/02/2016 03:21 PM, Alex Soto wrote:
>> Same issue if run as standalone,  I even tested adding a cfg file with the 
>> configuration entry, but the bundle fails to start and the value in the 
>> configuration file does not seem to be honored.
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>>> On Sep 2, 2016, at 8:59 AM, Jean-Baptiste Onofré <[email protected]> wrote:
>>> 
>>> Do you have the issue only in Pax Exam or in Karaf standalone container as 
>>> well ?
>>> 
>>> I just tried with a simple blueprint and it works fine with ext and cm 
>>> xmlns.
>>> 
>>> Regards
>>> JB
>>> 
>>> On 09/02/2016 02:49 PM, Alex Soto wrote:
>>>> Hi JB,
>>>> 
>>>> Yes, I saw that other thread, but it is still not working for me.  I
>>>> printed the user.home value in the activation method of some other DS
>>>> component, and is it correctly set to the user home directory.   It only
>>>> does not work when referenced in a Blueprint XML.  I don’t know if I
>>>> have the correct versions, or perhaps I am missing a feature.  From the
>>>> Karaf/Pax-Exam log I can see the following features being loaded.
>>>> 
>>>>   mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.api/1.0.1
>>>>   mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.7
>>>>   mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core/1.4.5
>>>>   
>>>> mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0
>>>>   mvn:org.apache.aries.jmx/org.apache.aries.jmx.api/1.1.5
>>>>   mvn:org.apache.aries.jmx/org.apache.aries.jmx.blueprint.api/1.1.5
>>>>   mvn:org.apache.aries.jmx/org.apache.aries.jmx.blueprint.core/1.1.5
>>>>   mvn:org.apache.aries.jmx/org.apache.aries.jmx.core/1.1.5
>>>>   mvn:org.apache.aries.jmx/org.apache.aries.jmx.whiteboard/1.1.5
>>>>   mvn:org.apache.aries.proxy/org.apache.aries.proxy.api/1.0.1
>>>>   mvn:org.apache.aries.proxy/org.apache.aries.proxy.impl/1.0.4
>>>>   mvn:org.apache.aries/org.apache.aries.util/1.1.1
>>>>   mvn:org.apache.camel/camel-blueprint/2.17.0
>>>>   mvn:org.apache.felix/org.apache.felix.scr/2.0.2
>>>>   mvn:org.apache.felix/org.apache.felix.scr.compat/1.0.2
>>>>   mvn:org.apache.karaf.scr/org.apache.karaf.scr.command/4.0.3
>>>>   mvn:org.apache.karaf.scr/org.apache.karaf.scr.management/4.0.3
>>>> 
>>>> 
>>>> Does it look correct to you?
>>>> 
>>>> Also, I see a strange message:
>>>> 
>>>> 2016-09-02 08:32:22,218 | INFO  | pool-10-thread-1
>>>>         | BlueprintExtender
>>>> | org.apache.aries.blueprint.core | No quiesce support is available,
>>>> so blueprint components will not participate in quiesce operations
>>>> 
>>>> Not sure what that means.
>>>> 
>>>> Thank you, and best regards,
>>>> Alex soto
>>>> 
>>>> 
>>>> 
>>>>> On Sep 2, 2016, at 1:28 AM, Jean-Baptiste Onofré <[email protected]
>>>>> <mailto:[email protected]>> wrote:
>>>>> 
>>>>> Hi Alex,
>>>>> 
>>>>> I answered to another user couple of days ago with the same question
>>>>> (system property in blueprint) and he said it works fine.
>>>>> 
>>>>> Can you check the actual value of user.home ?
>>>>> 
>>>>> I will try by my side.
>>>>> 
>>>>> Regards
>>>>> JB
>>>>> 
>>>>> On 09/01/2016 07:45 PM, Alex Soto wrote:
>>>>>> Hello,  I have a blueprint bundle defined as:
>>>>>> 
>>>>>>  <blueprint
>>>>>>  xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
>>>>>>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>>>>>  xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0";
>>>>>>  xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0";
>>>>>>  xsi:schemaLocation="
>>>>>>               http://www.osgi.org/xmlns/blueprint/v1.0.0
>>>>>> 
>>>>>> https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd";>
>>>>>> 
>>>>>>  <ext:property-placeholder placeholder-prefix="$["
>>>>>>  placeholder-suffix="]" />
>>>>>> 
>>>>>>  <cm:property-placeholder persistent-id="my.config.id"
>>>>>>  update-strategy="reload" placeholder-prefix="#{"
>>>>>> placeholder-suffix="}">
>>>>>>  <cm:default-properties>
>>>>>>   <cm:property name="my.file.name"
>>>>>>  value="$[user.home]/.other/somefile" />
>>>>>>  </cm:default-properties>
>>>>>>  </cm:property-placeholder>
>>>>>>  <bean id=“fileReader" class="org.FileReader">
>>>>>>  <argument value="#{my.file.name}" />
>>>>>>  </bean>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> The $[user.home]  place holder is never substituted , so I get file not
>>>>>> found error on file name "$[user.home]/.other/somefile"
>>>>>> I have search everywhere but I can’t figure out what I am doing wrong.
>>>>>> 
>>>>>> 
>>>>>> Best regards,
>>>>>> Alex soto
>>>>>> [email protected]
>>>>>> <mailto:[email protected]> <mailto:[email protected]>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>> 
>>>>> --
>>>>> Jean-Baptiste Onofré
>>>>> [email protected] <mailto:[email protected]>
>>>>> http://blog.nanthrax.net <http://blog.nanthrax.net/>
>>>>> Talend - http://www.talend.com <http://www.talend.com/>
>>>> 
>>> 
>>> --
>>> Jean-Baptiste Onofré
>>> [email protected]
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>> 
> 
> -- 
> Jean-Baptiste Onofré
> [email protected]
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Reply via email to