You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Gerald Kallas <ca...@mailbox.org> on 2020/08/21 12:36:04 UTC

Hot deployment of jar files (as bundles) and update

Dear all,

I've a jar file that can be deployed with copying to the deploy folder. The log shows

2020-08-21T08:51:19,931 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Installing bundle sfo-account-mapping / 0.0.1.SNAPSHOT
2020-08-21T08:51:20,105 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Started bundle: wrap:file:/opt/apache-karaf-4.2.9/deploy/sfo-account-mapping-0.0.1-SNAPSHOT.jar$Bundle-SymbolicName=sfo-account-mapping&Bundle-Version=0.0.1.SNAPSHOT

When I'm going to copy a new version of this jar the bundle is not being updated.

I know this from Servicemix that even a new copy updates the bundle. Do I need to configure anything special in Karaf?

Best
Gerald

Re: Hot deployment of jar files (as bundles) and update

Posted by "Gerald Kallas - mailbox.org" <ca...@mailbox.org>.
If I‘d have to vote I‘d prefer to wait for Pax Web 8.0.

Sent by my mobile device
- Gerald Kallas

> Am 22.08.2020 um 17:35 schrieb Jean-Baptiste Onofre <jb...@nanthrax.net>:
> 
> Hi Gerald,
> 
> OK, I will check with 4.2.10-SNAPSHOT anyway as I will submit 4.2.10 to vote soon.
> 
> Regarding 4.3.0, it’s ready on the Karaf side, however, we have a dependency to Pax Web 8 which is not yet ready.
> We are discussing two options with Greg:
> 1. We are able to have Pax Web 8.0 soon and so, Karaf 4.3.0 will be released with it
> 2. We are too far from Pax Web 8.0, so, I will update Karaf 4.3.0 to Pax Web 7.3.x. The drawback is that it means Karaf 4.3.0 will be R7 compliant, but not for the HTTP service using Pax Web (we can be fully R7 compliant using Felix HTTP service instead of Pax Web).
> 
> I will have a chat with Greg on Monday to discuss about the next steps and I will send an update on the mailing list.
> 
> Regards
> JB
> 
>> Le 22 août 2020 à 16:07, Gerald Kallas <ca...@mailbox.org> a écrit :
>> 
>> Hi JB,
>> 
>> I did test again. I was wrong with 4.2.9. The hot deployment works with 4.2.9 but it didn't work with 4.2.7. So far no further investigation needed with the current version.
>> 
>> Btw .. when 4.3.0 will be released?
>> 
>> Best
>> Gerald
>> 
>>> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 15:43 geschrieben:
>>> 
>>> 
>>> Same behavior with Karaf 4.2.8 ?
>>> 
>>> I will try to reproduce (Karaf 4.2.9 is affected by the Felix FileInstall issue fixed now).
>>> 
>>> Regards
>>> JB
>>> 
>>>> Le 21 août 2020 à 15:17, Gerald Kallas <ca...@mailbox.org> a écrit :
>>>> 
>>>> I'm using a vanilla Karaf 4.2.9 with some (Camel) features installed.
>>>> 
>>>>> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 15:11 geschrieben:
>>>>> 
>>>>> 
>>>>> Hmmm, it should work (and I’m pretty sure it works for me).
>>>>> 
>>>>> Which Karaf version are you using ? With which framework (Felix or equinox) ?
>>>>> 
>>>>> It could be related to a caching issue.
>>>>> 
>>>>> Regards
>>>>> JB
>>>>> 
>>>>>> Le 21 août 2020 à 14:52, Gerald Kallas <ca...@mailbox.org> a écrit :
>>>>>> 
>>>>>> I have one with a separate Activator class, same behaviour.
>>>>>> 
>>>>>> As I mentioned, with Apache Servicemix this kind of update works (same jar files).
>>>>>> 
>>>>>> package de.ag.cas.eib.mapping.smx;
>>>>>> 
>>>>>> import org.apache.commons.logging.Log;
>>>>>> import org.apache.commons.logging.LogFactory;
>>>>>> import org.osgi.framework.BundleActivator;
>>>>>> import org.osgi.framework.BundleContext;
>>>>>> 
>>>>>> public class Activator implements BundleActivator {
>>>>>>    private static final transient Log log = LogFactory.getLog(Activator.class
>>>>>>            .getName());
>>>>>> 
>>>>>>    public void start(BundleContext context) throws Exception {
>>>>>>        log.info("EIBMappingService started");
>>>>>>    }
>>>>>> 
>>>>>>    public void stop(BundleContext context) throws Exception {
>>>>>>        log.info("EIBMappingService stopped");
>>>>>>    }
>>>>>> }
>>>>>> 
>>>>>>> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 14:43 geschrieben:
>>>>>>> 
>>>>>>> 
>>>>>>> Hi Gerald,
>>>>>>> 
>>>>>>> Do you have to wrap ? I guess it works with "regular" bundle, right ?
>>>>>>> 
>>>>>>> Regards
>>>>>>> JB
>>>>>>> 
>>>>>>>> Le 21 août 2020 à 14:36, Gerald Kallas <ca...@mailbox.org> a écrit :
>>>>>>>> 
>>>>>>>> Dear all,
>>>>>>>> 
>>>>>>>> I've a jar file that can be deployed with copying to the deploy folder. The log shows
>>>>>>>> 
>>>>>>>> 2020-08-21T08:51:19,931 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Installing bundle sfo-account-mapping / 0.0.1.SNAPSHOT
>>>>>>>> 2020-08-21T08:51:20,105 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Started bundle: wrap:file:/opt/apache-karaf-4.2.9/deploy/sfo-account-mapping-0.0.1-SNAPSHOT.jar$Bundle-SymbolicName=sfo-account-mapping&Bundle-Version=0.0.1.SNAPSHOT
>>>>>>>> 
>>>>>>>> When I'm going to copy a new version of this jar the bundle is not being updated.
>>>>>>>> 
>>>>>>>> I know this from Servicemix that even a new copy updates the bundle. Do I need to configure anything special in Karaf?
>>>>>>>> 
>>>>>>>> Best
>>>>>>>> Gerald
> 


