You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Giacomo Coletta <co...@gmail.com> on 2012/09/10 13:20:41 UTC
Kar seem to work only once in Karaf based distribution
Hi,
I just upgraded to karaf 2.2.9 and tried for the first time to deploy a
feature packaged into a Kar into my karaf based distribution.
I found out that if i put my kar into the deploy folder and start karaf the
feature is installed and started at the first start, but if i stop and
restart karaf the feature isn't installed anymore.
After a few trials, i found out that in order to have the feature installed
again, is sufficient to delete the empty file created at the kar
installation into the folder system/.timestamps and restart karaf.
Moreover, this strange behaviour only occurs in my karaf based
distribution. If i deploy my kar into a brand new 2.2.9 karaf, this is
normally installed at every restart.
Any idea about the possible cause ?
Thanks
Giacomo
Re: Kar seem to work only once in Karaf based distribution
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Agree, I think it's the good approach.
Regards
JB
On 09/11/2012 10:13 AM, Christian Schneider wrote:
> Perhaps we should clean the timestamps on a clean start?
>
> Christian
>
> Am 10.09.2012 18:20, schrieb Jean-Baptiste Onofré:
>> It's not a bug, it's by design. If you remove the data folder (so you
>> remove the features state), the KarDeployer won't take the kar file as
>> the .timestamp file means that the Kar has been already deployed (it's
>> to prevent to uncompress/install features from the Kar file everytime
>> that the file is pooled).
>>
>> So a simple workaround is to remove the .timestamp before startup (it
>> will force the uncompress/install features from the kar file).
>>
>> Regards
>> JB
>>
>> On 09/10/2012 05:43 PM, Christian Schneider wrote:
>>> I think it should simply work. So this is probably a bug that we did not
>>> yet see. Can you open a jira issue? Ideally using a fresh karaf with
>>> just the clean option set. So we do not need your custom distro to see
>>> the problem.
>>>
>>> Christian
>>>
>>>
>>> Am 10.09.2012 16:59, schrieb Giacomo Coletta:
>>>> Well yes, i use the org.osgi.framework.storage.clean=onFirstInit
>>>> property in config.properties, but i need it.
>>>> Any workaround to start each time a clean Karaf AND reinstall the
>>>> Kar each time ?
>>>>
>>>> Thank you in advance
>>>>
>>>> Giacomo
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: *Christian Schneider* <chris@die-schneider.net
>>>> <ma...@die-schneider.net>>
>>>> Date: 2012/9/10
>>>> Subject: Re: Kar seem to work only once in Karaf based distribution
>>>> To: user@karaf.apache.org <ma...@karaf.apache.org>
>>>>
>>>>
>>>> Normally the OSGi framework remembers the installed and started
>>>> bundles. So after a restart of karaf you should not need to install
>>>> the kar again as all bundles should still be there.
>>>> I assume that in your distribution you perhaps start a clean OSGi
>>>> framework each time which would not happen with a fresh Karaf.
>>>>
>>>> Christian
>>>>
>>>> Am 10.09.2012 13:20, schrieb Giacomo Coletta:
>>>>
>>>> Hi,
>>>>
>>>> I just upgraded to karaf 2.2.9 and tried for the first time to
>>>> deploy a feature packaged into a Kar into my karaf based
>>>> distribution.
>>>> I found out that if i put my kar into the deploy folder and start
>>>> karaf the feature is installed and started at the first start, but
>>>> if i stop and restart karaf the feature isn't installed anymore.
>>>> After a few trials, i found out that in order to have the feature
>>>> installed again, is sufficient to delete the empty file created at
>>>> the kar installation into the folder system/.timestamps and
>>>> restart karaf.
>>>> Moreover, this strange behaviour only occurs in my karaf based
>>>> distribution. If i deploy my kar into a brand new 2.2.9 karaf,
>>>> this is normally installed at every restart.
>>>>
>>>> Any idea about the possible cause ?
>>>>
>>>> Thanks
>>>>
>>>> Giacomo
>>>>
>>>>
>>>>
>>>> --
>>>> Christian Schneider
>>>> http://www.liquid-reality.de
>>>>
>>>> Open Source Architect
>>>> Talend Application Integration Division http://www.talend.com
>>>>
>>>>
>>>
>>>
>>> --
>>> Christian Schneider
>>> http://www.liquid-reality.de
>>>
>>> Open Source Architect
>>> Talend Application Integration Divisionhttp://www.talend.com
>>>
>>
>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Kar seem to work only once in Karaf based distribution
Posted by Christian Schneider <ch...@die-schneider.net>.
Perhaps we should clean the timestamps on a clean start?
Christian
Am 10.09.2012 18:20, schrieb Jean-Baptiste Onofré:
> It's not a bug, it's by design. If you remove the data folder (so you
> remove the features state), the KarDeployer won't take the kar file as
> the .timestamp file means that the Kar has been already deployed (it's
> to prevent to uncompress/install features from the Kar file everytime
> that the file is pooled).
>
> So a simple workaround is to remove the .timestamp before startup (it
> will force the uncompress/install features from the kar file).
>
> Regards
> JB
>
> On 09/10/2012 05:43 PM, Christian Schneider wrote:
>> I think it should simply work. So this is probably a bug that we did not
>> yet see. Can you open a jira issue? Ideally using a fresh karaf with
>> just the clean option set. So we do not need your custom distro to see
>> the problem.
>>
>> Christian
>>
>>
>> Am 10.09.2012 16:59, schrieb Giacomo Coletta:
>>> Well yes, i use the org.osgi.framework.storage.clean=onFirstInit
>>> property in config.properties, but i need it.
>>> Any workaround to start each time a clean Karaf AND reinstall the
>>> Kar each time ?
>>>
>>> Thank you in advance
>>>
>>> Giacomo
>>>
>>> ---------- Forwarded message ----------
>>> From: *Christian Schneider* <chris@die-schneider.net
>>> <ma...@die-schneider.net>>
>>> Date: 2012/9/10
>>> Subject: Re: Kar seem to work only once in Karaf based distribution
>>> To: user@karaf.apache.org <ma...@karaf.apache.org>
>>>
>>>
>>> Normally the OSGi framework remembers the installed and started
>>> bundles. So after a restart of karaf you should not need to install
>>> the kar again as all bundles should still be there.
>>> I assume that in your distribution you perhaps start a clean OSGi
>>> framework each time which would not happen with a fresh Karaf.
>>>
>>> Christian
>>>
>>> Am 10.09.2012 13:20, schrieb Giacomo Coletta:
>>>
>>> Hi,
>>>
>>> I just upgraded to karaf 2.2.9 and tried for the first time to
>>> deploy a feature packaged into a Kar into my karaf based
>>> distribution.
>>> I found out that if i put my kar into the deploy folder and start
>>> karaf the feature is installed and started at the first start, but
>>> if i stop and restart karaf the feature isn't installed anymore.
>>> After a few trials, i found out that in order to have the feature
>>> installed again, is sufficient to delete the empty file created at
>>> the kar installation into the folder system/.timestamps and
>>> restart karaf.
>>> Moreover, this strange behaviour only occurs in my karaf based
>>> distribution. If i deploy my kar into a brand new 2.2.9 karaf,
>>> this is normally installed at every restart.
>>>
>>> Any idea about the possible cause ?
>>>
>>> Thanks
>>>
>>> Giacomo
>>>
>>>
>>>
>>> --
>>> Christian Schneider
>>> http://www.liquid-reality.de
>>>
>>> Open Source Architect
>>> Talend Application Integration Division http://www.talend.com
>>>
>>>
>>
>>
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> Talend Application Integration Divisionhttp://www.talend.com
>>
>
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com
Re: Kar seem to work only once in Karaf based distribution
Posted by Giacomo Coletta <co...@gmail.com>.
Sorry, i didn't notice this message this morning and opened KARAF-1805.
So i should may be hack someway the karaf.bat to delete the .filestamp file
at karaf restart ?
Thank you for your help and regards.
Giacomo
2012/9/10 Jean-Baptiste Onofré <jb...@nanthrax.net>
> It's not a bug, it's by design. If you remove the data folder (so you
> remove the features state), the KarDeployer won't take the kar file as the
> .timestamp file means that the Kar has been already deployed (it's to
> prevent to uncompress/install features from the Kar file everytime that the
> file is pooled).
>
> So a simple workaround is to remove the .timestamp before startup (it will
> force the uncompress/install features from the kar file).
>
> Regards
> JB
>
>
> On 09/10/2012 05:43 PM, Christian Schneider wrote:
>
>> I think it should simply work. So this is probably a bug that we did not
>> yet see. Can you open a jira issue? Ideally using a fresh karaf with
>> just the clean option set. So we do not need your custom distro to see
>> the problem.
>>
>> Christian
>>
>>
>> Am 10.09.2012 16:59, schrieb Giacomo Coletta:
>>
>>> Well yes, i use the org.osgi.framework.storage.**clean=onFirstInit
>>> property in config.properties, but i need it.
>>> Any workaround to start each time a clean Karaf AND reinstall the
>>> Kar each time ?
>>>
>>> Thank you in advance
>>>
>>> Giacomo
>>>
>>> ---------- Forwarded message ----------
>>> From: *Christian Schneider* <chris@die-schneider.net
>>> <mailto:chris@die-schneider.**net <ch...@die-schneider.net>>>
>>> Date: 2012/9/10
>>> Subject: Re: Kar seem to work only once in Karaf based distribution
>>> To: user@karaf.apache.org <ma...@karaf.apache.org>
>>>
>>>
>>> Normally the OSGi framework remembers the installed and started
>>> bundles. So after a restart of karaf you should not need to install
>>> the kar again as all bundles should still be there.
>>> I assume that in your distribution you perhaps start a clean OSGi
>>> framework each time which would not happen with a fresh Karaf.
>>>
>>> Christian
>>>
>>> Am 10.09.2012 13:20, schrieb Giacomo Coletta:
>>>
>>> Hi,
>>>
>>> I just upgraded to karaf 2.2.9 and tried for the first time to
>>> deploy a feature packaged into a Kar into my karaf based
>>> distribution.
>>> I found out that if i put my kar into the deploy folder and start
>>> karaf the feature is installed and started at the first start, but
>>> if i stop and restart karaf the feature isn't installed anymore.
>>> After a few trials, i found out that in order to have the feature
>>> installed again, is sufficient to delete the empty file created at
>>> the kar installation into the folder system/.timestamps and
>>> restart karaf.
>>> Moreover, this strange behaviour only occurs in my karaf based
>>> distribution. If i deploy my kar into a brand new 2.2.9 karaf,
>>> this is normally installed at every restart.
>>>
>>> Any idea about the possible cause ?
>>>
>>> Thanks
>>>
>>> Giacomo
>>>
>>>
>>>
>>> --
>>> Christian Schneider
>>> http://www.liquid-reality.de
>>>
>>> Open Source Architect
>>> Talend Application Integration Division http://www.talend.com
>>>
>>>
>>>
>>
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> Talend Application Integration Divisionhttp://www.talend.com
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
Re: Kar seem to work only once in Karaf based distribution
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
It's not a bug, it's by design. If you remove the data folder (so you
remove the features state), the KarDeployer won't take the kar file as
the .timestamp file means that the Kar has been already deployed (it's
to prevent to uncompress/install features from the Kar file everytime
that the file is pooled).
So a simple workaround is to remove the .timestamp before startup (it
will force the uncompress/install features from the kar file).
Regards
JB
On 09/10/2012 05:43 PM, Christian Schneider wrote:
> I think it should simply work. So this is probably a bug that we did not
> yet see. Can you open a jira issue? Ideally using a fresh karaf with
> just the clean option set. So we do not need your custom distro to see
> the problem.
>
> Christian
>
>
> Am 10.09.2012 16:59, schrieb Giacomo Coletta:
>> Well yes, i use the org.osgi.framework.storage.clean=onFirstInit
>> property in config.properties, but i need it.
>> Any workaround to start each time a clean Karaf AND reinstall the
>> Kar each time ?
>>
>> Thank you in advance
>>
>> Giacomo
>>
>> ---------- Forwarded message ----------
>> From: *Christian Schneider* <chris@die-schneider.net
>> <ma...@die-schneider.net>>
>> Date: 2012/9/10
>> Subject: Re: Kar seem to work only once in Karaf based distribution
>> To: user@karaf.apache.org <ma...@karaf.apache.org>
>>
>>
>> Normally the OSGi framework remembers the installed and started
>> bundles. So after a restart of karaf you should not need to install
>> the kar again as all bundles should still be there.
>> I assume that in your distribution you perhaps start a clean OSGi
>> framework each time which would not happen with a fresh Karaf.
>>
>> Christian
>>
>> Am 10.09.2012 13:20, schrieb Giacomo Coletta:
>>
>> Hi,
>>
>> I just upgraded to karaf 2.2.9 and tried for the first time to
>> deploy a feature packaged into a Kar into my karaf based distribution.
>> I found out that if i put my kar into the deploy folder and start
>> karaf the feature is installed and started at the first start, but
>> if i stop and restart karaf the feature isn't installed anymore.
>> After a few trials, i found out that in order to have the feature
>> installed again, is sufficient to delete the empty file created at
>> the kar installation into the folder system/.timestamps and
>> restart karaf.
>> Moreover, this strange behaviour only occurs in my karaf based
>> distribution. If i deploy my kar into a brand new 2.2.9 karaf,
>> this is normally installed at every restart.
>>
>> Any idea about the possible cause ?
>>
>> Thanks
>>
>> Giacomo
>>
>>
>>
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> Talend Application Integration Division http://www.talend.com
>>
>>
>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> Talend Application Integration Divisionhttp://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Kar seem to work only once in Karaf based distribution
Posted by Christian Schneider <ch...@die-schneider.net>.
I think it should simply work. So this is probably a bug that we did not
yet see. Can you open a jira issue? Ideally using a fresh karaf with
just the clean option set. So we do not need your custom distro to see
the problem.
Christian
Am 10.09.2012 16:59, schrieb Giacomo Coletta:
> Well yes, i use the org.osgi.framework.storage.clean=onFirstInit
> property in config.properties, but i need it.
> Any workaround to start each time a clean Karaf AND reinstall the
> Kar each time ?
>
> Thank you in advance
>
> Giacomo
>
> ---------- Forwarded message ----------
> From: *Christian Schneider* <chris@die-schneider.net
> <ma...@die-schneider.net>>
> Date: 2012/9/10
> Subject: Re: Kar seem to work only once in Karaf based distribution
> To: user@karaf.apache.org <ma...@karaf.apache.org>
>
>
> Normally the OSGi framework remembers the installed and started
> bundles. So after a restart of karaf you should not need to install
> the kar again as all bundles should still be there.
> I assume that in your distribution you perhaps start a clean OSGi
> framework each time which would not happen with a fresh Karaf.
>
> Christian
>
> Am 10.09.2012 13:20, schrieb Giacomo Coletta:
>
> Hi,
>
> I just upgraded to karaf 2.2.9 and tried for the first time to
> deploy a feature packaged into a Kar into my karaf based distribution.
> I found out that if i put my kar into the deploy folder and start
> karaf the feature is installed and started at the first start, but
> if i stop and restart karaf the feature isn't installed anymore.
> After a few trials, i found out that in order to have the feature
> installed again, is sufficient to delete the empty file created at
> the kar installation into the folder system/.timestamps and
> restart karaf.
> Moreover, this strange behaviour only occurs in my karaf based
> distribution. If i deploy my kar into a brand new 2.2.9 karaf,
> this is normally installed at every restart.
>
> Any idea about the possible cause ?
>
> Thanks
>
> Giacomo
>
>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
>
>
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com
Re: Kar seem to work only once in Karaf based distribution
Posted by Giacomo Coletta <co...@gmail.com>.
Well yes, i use the org.osgi.framework.storage.clean=onFirstInit property
in config.properties, but i need it.
Any workaround to start each time a clean Karaf AND reinstall the Kar
each time ?
Thank you in advance
Giacomo
---------- Forwarded message ----------
From: Christian Schneider <ch...@die-schneider.net>
Date: 2012/9/10
Subject: Re: Kar seem to work only once in Karaf based distribution
To: user@karaf.apache.org
Normally the OSGi framework remembers the installed and started bundles. So
after a restart of karaf you should not need to install the kar again as
all bundles should still be there.
I assume that in your distribution you perhaps start a clean OSGi framework
each time which would not happen with a fresh Karaf.
Christian
Am 10.09.2012 13:20, schrieb Giacomo Coletta:
Hi,
>
> I just upgraded to karaf 2.2.9 and tried for the first time to deploy a
> feature packaged into a Kar into my karaf based distribution.
> I found out that if i put my kar into the deploy folder and start karaf
> the feature is installed and started at the first start, but if i stop and
> restart karaf the feature isn't installed anymore.
> After a few trials, i found out that in order to have the feature
> installed again, is sufficient to delete the empty file created at the kar
> installation into the folder system/.timestamps and restart karaf.
> Moreover, this strange behaviour only occurs in my karaf based
> distribution. If i deploy my kar into a brand new 2.2.9 karaf, this is
> normally installed at every restart.
>
> Any idea about the possible cause ?
>
> Thanks
>
> Giacomo
>
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com
Re: Kar seem to work only once in Karaf based distribution
Posted by Christian Schneider <ch...@die-schneider.net>.
Normally the OSGi framework remembers the installed and started bundles.
So after a restart of karaf you should not need to install the kar again
as all bundles should still be there.
I assume that in your distribution you perhaps start a clean OSGi
framework each time which would not happen with a fresh Karaf.
Christian
Am 10.09.2012 13:20, schrieb Giacomo Coletta:
> Hi,
>
> I just upgraded to karaf 2.2.9 and tried for the first time to deploy
> a feature packaged into a Kar into my karaf based distribution.
> I found out that if i put my kar into the deploy folder and start
> karaf the feature is installed and started at the first start, but if
> i stop and restart karaf the feature isn't installed anymore.
> After a few trials, i found out that in order to have the feature
> installed again, is sufficient to delete the empty file created at the
> kar installation into the folder system/.timestamps and restart karaf.
> Moreover, this strange behaviour only occurs in my karaf based
> distribution. If i deploy my kar into a brand new 2.2.9 karaf, this is
> normally installed at every restart.
>
> Any idea about the possible cause ?
>
> Thanks
>
> Giacomo
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com