Re: bundle:watch
The requirement is that the bundle uses a maven snapshot url. If that's the case, the bundle:watch command will look for updates in the local repository. The only command I'm using for the bundle:watch is "bundle:watch *" which updates all maven snapshots whenever I rebuild something. 2017-04-04 10:41 GMT+02:00 Cristiano Costantini < cristiano.costant...@gmail.com>: > Hello all, > > I am trying to use for the first time the bundle:watch command, > however I cannot get it to work correctly... > > I watch a bundle with bundle:watch ID, I also start explicitly watching > with bundle:watch --start, the bundle is correctly listed when I execute > bundle:watch --list , but when I recompile my bundle using mvn clean > install, it is not updated automatically. > > I'm using Karaf 4.0.5 > > Am I doing something wrong? > Is anyone else experiencing the same issue? > > Thanks > Cristiano > > -- Guillaume Nodet
Re: bundle:watch
Hi, during development, you should install the feature manually. In that case it'll always pulled from your maven repo and therefore can be updated. regards, Achim 2017-04-04 11:30 GMT+02:00 Cristiano Costantini < cristiano.costant...@gmail.com>: > yes, that's exactly my case ! > > The bundle I try to watch is installed from a feature specified > in featuresBoot in file "org.apache.karaf.features.cfg" > > Do I need to install the feature manually or should I avoid using feature > and install the single bundle instead? > > Thank you, > Cristiano > > > > Il giorno mar 4 apr 2017 alle ore 11:20 Achim Nierbeck < > bcanh...@googlemail.com> ha scritto: > >> Hi, >> >> how do you install those bundles? >> For example if you have a bootfeature installing it, this won't work. >> As those Bundles are used from the system folder. >> >> regards, Achim >> >> >> 2017-04-04 10:41 GMT+02:00 Cristiano Costantini < >> cristiano.costant...@gmail.com>: >> >> Hello all, >> >> I am trying to use for the first time the bundle:watch command, >> however I cannot get it to work correctly... >> >> I watch a bundle with bundle:watch ID, I also start explicitly watching >> with bundle:watch --start, the bundle is correctly listed when I execute >> bundle:watch --list , but when I recompile my bundle using mvn clean >> install, it is not updated automatically. >> >> I'm using Karaf 4.0.5 >> >> Am I doing something wrong? >> Is anyone else experiencing the same issue? >> >> Thanks >> Cristiano >> >> >> >> >> -- >> >> Apache Member >> Apache Karaf <http://karaf.apache.org/> Committer & PMC >> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer >> & Project Lead >> blog <http://notizblog.nierbeck.de/> >> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> >> >> Software Architect / Project Manager / Scrum Master >> >> -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master
Re: bundle:watch
yes, that's exactly my case ! The bundle I try to watch is installed from a feature specified in featuresBoot in file "org.apache.karaf.features.cfg" Do I need to install the feature manually or should I avoid using feature and install the single bundle instead? Thank you, Cristiano Il giorno mar 4 apr 2017 alle ore 11:20 Achim Nierbeck < bcanh...@googlemail.com> ha scritto: > Hi, > > how do you install those bundles? > For example if you have a bootfeature installing it, this won't work. > As those Bundles are used from the system folder. > > regards, Achim > > > 2017-04-04 10:41 GMT+02:00 Cristiano Costantini < > cristiano.costant...@gmail.com>: > > Hello all, > > I am trying to use for the first time the bundle:watch command, > however I cannot get it to work correctly... > > I watch a bundle with bundle:watch ID, I also start explicitly watching > with bundle:watch --start, the bundle is correctly listed when I execute > bundle:watch --list , but when I recompile my bundle using mvn clean > install, it is not updated automatically. > > I'm using Karaf 4.0.5 > > Am I doing something wrong? > Is anyone else experiencing the same issue? > > Thanks > Cristiano > > > > > -- > > Apache Member > Apache Karaf <http://karaf.apache.org/> Committer & PMC > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & > Project Lead > blog <http://notizblog.nierbeck.de/> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> > > Software Architect / Project Manager / Scrum Master > >
Re: bundle:watch
Hi, how do you install those bundles? For example if you have a bootfeature installing it, this won't work. As those Bundles are used from the system folder. regards, Achim 2017-04-04 10:41 GMT+02:00 Cristiano Costantini < cristiano.costant...@gmail.com>: > Hello all, > > I am trying to use for the first time the bundle:watch command, > however I cannot get it to work correctly... > > I watch a bundle with bundle:watch ID, I also start explicitly watching > with bundle:watch --start, the bundle is correctly listed when I execute > bundle:watch --list , but when I recompile my bundle using mvn clean > install, it is not updated automatically. > > I'm using Karaf 4.0.5 > > Am I doing something wrong? > Is anyone else experiencing the same issue? > > Thanks > Cristiano > > -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master
bundle:watch
Hello all, I am trying to use for the first time the bundle:watch command, however I cannot get it to work correctly... I watch a bundle with bundle:watch ID, I also start explicitly watching with bundle:watch --start, the bundle is correctly listed when I execute bundle:watch --list , but when I recompile my bundle using mvn clean install, it is not updated automatically. I'm using Karaf 4.0.5 Am I doing something wrong? Is anyone else experiencing the same issue? Thanks Cristiano
Re: Karaf-4.0.8 - bundle:watch timezone issue
Sure: https://issues.apache.org/jira/browse/KARAF-4943 <https://issues.apache.org/jira/browse/KARAF-4943> Erwin > On Jan 15, 2017, at 12:25, Jean-Baptiste Onofré <j...@nanthrax.net> wrote: > > Hi Erwin, > > it looks you found a bug. Do you mind to create a Jira about that ? > > Thanks > Regards > JB > > On 01/15/2017 02:50 PM, Erwin Hogeweg wrote: >> Hi, >> >> I noticed that bundle:watch kept restarting the same bundles >> over-and-over again. After some digging I believe this behavior is >> caused by BundleWatchImpl:163 >> >>if (location != null && location.exists() && >> location.lastModified() > bundle.getLastModified()) { >> >> The location.lastModified() returns the timestamp in GMT, while the >> bundle.lastModified() returns the timestamp in local time (EST). >> >> Same behavior with Equinox and Felix. >> >> Is there a setting I am missing? >> >> Karaf-4.0.8 >> OS X-10.12.2 >> Java 1.8.0_92-b14 >> >> >> Regards, >> >> Erwin > > -- > Jean-Baptiste Onofré > jbono...@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com
Re: Karaf-4.0.8 - bundle:watch timezone issue
Hi Erwin, it looks you found a bug. Do you mind to create a Jira about that ? Thanks Regards JB On 01/15/2017 02:50 PM, Erwin Hogeweg wrote: Hi, I noticed that bundle:watch kept restarting the same bundles over-and-over again. After some digging I believe this behavior is caused by BundleWatchImpl:163 if (location != null && location.exists() && location.lastModified() > bundle.getLastModified()) { The location.lastModified() returns the timestamp in GMT, while the bundle.lastModified() returns the timestamp in local time (EST). Same behavior with Equinox and Felix. Is there a setting I am missing? Karaf-4.0.8 OS X-10.12.2 Java 1.8.0_92-b14 Regards, Erwin -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Karaf-4.0.8 - bundle:watch timezone issue
Hi, I noticed that bundle:watch kept restarting the same bundles over-and-over again. After some digging I believe this behavior is caused by BundleWatchImpl:163 if (location != null && location.exists() && location.lastModified() > bundle.getLastModified()) { The location.lastModified() returns the timestamp in GMT, while the bundle.lastModified() returns the timestamp in local time (EST). Same behavior with Equinox and Felix. Is there a setting I am missing? Karaf-4.0.8 OS X-10.12.2 Java 1.8.0_92-b14 Regards, Erwin
Re: Karaf-4.0.7 bundle:watch issue - SOLVED
Hi Erwin, good you found your problem ;) Thanks for the update. Regards JB On 11/24/2016 04:10 PM, Erwin Hogeweg wrote: P…. Of course this was a USER error. The bundle filename contained SNAPSHOT, but I had the bundle installed without version, just group and artifact ID… so is wasn’t picked up in the BundleWatcherImpl.isMavenSnapshotUrl() call. After installing it with the /1.0.0-SNAPSHOT included, the watch function works like a charm… I think this is what JB said, but it didn’t sink in… Sometimes I am getting really tired of myself :-) Anyway, thanks all for your suggestions and a Happy Thanksgiving everyone. Erwin On Nov 23, 2016, at 11:05, Erwin Hogeweg <erwin.hoge...@me.com <mailto:erwin.hoge...@me.com>> wrote: JB, I guess your SNAPSHOT is on a remote repo. For now, watch just works with SNAPSHOT updated in your local .m2/repository. Are you sure that only SNAPSHOT bundles are watched? If I look in the BundleWatchImpl class I see this: ... for (String bundleURL : watchURLs) { // Transform into regexp bundleURL = bundleURL.replaceAll("\\*", ".*"); for (Bundle bundle : bundleService.selectBundles(Collections.singletonList(bundleURL), false)) { if (isMavenSnapshotUrl(getLocation(bundle))) { watchedBundles.add(bundle); } } And when I execute /watch —list/ I indeed get ALL bundles. ... * 205 OPS4J Pax JDBC Pooling Support Base * 206 OPS4J Pax JDBC Pooling Support using Commons-DBCP2 * 207 Stax2 API * 208 Woodstox XML-processor * 210 ErwinsTest Bundle I enabled debug logging for the BundleWatcherImpl, but I don’t see any other log msgs than the start and stop. karaf@root>2016-11-23 10:59:49,088 | DEBUG | Thread-71| BundleWatcherImpl| 23 - org.apache.karaf.bundle.core - 4.0.7 | Bundle watcher thread stopped ... karaf@root>2016-11-23 10:59:52,294 | DEBUG | Thread-72| BundleWatcherImpl| 23 - org.apache.karaf.bundle.core - 4.0.7 | Bundle watcher thread started Regards, Erwin Regards JB On 11/23/2016 12:13 AM, Erwin Hogeweg wrote: Hi, Is there a reason why bundle:watch won’t work in the following scenario? - Install and start SNAPSHOT bundle from maven. - execute bundle:'watch —start ' - rebuild bundle with ‘clean install’ Expect bundle to be updated, but nothing happens… (Executing 'update ' does load the new version….) I changed the watch interval to 1 second thinking that maybe I was too impatient… to no avail. I vaguely remember some msgs here re. bundle:watch, but I couldn’t find them anymore. I also didn’t see any open issues in Jira. So I am a tad confused now. Can’t imagine this isn’t working, so I must be missing something very obvious. Any insight is greatly appreciated. Erwin -- Jean-Baptiste Onofré jbono...@apache.org <mailto:jbono...@apache.org> http://blog.nanthrax.net Talend - http://www.talend.com -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Karaf-4.0.7 bundle:watch issue - SOLVED
P…. Of course this was a USER error. The bundle filename contained SNAPSHOT, but I had the bundle installed without version, just group and artifact ID… so is wasn’t picked up in the BundleWatcherImpl.isMavenSnapshotUrl() call. After installing it with the /1.0.0-SNAPSHOT included, the watch function works like a charm… I think this is what JB said, but it didn’t sink in… Sometimes I am getting really tired of myself :-) Anyway, thanks all for your suggestions and a Happy Thanksgiving everyone. Erwin > On Nov 23, 2016, at 11:05, Erwin Hogeweg <erwin.hoge...@me.com> wrote: > > JB, > >> I guess your SNAPSHOT is on a remote repo. For now, watch just works with >> SNAPSHOT updated in your local .m2/repository. > Are you sure that only SNAPSHOT bundles are watched? > > If I look in the BundleWatchImpl class I see this: > > ... > for (String bundleURL : watchURLs) { > // Transform into regexp > bundleURL = bundleURL.replaceAll("\\*", ".*"); > for (Bundle bundle : > bundleService.selectBundles(Collections.singletonList(bundleURL), false)) { > if (isMavenSnapshotUrl(getLocation(bundle))) { > watchedBundles.add(bundle); > } > } > > And when I execute watch —list I indeed get ALL bundles. > ... > * 205 OPS4J Pax JDBC Pooling > Support Base > * 206 OPS4J Pax JDBC Pooling > Support using Commons-DBCP2 > * 207 Stax2 API > > * 208 Woodstox XML-processor > > * 210 ErwinsTest Bundle > > > I enabled debug logging for the BundleWatcherImpl, but I don’t see any other > log msgs than the start and stop. > > karaf@root>2016-11-23 10:59:49,088 | DEBUG | Thread-71| > BundleWatcherImpl| 23 - org.apache.karaf.bundle.core - 4.0.7 > | Bundle watcher thread stopped > ... > karaf@root>2016-11-23 10:59:52,294 | DEBUG | Thread-72| > BundleWatcherImpl| 23 - org.apache.karaf.bundle.core - 4.0.7 > | Bundle watcher thread started > > > Regards, > > Erwin > > >> >> Regards >> JB >> >> On 11/23/2016 12:13 AM, Erwin Hogeweg wrote: >>> Hi, >>> >>> Is there a reason why bundle:watch won’t work in the following scenario? >>> >>> - Install and start SNAPSHOT bundle from maven. >>> - execute bundle:'watch —start ' >>> - rebuild bundle with ‘clean install’ >>> >>> Expect bundle to be updated, but nothing happens… (Executing 'update ' >>> does load the new version….) >>> >>> I changed the watch interval to 1 second thinking that maybe I was too >>> impatient… to no avail. I vaguely remember some msgs here re. bundle:watch, >>> but I couldn’t find them anymore. I also didn’t see any open issues in >>> Jira. So I am a tad confused now. Can’t imagine this isn’t working, so I >>> must be missing something very obvious. >>> >>> Any insight is greatly appreciated. >>> >>> >>> Erwin >>> >> >> -- >> Jean-Baptiste Onofré >> jbono...@apache.org <mailto:jbono...@apache.org> >> http://blog.nanthrax.net >> Talend - http://www.talend.com >
Re: Karaf-4.0.7 bundle:watch issue
JB, > I guess your SNAPSHOT is on a remote repo. For now, watch just works with > SNAPSHOT updated in your local .m2/repository. Are you sure that only SNAPSHOT bundles are watched? If I look in the BundleWatchImpl class I see this: ... for (String bundleURL : watchURLs) { // Transform into regexp bundleURL = bundleURL.replaceAll("\\*", ".*"); for (Bundle bundle : bundleService.selectBundles(Collections.singletonList(bundleURL), false)) { if (isMavenSnapshotUrl(getLocation(bundle))) { watchedBundles.add(bundle); } } And when I execute watch —list I indeed get ALL bundles. ... * 205 OPS4J Pax JDBC Pooling Support Base * 206 OPS4J Pax JDBC Pooling Support using Commons-DBCP2 * 207 Stax2 API * 208 Woodstox XML-processor * 210 ErwinsTest Bundle I enabled debug logging for the BundleWatcherImpl, but I don’t see any other log msgs than the start and stop. karaf@root>2016-11-23 10:59:49,088 | DEBUG | Thread-71| BundleWatcherImpl| 23 - org.apache.karaf.bundle.core - 4.0.7 | Bundle watcher thread stopped ... karaf@root>2016-11-23 10:59:52,294 | DEBUG | Thread-72| BundleWatcherImpl| 23 - org.apache.karaf.bundle.core - 4.0.7 | Bundle watcher thread started Regards, Erwin > > Regards > JB > > On 11/23/2016 12:13 AM, Erwin Hogeweg wrote: >> Hi, >> >> Is there a reason why bundle:watch won’t work in the following scenario? >> >> - Install and start SNAPSHOT bundle from maven. >> - execute bundle:'watch —start ' >> - rebuild bundle with ‘clean install’ >> >> Expect bundle to be updated, but nothing happens… (Executing 'update ' >> does load the new version….) >> >> I changed the watch interval to 1 second thinking that maybe I was too >> impatient… to no avail. I vaguely remember some msgs here re. bundle:watch, >> but I couldn’t find them anymore. I also didn’t see any open issues in Jira. >> So I am a tad confused now. Can’t imagine this isn’t working, so I must be >> missing something very obvious. >> >> Any insight is greatly appreciated. >> >> >> Erwin >> > > -- > Jean-Baptiste Onofré > jbono...@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com
Re: Karaf-4.0.7 bundle:watch issue
JB, > Hmmm, and I guess that it contains SNAPSHOT in the version, right ? Correct. bundle:watch * Watched URLs/IDs: * karaf@root>bundle:watch --start Starting watch Watched URLs/IDs: * karaf@root>la START LEVEL 100 , List Threshold: 0 ID | State| Lvl | Version | Name 0 | Active | 0 | 3.10.101.v20150820-1432 | OSGi System Bundle … 228 | Active | 80 | 1.0.0.SNAPSHOT | ErwinsTest Bundle karaf@root> > Let me try to reproduce ? Mac OS X 10.12.1, Java 1.8.0_92-b14 Karaf 4.0.7 Equinox 3.10 Thanks, Erwin > > Regards > JB > > On 11/23/2016 10:11 AM, Erwin Hogeweg wrote: >> JB, >> >>> I guess your SNAPSHOT is on a remote repo. >> >> Nope, local. >> >>> For now, watch just works with SNAPSHOT updated in your local >>> .m2/repository. >> That's where it is. >> >> Erwin >> >> >>> >>> Regards >>> JB >>> >>>> On 11/23/2016 12:13 AM, Erwin Hogeweg wrote: >>>> Hi, >>>> >>>> Is there a reason why bundle:watch won’t work in the following scenario? >>>> >>>> - Install and start SNAPSHOT bundle from maven. >>>> - execute bundle:'watch —start ' >>>> - rebuild bundle with ‘clean install’ >>>> >>>> Expect bundle to be updated, but nothing happens… (Executing 'update >>>> ' does load the new version….) >>>> >>>> I changed the watch interval to 1 second thinking that maybe I was too >>>> impatient… to no avail. I vaguely remember some msgs here re. >>>> bundle:watch, but I couldn’t find them anymore. I also didn’t see any open >>>> issues in Jira. So I am a tad confused now. Can’t imagine this isn’t >>>> working, so I must be missing something very obvious. >>>> >>>> Any insight is greatly appreciated. >>>> >>>> >>>> Erwin >>>> >>> >>> -- >>> Jean-Baptiste Onofré >>> jbono...@apache.org >>> http://blog.nanthrax.net >>> Talend - http://www.talend.com > > -- > Jean-Baptiste Onofré > jbono...@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com
Re: Karaf-4.0.7 bundle:watch issue
Christian, > Do you have any issues when just using bundle:watch * Yes, same issue. Erwin > > Christian > > On 23.11.2016 00:13, Erwin Hogeweg wrote: >> Hi, >> >> Is there a reason why bundle:watch won’t work in the following scenario? >> >> - Install and start SNAPSHOT bundle from maven. >> - execute bundle:'watch —start ' >> - rebuild bundle with ‘clean install’ >> >> Expect bundle to be updated, but nothing happens… (Executing 'update ' >> does load the new version….) >> >> I changed the watch interval to 1 second thinking that maybe I was too >> impatient… to no avail. I vaguely remember some msgs here re. bundle:watch, >> but I couldn’t find them anymore. I also didn’t see any open issues in Jira. >> So I am a tad confused now. Can’t imagine this isn’t working, so I must be >> missing something very obvious. >> >> Any insight is greatly appreciated. >> >> >> Erwin >> > > > -- > Christian Schneider > http://www.liquid-reality.de > > Open Source Architect > http://www.talend.com >
Re: Karaf-4.0.7 bundle:watch issue
By the way, the watcher is based on the mvn regex by default. I have to check the bundle ID matching (I remember I did something around that while ago). Regards JB On 11/23/2016 10:11 AM, Erwin Hogeweg wrote: JB, I guess your SNAPSHOT is on a remote repo. Nope, local. For now, watch just works with SNAPSHOT updated in your local .m2/repository. That's where it is. Erwin Regards JB On 11/23/2016 12:13 AM, Erwin Hogeweg wrote: Hi, Is there a reason why bundle:watch won’t work in the following scenario? - Install and start SNAPSHOT bundle from maven. - execute bundle:'watch —start ' - rebuild bundle with ‘clean install’ Expect bundle to be updated, but nothing happens… (Executing 'update ' does load the new version….) I changed the watch interval to 1 second thinking that maybe I was too impatient… to no avail. I vaguely remember some msgs here re. bundle:watch, but I couldn’t find them anymore. I also didn’t see any open issues in Jira. So I am a tad confused now. Can’t imagine this isn’t working, so I must be missing something very obvious. Any insight is greatly appreciated. Erwin -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Karaf-4.0.7 bundle:watch issue
Never tried this style. Do you have any issues when just using bundle:watch * Christian On 23.11.2016 00:13, Erwin Hogeweg wrote: Hi, Is there a reason why bundle:watch won’t work in the following scenario? - Install and start SNAPSHOT bundle from maven. - execute bundle:'watch —start ' - rebuild bundle with ‘clean install’ Expect bundle to be updated, but nothing happens… (Executing 'update ' does load the new version….) I changed the watch interval to 1 second thinking that maybe I was too impatient… to no avail. I vaguely remember some msgs here re. bundle:watch, but I couldn’t find them anymore. I also didn’t see any open issues in Jira. So I am a tad confused now. Can’t imagine this isn’t working, so I must be missing something very obvious. Any insight is greatly appreciated. Erwin -- Christian Schneider http://www.liquid-reality.de Open Source Architect http://www.talend.com
Re: Karaf-4.0.7 bundle:watch issue
Hmmm, and I guess that it contains SNAPSHOT in the version, right ? Let me try to reproduce ? Regards JB On 11/23/2016 10:11 AM, Erwin Hogeweg wrote: JB, I guess your SNAPSHOT is on a remote repo. Nope, local. For now, watch just works with SNAPSHOT updated in your local .m2/repository. That's where it is. Erwin Regards JB On 11/23/2016 12:13 AM, Erwin Hogeweg wrote: Hi, Is there a reason why bundle:watch won’t work in the following scenario? - Install and start SNAPSHOT bundle from maven. - execute bundle:'watch —start ' - rebuild bundle with ‘clean install’ Expect bundle to be updated, but nothing happens… (Executing 'update ' does load the new version….) I changed the watch interval to 1 second thinking that maybe I was too impatient… to no avail. I vaguely remember some msgs here re. bundle:watch, but I couldn’t find them anymore. I also didn’t see any open issues in Jira. So I am a tad confused now. Can’t imagine this isn’t working, so I must be missing something very obvious. Any insight is greatly appreciated. Erwin -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Karaf-4.0.7 bundle:watch issue
JB, > I guess your SNAPSHOT is on a remote repo. Nope, local. > For now, watch just works with SNAPSHOT updated in your local .m2/repository. That's where it is. Erwin > > Regards > JB > >> On 11/23/2016 12:13 AM, Erwin Hogeweg wrote: >> Hi, >> >> Is there a reason why bundle:watch won’t work in the following scenario? >> >> - Install and start SNAPSHOT bundle from maven. >> - execute bundle:'watch —start ' >> - rebuild bundle with ‘clean install’ >> >> Expect bundle to be updated, but nothing happens… (Executing 'update ' >> does load the new version….) >> >> I changed the watch interval to 1 second thinking that maybe I was too >> impatient… to no avail. I vaguely remember some msgs here re. bundle:watch, >> but I couldn’t find them anymore. I also didn’t see any open issues in Jira. >> So I am a tad confused now. Can’t imagine this isn’t working, so I must be >> missing something very obvious. >> >> Any insight is greatly appreciated. >> >> >> Erwin >> > > -- > Jean-Baptiste Onofré > jbono...@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com
Karaf-4.0.7 bundle:watch issue
Hi, Is there a reason why bundle:watch won’t work in the following scenario? - Install and start SNAPSHOT bundle from maven. - execute bundle:'watch —start ' - rebuild bundle with ‘clean install’ Expect bundle to be updated, but nothing happens… (Executing 'update ' does load the new version….) I changed the watch interval to 1 second thinking that maybe I was too impatient… to no avail. I vaguely remember some msgs here re. bundle:watch, but I couldn’t find them anymore. I also didn’t see any open issues in Jira. So I am a tad confused now. Can’t imagine this isn’t working, so I must be missing something very obvious. Any insight is greatly appreciated. Erwin
Re: using bundle:watch for bundle refreshes and updates
So it is looking in the local .m2/repository path or elsewhere? If the former, then I suppose this should be sufficient as the built JAR will be uploaded to .m2/repository/path/to/bundle.jar. jbonofre wrote > Hi, > > bundle:watch works only for mvn URL containing SNAPSHOT by default. > > Regards > JB > > On 11/20/2015 06:32 AM, asookazian2 wrote: >> I am currently using the following cmd to update an existing bundle: >> >> update 384 file:/path/to/bundleFoo.jar >> refresh 384 >> >> According to this doc: >> https://karaf.apache.org/manual/latest/commands/bundle-watch.html >> >> The param for the bundle:watch cmd is URLs (bundle IDs or URLs) >> >> I'd like to have a specific file location/JAR be auto-reloaded and >> refreshed >> whenever the JAR is rebuilt by 'maven clean install'. What is the syntax >> to >> achieve same result as update/refresh cmds above with bundle:watch? >> Also, >> how often does bundle:watch poll for changes to the file? >> >> thx. >> >> >> >> -- >> View this message in context: >> http://karaf.922171.n3.nabble.com/using-bundle-watch-for-bundle-refreshes-and-updates-tp4043630.html >> Sent from the Karaf - User mailing list archive at Nabble.com. >> > > -- > Jean-Baptiste Onofré > jbonofre@ > http://blog.nanthrax.net > Talend - http://www.talend.com -- View this message in context: http://karaf.922171.n3.nabble.com/using-bundle-watch-for-bundle-refreshes-and-updates-tp4043630p4043645.html Sent from the Karaf - User mailing list archive at Nabble.com.
using bundle:watch for bundle refreshes and updates
I am currently using the following cmd to update an existing bundle: update 384 file:/path/to/bundleFoo.jar refresh 384 According to this doc: https://karaf.apache.org/manual/latest/commands/bundle-watch.html The param for the bundle:watch cmd is URLs (bundle IDs or URLs) I'd like to have a specific file location/JAR be auto-reloaded and refreshed whenever the JAR is rebuilt by 'maven clean install'. What is the syntax to achieve same result as update/refresh cmds above with bundle:watch? Also, how often does bundle:watch poll for changes to the file? thx. -- View this message in context: http://karaf.922171.n3.nabble.com/using-bundle-watch-for-bundle-refreshes-and-updates-tp4043630.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: using bundle:watch for bundle refreshes and updates
Hi, bundle:watch works only for mvn URL containing SNAPSHOT by default. Regards JB On 11/20/2015 06:32 AM, asookazian2 wrote: I am currently using the following cmd to update an existing bundle: update 384 file:/path/to/bundleFoo.jar refresh 384 According to this doc: https://karaf.apache.org/manual/latest/commands/bundle-watch.html The param for the bundle:watch cmd is URLs (bundle IDs or URLs) I'd like to have a specific file location/JAR be auto-reloaded and refreshed whenever the JAR is rebuilt by 'maven clean install'. What is the syntax to achieve same result as update/refresh cmds above with bundle:watch? Also, how often does bundle:watch poll for changes to the file? thx. -- View this message in context: http://karaf.922171.n3.nabble.com/using-bundle-watch-for-bundle-refreshes-and-updates-tp4043630.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: using bundle:watch for bundle refreshes and updates
By the way, you can specify the URL patterns to watch in the bundle:watch command (see command options). Regards JB On 11/20/2015 06:32 AM, asookazian2 wrote: I am currently using the following cmd to update an existing bundle: update 384 file:/path/to/bundleFoo.jar refresh 384 According to this doc: https://karaf.apache.org/manual/latest/commands/bundle-watch.html The param for the bundle:watch cmd is URLs (bundle IDs or URLs) I'd like to have a specific file location/JAR be auto-reloaded and refreshed whenever the JAR is rebuilt by 'maven clean install'. What is the syntax to achieve same result as update/refresh cmds above with bundle:watch? Also, how often does bundle:watch poll for changes to the file? thx. -- View this message in context: http://karaf.922171.n3.nabble.com/using-bundle-watch-for-bundle-refreshes-and-updates-tp4043630.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: bundle:watch with Karaf 3.0.4
Thank you Marco. But that is not the case. The sift logger is not activated in org.ops4j.pax.logging.cfg: -- View this message in context: http://karaf.922171.n3.nabble.com/bundle-watch-with-Karaf-3-0-4-tp4042175p4042185.html Sent from the Karaf - User mailing list archive at Nabble.com.
bundle:watch with Karaf 3.0.4
Hello, In Karaf 2.x each automatic bundle update via dev:watch was logged to the karaf shell. Now with Karaf 3.0.4 no successful update is logged to the shell anymore. Is it possible to configure the bundle:watch so the behaviour is as dev:watch was? Of course I can see the logging in org.apache.karaf.bundle.core.log but it was very convenient when that message was shown on the shell too. Thanks for any help. Kind regards, Hilderich -- View this message in context: http://karaf.922171.n3.nabble.com/bundle-watch-with-Karaf-3-0-4-tp4042175.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: bundle:watch with Karaf 3.0.4
Hi, I'm not sure if this is the reason, but if you can see the log in the file org.apache.karaf.bundle.core.log but not on shell, it sounds like the pax logging is not configured proberly. It seems the message from that bundle gets to the sift appender but not to the console appender. You may have a look at the org.ops4j.pax.logging.cfg regards, Marco Am 31.08.2015 um 14:22 schrieb Hilderich: Hello, In Karaf 2.x each automatic bundle update via dev:watch was logged to the karaf shell. Now with Karaf 3.0.4 no successful update is logged to the shell anymore. Is it possible to configure the bundle:watch so the behaviour is as dev:watch was? Of course I can see the logging in org.apache.karaf.bundle.core.log but it was very convenient when that message was shown on the shell too. Thanks for any help. Kind regards, Hilderich -- View this message in context: http://karaf.922171.n3.nabble.com/bundle-watch-with-Karaf-3-0-4-tp4042175.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: bundle:watch * as default setting
Hi Jochen, 1. if you enable bundle:watch the status will be store in the data folder. So even if you restart, if you don't remove the data folder, the bundle:watch will be enabled. 2. it's the case by default: bundle:watch * will watch all SNAPSHOT bundles, even the new installed (it's a thread). Regards JB On 06/30/2015 08:11 AM, jochenw wrote: Hello, I'm currently setting up a Karaf development environment for multiple teams. We will use remote debugging from Eclipse, and bundles under development are loaded on Karaf startup from the developers' local maven repository (additional bundles might come from a central repo, which is configured in org.ops4j.pax.url.mvn.cfg). To avoid additional copying and/or installing/starting/refreshing bundles, the bundle:watch command comes in handy. Now my questions: 1. Is there a way to automatically issue the bundle:watch * command after startup of the container *and* installation and startup of all boot features? Entering the command into org.apache.karaf.shell.cfg does not help, since the shell is started before installation / start of all boot features has finished. 2. Is there a way to automatically add all bundles from the local maven repo to the watch list, without the need to re-issue the bundle:watch * command, even if new bundles are installed? (Of course, a solution for 2. would also automatically solve 1.) Best Regards, Jochen -- View this message in context: http://karaf.922171.n3.nabble.com/bundle-watch-as-default-setting-tp4041188.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
bundle:watch * as default setting
Hello, I'm currently setting up a Karaf development environment for multiple teams. We will use remote debugging from Eclipse, and bundles under development are loaded on Karaf startup from the developers' local maven repository (additional bundles might come from a central repo, which is configured in org.ops4j.pax.url.mvn.cfg). To avoid additional copying and/or installing/starting/refreshing bundles, the bundle:watch command comes in handy. Now my questions: 1. Is there a way to automatically issue the bundle:watch * command after startup of the container *and* installation and startup of all boot features? Entering the command into org.apache.karaf.shell.cfg does not help, since the shell is started before installation / start of all boot features has finished. 2. Is there a way to automatically add all bundles from the local maven repo to the watch list, without the need to re-issue the bundle:watch * command, even if new bundles are installed? (Of course, a solution for 2. would also automatically solve 1.) Best Regards, Jochen -- View this message in context: http://karaf.922171.n3.nabble.com/bundle-watch-as-default-setting-tp4041188.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: karaf 3.0.2 bundle:watch not working
I just hit the same issue and, as it's a really nice feature in a dev environment, it would be great to patch it to continue working with 3.0.2 if possible. -- View this message in context: http://karaf.922171.n3.nabble.com/karaf-3-0-2-bundle-watch-not-working-tp4035923p4036010.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: karaf 3.0.2 bundle:watch not working
Yes, I will push the patch today and expose a patched 3.0.2 bundle (on my repo) for you. As reminder, you can do the same using bundle:update periodically (waiting for the patch). Regards JB On 10/17/2014 10:54 AM, siwatson wrote: I just hit the same issue and, as it's a really nice feature in a dev environment, it would be great to patch it to continue working with 3.0.2 if possible. -- View this message in context: http://karaf.922171.n3.nabble.com/karaf-3-0-2-bundle-watch-not-working-tp4035923p4036010.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: karaf 3.0.2 bundle:watch not working
As you can see in: https://issues.apache.org/jira/browse/KARAF-3283 it's a typo mistake (my bad, I'm very sorry about that :(). It's already fixed on Karaf 3.0.3-SNAPSHOT. For 3.0.2 user, you can edit the MANIFEST of the bundle.core bundle to fix that. Else, I deployed on my server a patched version of the bundle: http://maven.nanthrax.net/org.apache.karaf.bundle.core-3.0.2.jar You can download this one and replace the existing one in the Karaf system folder. Regards JB On 10/14/2014 10:56 PM, maroshi wrote: Using karaf 3.0.2 bundle:watch fails See bellow karaf@root() bundle:watch mvn:org.maroshi.sample/sandbox-karaf/0.0.1-SNAPSHOT Watched URLs/IDs: mvn:org.maroshi.sample/sandbox-karaf/0.0.1-SNAPSHOT karaf@root() Exception in thread Thread-16 java.lang.NoClassDefFoundError: org/apache/karaf/util/maven/Parser at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.getBundleExternalLocation(BundleWatcherImpl.java:195) at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.updateBundleIfNecessary(BundleWatcherImpl.java:144) at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.run(BundleWatcherImpl.java:100) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.util.maven.Parser not found by org.apache.karaf.bundle.core [31] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 4 more reverting to karaf 3.0.1 -- View this message in context: http://karaf.922171.n3.nabble.com/karaf-3-0-2-bundle-watch-not-working-tp4035923.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Problems with bundle:watch [Karaf 3.0.2]
Hi. First off, congratulations with the Karaf 3.0.2 release! And, now the sad part. I have trouble with bundle:watch and get this error: Exception in thread Thread-32 java.lang.NoClassDefFoundError: org/apache/karaf/util/maven/Parser at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.getBundleExternalLocation(BundleWatcherImpl.java:195) at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.updateBundleIfNecessary(BundleWatcherImpl.java:144) at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.run(BundleWatcherImpl.java:100) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.util.maven.Parser not found by org.apache.karaf.bundle.core [31] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 4 more It seems that the required org.apache.karaf.util dependency is missing from bundles in startup.properties. To fix the problem I manually installed org.apache.karaf.util using: install mvn:org.apache.karaf/org.apache.karaf.util/3.0.2 Maybe some other commands will break becouse of this missing dependency? Vennlig hilsen/Best regards Enonic AS Sten Roger Sandvik Development Manager +4795997084 http://enonic.com/try - Free Enonic CMS trial in the cloud
Re: Problems with bundle:watch [Karaf 3.0.2]
Hi Sten, Actually, karaf.util should be as private package (as it's not a bundle). It's a bug and I'm fixing that (I create the Jira). Regards JB On 10/14/2014 08:23 AM, Sten Roger Sandvik wrote: Hi. First off, congratulations with the Karaf 3.0.2 release! And, now the sad part. I have trouble with bundle:watch and get this error: Exception in thread Thread-32 java.lang.NoClassDefFoundError: org/apache/karaf/util/maven/Parser at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.getBundleExternalLocation(BundleWatcherImpl.java:195) at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.updateBundleIfNecessary(BundleWatcherImpl.java:144) at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.run(BundleWatcherImpl.java:100) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.util.maven.Parser not found by org.apache.karaf.bundle.core [31] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 4 more It seems that the required org.apache.karaf.util dependency is missing from bundles in startup.properties. To fix the problem I manually installed org.apache.karaf.util using: install mvn:org.apache.karaf/org.apache.karaf.util/3.0.2 Maybe some other commands will break becouse of this missing dependency? Vennlig hilsen/Best regards Enonic AS Sten Roger Sandvik Development Manager +4795997084 http://enonic.com/try - Free Enonic CMS trial in the cloud -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Problems with bundle:watch [Karaf 3.0.2]
FYI https://issues.apache.org/jira/browse/KARAF-3283 Regards JB On 10/14/2014 08:23 AM, Sten Roger Sandvik wrote: Exception in thread Thread-32 java.lang.NoClassDefFoundError: org/apache/karaf/util/maven/Parser at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.getBundleExternalLocation(BundleWatcherImpl.java:195) at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.updateBundleIfNecessary(BundleWatcherImpl.java:144) at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.run(BundleWatcherImpl.java:100) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.util.maven.Parser not found by org.apache.karaf.bundle.core [31] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 4 more -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Problems with bundle:watch [Karaf 3.0.2]
Wow. That was a quick reply :-) Thanks. - Original Message - From: Jean-Baptiste Onofré j...@nanthrax.net To: user@karaf.apache.org Sent: Tuesday, October 14, 2014 8:44:34 AM Subject: Re: Problems with bundle:watch [Karaf 3.0.2] Hi Sten, Actually, karaf.util should be as private package (as it's not a bundle). It's a bug and I'm fixing that (I create the Jira). Regards JB On 10/14/2014 08:23 AM, Sten Roger Sandvik wrote: Hi. First off, congratulations with the Karaf 3.0.2 release! And, now the sad part. I have trouble with bundle:watch and get this error: Exception in thread Thread-32 java.lang.NoClassDefFoundError: org/apache/karaf/util/maven/Parser at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.getBundleExternalLocation(BundleWatcherImpl.java:195) at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.updateBundleIfNecessary(BundleWatcherImpl.java:144) at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.run(BundleWatcherImpl.java:100) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.util.maven.Parser not found by org.apache.karaf.bundle.core [31] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 4 more It seems that the required org.apache.karaf.util dependency is missing from bundles in startup.properties. To fix the problem I manually installed org.apache.karaf.util using: install mvn:org.apache.karaf/org.apache.karaf.util/3.0.2 Maybe some other commands will break becouse of this missing dependency? Vennlig hilsen/Best regards Enonic AS Sten Roger Sandvik Development Manager +4795997084 http://enonic.com/try - Free Enonic CMS trial in the cloud -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: karaf 3.0.2 bundle:watch not working
Yes, see https://issues.apache.org/jira/browse/KARAF-3283 As reminder, you can use bundle:update (manually) if you want to stay with 3.0.2. Anyway, it will be fixed in 3.0.3. Regards JB On 10/14/2014 10:56 PM, maroshi wrote: Using karaf 3.0.2 bundle:watch fails See bellow karaf@root() bundle:watch mvn:org.maroshi.sample/sandbox-karaf/0.0.1-SNAPSHOT Watched URLs/IDs: mvn:org.maroshi.sample/sandbox-karaf/0.0.1-SNAPSHOT karaf@root() Exception in thread Thread-16 java.lang.NoClassDefFoundError: org/apache/karaf/util/maven/Parser at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.getBundleExternalLocation(BundleWatcherImpl.java:195) at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.updateBundleIfNecessary(BundleWatcherImpl.java:144) at org.apache.karaf.bundle.core.internal.BundleWatcherImpl.run(BundleWatcherImpl.java:100) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: org.apache.karaf.util.maven.Parser not found by org.apache.karaf.bundle.core [31] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 4 more reverting to karaf 3.0.1 -- View this message in context: http://karaf.922171.n3.nabble.com/karaf-3-0-2-bundle-watch-not-working-tp4035923.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Unsupported URL scheme using bundle:watch
Update: In order to work properly the following property has also to be added to etc/system.properties: openejb.deployments.classpath.filter.descriptors = true Regards, Jochen -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596p4033844.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Unsupported URL scheme using bundle:watch
Hi, I thought responsibility for the OSGi version of OpenEJB moved to the Karaf team (mentioned here: https://issues.apache.org/jira/browse/OPENEJB-2086). Perhaps it should be described on the OpenEJB page at the Karaf manual? Regards, Jochen -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596p4033725.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Unsupported URL scheme using bundle:watch
Well, the OpenEJB support kind of stalled right now. AFAIK the transition to Karaf isn't fullfilled yet. There have also been some discussions if it wouldn't be best to move it to ServiceMix instead. But it's safe to open an issue for the Karf documentation to clearer specify this sentence in the karaf docs: Full support of Apache OpenEJB may required some tuning on the etc/jre.properties file. regards, Achim 2014-06-24 10:20 GMT+02:00 jkraushaar jochen.kraush...@doubleslash.de: Hi, I thought responsibility for the OSGi version of OpenEJB moved to the Karaf team (mentioned here: https://issues.apache.org/jira/browse/OPENEJB-2086). Perhaps it should be described on the OpenEJB page at the Karaf manual? Regards, Jochen -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596p4033725.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Apache Member Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ Software Architect / Project Manager / Scrum Master
Re: Unsupported URL scheme using bundle:watch
Hi Jochen, the OpenEJB moves to Karaf is pending, it's not yet done. I still plan to work on it as soon as the new Karaf releases will be out. Regards JB On 06/24/2014 10:20 AM, jkraushaar wrote: Hi, I thought responsibility for the OSGi version of OpenEJB moved to the Karaf team (mentioned here: https://issues.apache.org/jira/browse/OPENEJB-2086). Perhaps it should be described on the OpenEJB page at the Karaf manual? Regards, Jochen -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596p4033725.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Unsupported URL scheme using bundle:watch
Thank you Achim and JB. I created an issue and added some further configuration information I stumbled upon: https://issues.apache.org/jira/browse/KARAF-3066 Regards, Jochen -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596p4033728.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Unsupported URL scheme using bundle:watch
Hi Jochen, thanks for that. I took the Jira and I will enhance the manual for 3.0.2. Regards JB On 06/24/2014 11:27 AM, jkraushaar wrote: Thank you Achim and JB. I created an issue and added some further configuration information I stumbled upon: https://issues.apache.org/jira/browse/KARAF-3066 Regards, Jochen -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596p4033728.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Jean-Baptiste Onofré jbono...@apache.org http://blog.nanthrax.net Talend - http://www.talend.com
Re: Unsupported URL scheme using bundle:watch
Sorry for the late answer: I was not clear enough regarding the updated bundle. The process is as follows: - Karaf is watching all urls with 'bundle:watch *' - I build a SNAPSHOT osgi bundle with 'mvn clean install' (NOT the org.apache.openejb.core-osgi 4.5.2 bundle) - Karaf tries to update the new bundle but somehow also the bundle 'org.apache.openejb.core-osgi 4.5.2' I don't know why it tries to update this bundle. It also doesn't show up in 'bundle:watch --list'. Regards, Simon -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596p4033689.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Unsupported URL scheme using bundle:watch
How did you install those bundles, did you install a feature where the EJB bundle has been marked as dependency? The only possibility might be that the feature resolver actually should refresh, not update, the ejb bundle because it should be rewired. This might be a bug. Do you have a simple sample for reproduction? regards, Achim 2014-06-23 8:41 GMT+02:00 sprinz simon.pr...@doubleslash.de: Sorry for the late answer: I was not clear enough regarding the updated bundle. The process is as follows: - Karaf is watching all urls with 'bundle:watch *' - I build a SNAPSHOT osgi bundle with 'mvn clean install' (NOT the org.apache.openejb.core-osgi 4.5.2 bundle) - Karaf tries to update the new bundle but somehow also the bundle 'org.apache.openejb.core-osgi 4.5.2' I don't know why it tries to update this bundle. It also doesn't show up in 'bundle:watch --list'. Regards, Simon -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596p4033689.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Apache Member Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ Software Architect / Project Manager / Scrum Master
Re: Unsupported URL scheme using bundle:watch
The cause of this error is method org.apache.openejb.config.DeploymentsResolver.loadFromClasspath(...) in Release 4.5.2 of OpenEJB. Here the URLs of all JARs loaded by the given ClassLoader are collected. Then the system JARs get removed from the list. Normally also the OpenEJB JARs should be removed from list, but as the URL of the OpenEJB bundle JAR is bundle://185.0:1/ it does not match any of the regular expressions of the filter. The URL is not removed and the exception is thrown. There is a workaround for this error: OpenEJB allows to add custom filter expressions by setting the parameter openejb.deployments.classpath.exclude in Karaf Home/etc/system.properties. Add the following line in your system.properties: openejb.deployments.classpath.exclude = bundle:.* When you update your bundle now, the OpenEJB bundle JAR is also removed from list of URLs and it works. Should I open a Karaf bug ticket? Regards, Jochen -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596p4033708.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Unsupported URL scheme using bundle:watch
Hi, as I haven't used EJB/OpenEJB in Karaf yet I wasn't aware of this. But this doesn't seem to be a bug in Karaf. It looks a lot more like it's something that needs documentation at the OpenEJB project, if not already done there :) regards, Achim 2014-06-23 17:07 GMT+02:00 jkraushaar jochen.kraush...@doubleslash.de: The cause of this error is method org.apache.openejb.config.DeploymentsResolver.loadFromClasspath(...) in Release 4.5.2 of OpenEJB. Here the URLs of all JARs loaded by the given ClassLoader are collected. Then the system JARs get removed from the list. Normally also the OpenEJB JARs should be removed from list, but as the URL of the OpenEJB bundle JAR is bundle://185.0:1/ it does not match any of the regular expressions of the filter. The URL is not removed and the exception is thrown. There is a workaround for this error: OpenEJB allows to add custom filter expressions by setting the parameter openejb.deployments.classpath.exclude in Karaf Home/etc/system.properties. Add the following line in your system.properties: openejb.deployments.classpath.exclude = bundle:.* When you update your bundle now, the OpenEJB bundle JAR is also removed from list of URLs and it works. Should I open a Karaf bug ticket? Regards, Jochen -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596p4033708.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Apache Member Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ Software Architect / Project Manager / Scrum Master
Re: Unsupported URL scheme using bundle:watch
Hi, how did you install the bundle in question? is it a maven coordinate? Like, mvn:groupId/artifactId/version or is it a file: or is it a combination of wrap and file or maven? cause I think the later is hard for the bundle:watch to determine if it's updated. regards, Achim 2014-06-18 15:37 GMT+02:00 sprinz simon.pr...@doubleslash.de: Hi, I try to get karaf to watch and automatically update osgi bundles by using bundle:watch. However, when karaf tries to update a bundle I get the following error/stacktrace: java.lang.IllegalArgumentException: Unsupported URL scheme: bundle://185.0:1/ at org.apache.openejb.util.URLs.toFile(URLs.java:53)[185:org.apache.openejb.core-osgi:4.5.2] at org.apache.openejb.config.NewLoaderLogic.applyBuiltinExcludes(NewLoaderLogic.java:172)[185:org.apache.openejb.core-osgi:4.5.2] at org.apache.openejb.config.NewLoaderLogic.applyBuiltinExcludes(NewLoaderLogic.java:161)[185:org.apache.openejb.core-osgi:4.5.2] at org.apache.openejb.config.DeploymentsResolver.loadFromClasspath(DeploymentsResolver.java:238)[185:org.apache.openejb.core-osgi:4.5.2] at org.apache.openejb.config.DeploymentLoader.createAppModule(DeploymentLoader.java:585)[185:org.apache.openejb.core-osgi:4.5.2] at org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:147)[185:org.apache.openejb.core-osgi:4.5.2] at org.apache.openejb.core.osgi.impl.Deployer.deploy(Deployer.java:173)[185:org.apache.openejb.core-osgi:4.5.2] at org.apache.openejb.core.osgi.impl.Deployer.bundleChanged(Deployer.java:98)[185:org.apache.openejb.core-osgi:4.5.2] at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:868)[org.apache.felix.framework-4.2.1.jar:] at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:789)[org.apache.felix.framework-4.2.1.jar:] at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:1088)[org.apache.felix.framework-4.2.1.jar:] at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)[org.apache.felix.framework-4.2.1.jar:] at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:101)[org.apache.felix.framework-4.2.1.jar:] at java.lang.Thread.run(Thread.java:744)[:1.7.0_51] Updating bundles with update {bundleid} works perfectly... Is there any known solution for this problem? Thanks, Simon -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Apache Member Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ Software Architect / Project Manager / Scrum Master
Re: Unsupported URL scheme using bundle:watch
Hi, the bundle in question is org.apache.openejb.core-osgi 4.5.2. It is installed as a maven coordinate: mvn:org.apache.openejb/openejb-core-osgi/4.5.2. Regards, Simon -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596p4033600.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Unsupported URL scheme using bundle:watch
Looks good so far, the only thing that puzzles me, it's a released version, why would you want to do a bundle:watch / dev:watch on that. I'm not even sure this works. regards, Achim 2014-06-18 15:56 GMT+02:00 sprinz simon.pr...@doubleslash.de: Hi, the bundle in question is org.apache.openejb.core-osgi 4.5.2. It is installed as a maven coordinate: mvn:org.apache.openejb/openejb-core-osgi/4.5.2. Regards, Simon -- View this message in context: http://karaf.922171.n3.nabble.com/Unsupported-URL-scheme-using-bundle-watch-tp4033596p4033600.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Apache Member Apache Karaf http://karaf.apache.org/ Committer PMC OPS4J Pax Web http://wiki.ops4j.org/display/paxweb/Pax+Web/ Committer Project Lead blog http://notizblog.nierbeck.de/ Software Architect / Project Manager / Scrum Master