Re: Hot deployment of jar files (as bundles) and update

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi Gerald,

OK, I will check with 4.2.10-SNAPSHOT anyway as I will submit 4.2.10 to vote soon.

Regarding 4.3.0, it’s ready on the Karaf side, however, we have a dependency to Pax Web 8 which is not yet ready.
We are discussing two options with Greg:
1. We are able to have Pax Web 8.0 soon and so, Karaf 4.3.0 will be released with it
2. We are too far from Pax Web 8.0, so, I will update Karaf 4.3.0 to Pax Web 7.3.x. The drawback is that it means Karaf 4.3.0 will be R7 compliant, but not for the HTTP service using Pax Web (we can be fully R7 compliant using Felix HTTP service instead of Pax Web).

I will have a chat with Greg on Monday to discuss about the next steps and I will send an update on the mailing list.

Regards
JB

> Le 22 août 2020 à 16:07, Gerald Kallas <ca...@mailbox.org> a écrit :
> 
> Hi JB,
> 
> I did test again. I was wrong with 4.2.9. The hot deployment works with 4.2.9 but it didn't work with 4.2.7. So far no further investigation needed with the current version.
> 
> Btw .. when 4.3.0 will be released?
> 
> Best
> Gerald
> 
>> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 15:43 geschrieben:
>> 
>> 
>> Same behavior with Karaf 4.2.8 ?
>> 
>> I will try to reproduce (Karaf 4.2.9 is affected by the Felix FileInstall issue fixed now).
>> 
>> Regards
>> JB
>> 
>>> Le 21 août 2020 à 15:17, Gerald Kallas <ca...@mailbox.org> a écrit :
>>> 
>>> I'm using a vanilla Karaf 4.2.9 with some (Camel) features installed.
>>> 
>>>> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 15:11 geschrieben:
>>>> 
>>>> 
>>>> Hmmm, it should work (and I’m pretty sure it works for me).
>>>> 
>>>> Which Karaf version are you using ? With which framework (Felix or equinox) ?
>>>> 
>>>> It could be related to a caching issue.
>>>> 
>>>> Regards
>>>> JB
>>>> 
>>>>> Le 21 août 2020 à 14:52, Gerald Kallas <ca...@mailbox.org> a écrit :
>>>>> 
>>>>> I have one with a separate Activator class, same behaviour.
>>>>> 
>>>>> As I mentioned, with Apache Servicemix this kind of update works (same jar files).
>>>>> 
>>>>> package de.ag.cas.eib.mapping.smx;
>>>>> 
>>>>> import org.apache.commons.logging.Log;
>>>>> import org.apache.commons.logging.LogFactory;
>>>>> import org.osgi.framework.BundleActivator;
>>>>> import org.osgi.framework.BundleContext;
>>>>> 
>>>>> public class Activator implements BundleActivator {
>>>>> 	private static final transient Log log = LogFactory.getLog(Activator.class
>>>>> 			.getName());
>>>>> 
>>>>> 	public void start(BundleContext context) throws Exception {
>>>>> 		log.info("EIBMappingService started");
>>>>> 	}
>>>>> 
>>>>> 	public void stop(BundleContext context) throws Exception {
>>>>> 		log.info("EIBMappingService stopped");
>>>>> 	}
>>>>> }
>>>>> 
>>>>>> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 14:43 geschrieben:
>>>>>> 
>>>>>> 
>>>>>> Hi Gerald,
>>>>>> 
>>>>>> Do you have to wrap ? I guess it works with "regular" bundle, right ?
>>>>>> 
>>>>>> Regards
>>>>>> JB
>>>>>> 
>>>>>>> Le 21 août 2020 à 14:36, Gerald Kallas <ca...@mailbox.org> a écrit :
>>>>>>> 
>>>>>>> Dear all,
>>>>>>> 
>>>>>>> I've a jar file that can be deployed with copying to the deploy folder. The log shows
>>>>>>> 
>>>>>>> 2020-08-21T08:51:19,931 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Installing bundle sfo-account-mapping / 0.0.1.SNAPSHOT
>>>>>>> 2020-08-21T08:51:20,105 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Started bundle: wrap:file:/opt/apache-karaf-4.2.9/deploy/sfo-account-mapping-0.0.1-SNAPSHOT.jar$Bundle-SymbolicName=sfo-account-mapping&Bundle-Version=0.0.1.SNAPSHOT
>>>>>>> 
>>>>>>> When I'm going to copy a new version of this jar the bundle is not being updated.
>>>>>>> 
>>>>>>> I know this from Servicemix that even a new copy updates the bundle. Do I need to configure anything special in Karaf?
>>>>>>> 
>>>>>>> Best
>>>>>>> Gerald


Re: Hot deployment of jar files (as bundles) and update

Posted by Gerald Kallas <ca...@mailbox.org>.
Hi JB,

I did test again. I was wrong with 4.2.9. The hot deployment works with 4.2.9 but it didn't work with 4.2.7. So far no further investigation needed with the current version.

Btw .. when 4.3.0 will be released?

Best
Gerald

> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 15:43 geschrieben:
> 
>  
> Same behavior with Karaf 4.2.8 ?
> 
> I will try to reproduce (Karaf 4.2.9 is affected by the Felix FileInstall issue fixed now).
> 
> Regards
> JB
> 
> > Le 21 août 2020 à 15:17, Gerald Kallas <ca...@mailbox.org> a écrit :
> > 
> > I'm using a vanilla Karaf 4.2.9 with some (Camel) features installed.
> > 
> >> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 15:11 geschrieben:
> >> 
> >> 
> >> Hmmm, it should work (and I’m pretty sure it works for me).
> >> 
> >> Which Karaf version are you using ? With which framework (Felix or equinox) ?
> >> 
> >> It could be related to a caching issue.
> >> 
> >> Regards
> >> JB
> >> 
> >>> Le 21 août 2020 à 14:52, Gerald Kallas <ca...@mailbox.org> a écrit :
> >>> 
> >>> I have one with a separate Activator class, same behaviour.
> >>> 
> >>> As I mentioned, with Apache Servicemix this kind of update works (same jar files).
> >>> 
> >>> package de.ag.cas.eib.mapping.smx;
> >>> 
> >>> import org.apache.commons.logging.Log;
> >>> import org.apache.commons.logging.LogFactory;
> >>> import org.osgi.framework.BundleActivator;
> >>> import org.osgi.framework.BundleContext;
> >>> 
> >>> public class Activator implements BundleActivator {
> >>> 	private static final transient Log log = LogFactory.getLog(Activator.class
> >>> 			.getName());
> >>> 
> >>> 	public void start(BundleContext context) throws Exception {
> >>> 		log.info("EIBMappingService started");
> >>> 	}
> >>> 
> >>> 	public void stop(BundleContext context) throws Exception {
> >>> 		log.info("EIBMappingService stopped");
> >>> 	}
> >>> }
> >>> 
> >>>> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 14:43 geschrieben:
> >>>> 
> >>>> 
> >>>> Hi Gerald,
> >>>> 
> >>>> Do you have to wrap ? I guess it works with "regular" bundle, right ?
> >>>> 
> >>>> Regards
> >>>> JB
> >>>> 
> >>>>> Le 21 août 2020 à 14:36, Gerald Kallas <ca...@mailbox.org> a écrit :
> >>>>> 
> >>>>> Dear all,
> >>>>> 
> >>>>> I've a jar file that can be deployed with copying to the deploy folder. The log shows
> >>>>> 
> >>>>> 2020-08-21T08:51:19,931 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Installing bundle sfo-account-mapping / 0.0.1.SNAPSHOT
> >>>>> 2020-08-21T08:51:20,105 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Started bundle: wrap:file:/opt/apache-karaf-4.2.9/deploy/sfo-account-mapping-0.0.1-SNAPSHOT.jar$Bundle-SymbolicName=sfo-account-mapping&Bundle-Version=0.0.1.SNAPSHOT
> >>>>> 
> >>>>> When I'm going to copy a new version of this jar the bundle is not being updated.
> >>>>> 
> >>>>> I know this from Servicemix that even a new copy updates the bundle. Do I need to configure anything special in Karaf?
> >>>>> 
> >>>>> Best
> >>>>> Gerald

Re: Hot deployment of jar files (as bundles) and update

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Same behavior with Karaf 4.2.8 ?

I will try to reproduce (Karaf 4.2.9 is affected by the Felix FileInstall issue fixed now).

Regards
JB

> Le 21 août 2020 à 15:17, Gerald Kallas <ca...@mailbox.org> a écrit :
> 
> I'm using a vanilla Karaf 4.2.9 with some (Camel) features installed.
> 
>> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 15:11 geschrieben:
>> 
>> 
>> Hmmm, it should work (and I’m pretty sure it works for me).
>> 
>> Which Karaf version are you using ? With which framework (Felix or equinox) ?
>> 
>> It could be related to a caching issue.
>> 
>> Regards
>> JB
>> 
>>> Le 21 août 2020 à 14:52, Gerald Kallas <ca...@mailbox.org> a écrit :
>>> 
>>> I have one with a separate Activator class, same behaviour.
>>> 
>>> As I mentioned, with Apache Servicemix this kind of update works (same jar files).
>>> 
>>> package de.ag.cas.eib.mapping.smx;
>>> 
>>> import org.apache.commons.logging.Log;
>>> import org.apache.commons.logging.LogFactory;
>>> import org.osgi.framework.BundleActivator;
>>> import org.osgi.framework.BundleContext;
>>> 
>>> public class Activator implements BundleActivator {
>>> 	private static final transient Log log = LogFactory.getLog(Activator.class
>>> 			.getName());
>>> 
>>> 	public void start(BundleContext context) throws Exception {
>>> 		log.info("EIBMappingService started");
>>> 	}
>>> 
>>> 	public void stop(BundleContext context) throws Exception {
>>> 		log.info("EIBMappingService stopped");
>>> 	}
>>> }
>>> 
>>>> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 14:43 geschrieben:
>>>> 
>>>> 
>>>> Hi Gerald,
>>>> 
>>>> Do you have to wrap ? I guess it works with "regular" bundle, right ?
>>>> 
>>>> Regards
>>>> JB
>>>> 
>>>>> Le 21 août 2020 à 14:36, Gerald Kallas <ca...@mailbox.org> a écrit :
>>>>> 
>>>>> Dear all,
>>>>> 
>>>>> I've a jar file that can be deployed with copying to the deploy folder. The log shows
>>>>> 
>>>>> 2020-08-21T08:51:19,931 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Installing bundle sfo-account-mapping / 0.0.1.SNAPSHOT
>>>>> 2020-08-21T08:51:20,105 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Started bundle: wrap:file:/opt/apache-karaf-4.2.9/deploy/sfo-account-mapping-0.0.1-SNAPSHOT.jar$Bundle-SymbolicName=sfo-account-mapping&Bundle-Version=0.0.1.SNAPSHOT
>>>>> 
>>>>> When I'm going to copy a new version of this jar the bundle is not being updated.
>>>>> 
>>>>> I know this from Servicemix that even a new copy updates the bundle. Do I need to configure anything special in Karaf?
>>>>> 
>>>>> Best
>>>>> Gerald


Re: Hot deployment of jar files (as bundles) and update

Posted by Gerald Kallas <ca...@mailbox.org>.
I'm using a vanilla Karaf 4.2.9 with some (Camel) features installed.

> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 15:11 geschrieben:
> 
>  
> Hmmm, it should work (and I’m pretty sure it works for me).
> 
> Which Karaf version are you using ? With which framework (Felix or equinox) ?
> 
> It could be related to a caching issue.
> 
> Regards
> JB
> 
> > Le 21 août 2020 à 14:52, Gerald Kallas <ca...@mailbox.org> a écrit :
> > 
> > I have one with a separate Activator class, same behaviour.
> > 
> > As I mentioned, with Apache Servicemix this kind of update works (same jar files).
> > 
> > package de.ag.cas.eib.mapping.smx;
> > 
> > import org.apache.commons.logging.Log;
> > import org.apache.commons.logging.LogFactory;
> > import org.osgi.framework.BundleActivator;
> > import org.osgi.framework.BundleContext;
> > 
> > public class Activator implements BundleActivator {
> > 	private static final transient Log log = LogFactory.getLog(Activator.class
> > 			.getName());
> > 
> > 	public void start(BundleContext context) throws Exception {
> > 		log.info("EIBMappingService started");
> > 	}
> > 
> > 	public void stop(BundleContext context) throws Exception {
> > 		log.info("EIBMappingService stopped");
> > 	}
> > }
> > 
> >> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 14:43 geschrieben:
> >> 
> >> 
> >> Hi Gerald,
> >> 
> >> Do you have to wrap ? I guess it works with "regular" bundle, right ?
> >> 
> >> Regards
> >> JB
> >> 
> >>> Le 21 août 2020 à 14:36, Gerald Kallas <ca...@mailbox.org> a écrit :
> >>> 
> >>> Dear all,
> >>> 
> >>> I've a jar file that can be deployed with copying to the deploy folder. The log shows
> >>> 
> >>> 2020-08-21T08:51:19,931 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Installing bundle sfo-account-mapping / 0.0.1.SNAPSHOT
> >>> 2020-08-21T08:51:20,105 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Started bundle: wrap:file:/opt/apache-karaf-4.2.9/deploy/sfo-account-mapping-0.0.1-SNAPSHOT.jar$Bundle-SymbolicName=sfo-account-mapping&Bundle-Version=0.0.1.SNAPSHOT
> >>> 
> >>> When I'm going to copy a new version of this jar the bundle is not being updated.
> >>> 
> >>> I know this from Servicemix that even a new copy updates the bundle. Do I need to configure anything special in Karaf?
> >>> 
> >>> Best
> >>> Gerald

Re: Hot deployment of jar files (as bundles) and update

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hmmm, it should work (and I’m pretty sure it works for me).

Which Karaf version are you using ? With which framework (Felix or equinox) ?

It could be related to a caching issue.

Regards
JB

> Le 21 août 2020 à 14:52, Gerald Kallas <ca...@mailbox.org> a écrit :
> 
> I have one with a separate Activator class, same behaviour.
> 
> As I mentioned, with Apache Servicemix this kind of update works (same jar files).
> 
> package de.ag.cas.eib.mapping.smx;
> 
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> import org.osgi.framework.BundleActivator;
> import org.osgi.framework.BundleContext;
> 
> public class Activator implements BundleActivator {
> 	private static final transient Log log = LogFactory.getLog(Activator.class
> 			.getName());
> 
> 	public void start(BundleContext context) throws Exception {
> 		log.info("EIBMappingService started");
> 	}
> 
> 	public void stop(BundleContext context) throws Exception {
> 		log.info("EIBMappingService stopped");
> 	}
> }
> 
>> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 14:43 geschrieben:
>> 
>> 
>> Hi Gerald,
>> 
>> Do you have to wrap ? I guess it works with "regular" bundle, right ?
>> 
>> Regards
>> JB
>> 
>>> Le 21 août 2020 à 14:36, Gerald Kallas <ca...@mailbox.org> a écrit :
>>> 
>>> Dear all,
>>> 
>>> I've a jar file that can be deployed with copying to the deploy folder. The log shows
>>> 
>>> 2020-08-21T08:51:19,931 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Installing bundle sfo-account-mapping / 0.0.1.SNAPSHOT
>>> 2020-08-21T08:51:20,105 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Started bundle: wrap:file:/opt/apache-karaf-4.2.9/deploy/sfo-account-mapping-0.0.1-SNAPSHOT.jar$Bundle-SymbolicName=sfo-account-mapping&Bundle-Version=0.0.1.SNAPSHOT
>>> 
>>> When I'm going to copy a new version of this jar the bundle is not being updated.
>>> 
>>> I know this from Servicemix that even a new copy updates the bundle. Do I need to configure anything special in Karaf?
>>> 
>>> Best
>>> Gerald


Re: Hot deployment of jar files (as bundles) and update

Posted by Gerald Kallas <ca...@mailbox.org>.
I have one with a separate Activator class, same behaviour.

As I mentioned, with Apache Servicemix this kind of update works (same jar files).

package de.ag.cas.eib.mapping.smx;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class Activator implements BundleActivator {
	private static final transient Log log = LogFactory.getLog(Activator.class
			.getName());

	public void start(BundleContext context) throws Exception {
		log.info("EIBMappingService started");
	}

	public void stop(BundleContext context) throws Exception {
		log.info("EIBMappingService stopped");
	}
}

> Jean-Baptiste Onofre <jb...@nanthrax.net> hat am 21.08.2020 14:43 geschrieben:
> 
>  
> Hi Gerald,
> 
> Do you have to wrap ? I guess it works with "regular" bundle, right ?
> 
> Regards
> JB
> 
> > Le 21 août 2020 à 14:36, Gerald Kallas <ca...@mailbox.org> a écrit :
> > 
> > Dear all,
> > 
> > I've a jar file that can be deployed with copying to the deploy folder. The log shows
> > 
> > 2020-08-21T08:51:19,931 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Installing bundle sfo-account-mapping / 0.0.1.SNAPSHOT
> > 2020-08-21T08:51:20,105 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Started bundle: wrap:file:/opt/apache-karaf-4.2.9/deploy/sfo-account-mapping-0.0.1-SNAPSHOT.jar$Bundle-SymbolicName=sfo-account-mapping&Bundle-Version=0.0.1.SNAPSHOT
> > 
> > When I'm going to copy a new version of this jar the bundle is not being updated.
> > 
> > I know this from Servicemix that even a new copy updates the bundle. Do I need to configure anything special in Karaf?
> > 
> > Best
> > Gerald

Re: Hot deployment of jar files (as bundles) and update

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi Gerald,

Do you have to wrap ? I guess it works with "regular" bundle, right ?

Regards
JB

> Le 21 août 2020 à 14:36, Gerald Kallas <ca...@mailbox.org> a écrit :
> 
> Dear all,
> 
> I've a jar file that can be deployed with copying to the deploy folder. The log shows
> 
> 2020-08-21T08:51:19,931 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Installing bundle sfo-account-mapping / 0.0.1.SNAPSHOT
> 2020-08-21T08:51:20,105 | INFO  | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall                      | 10 - org.apache.felix.fileinstall - 3.6.6 | Started bundle: wrap:file:/opt/apache-karaf-4.2.9/deploy/sfo-account-mapping-0.0.1-SNAPSHOT.jar$Bundle-SymbolicName=sfo-account-mapping&Bundle-Version=0.0.1.SNAPSHOT
> 
> When I'm going to copy a new version of this jar the bundle is not being updated.
> 
> I know this from Servicemix that even a new copy updates the bundle. Do I need to configure anything special in Karaf?
> 
> Best
> Gerald