Re: Vertx SPI

2024-03-26 Thread Achim Nierbeck
Hi Michael,

it's been quite a while since I've been playing around with karaf and
vert.x from principle it should still work though.
Maybe you find some help here:
https://github.com/ANierbeck/Karaf-Vertx/tree/master

I also used the spi-fly bundle to have some SPI stuff working.
https://github.com/ANierbeck/Karaf-Vertx/blob/master/Vertx-Feature/src/main/feature/feature.xml

maybe it will point you into the right direction, it's not with the latest
version.

regards, Achim


Am Di., 26. März 2024 um 12:46 Uhr schrieb Michael Elbaz <
michaelel...@outlook.fr>:

> First i do that:
>
>  bundle:install -s
> mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/1.3.7
>
> 
> *
> 
> osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)",
> osgi.serviceloader; 
> filter:="(osgi.serviceloader=io.vertx.ext.auth.HashingAlgorithm)";
> cardinality:=multiple,
> 
> 
>
> but this is not working, but even if i register a DS service the
> java.util.ServiceLoader#load(java.lang.Class) will be able to find this
> service ? (i think it was my first no success try) or maybe i don't
> understand you
>
> Le 26/03/2024 à 12:39, Steinar Bang a écrit :
>
> Michael Elbaz  :
>
> Thanks answering me but still not working i didn't even have a clue of
> wich bundle need to be modified the one from wich the code is called i
> suppose any other proposition ?
>
> Well I don't know vertex-auth-common, but I think it is likely that it
> has some sort of service registry, i.e. some class with a static method
> or something that registers the services?
>
> If so, then you can try a variant of my TwelveMonkeys trick, which is:
>  1. Use SPI-fly to load the services for the hashers you want to use
>  2. Create a DS component that gathers the services and registers them
> with vertex-auth-common's service registry
>
> This will be a little more complex than ImageIO, since ImageIO is part
> of the Java runtime, and vertex-auth-common (probably) isn't.
>
> But it should work if vertex-auth-common is an OSGi bundle that exports
> the package containing the service registry.
>
> Then you can just use that registry where you need it and (hopefully)
> the class should be found
>
> (Note the "hopefully" part above...:-) )
>
>
>
>

-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: java.lang.NoClassDefFoundError: javax/net/ssl/TrustManager

2024-03-18 Thread Achim Nierbeck
Hi Michael,

it's quite old (tbh. 5 years )
but maybe you can find something helpful
https://github.com/ANierbeck/Karaf-Vertx/blob/master/Vertx-Http/src/main/java/de/nierbeck/example/vertx/http/VertxHttpServer.java
I was experimenting with vert.x and Karaf at the time.

as it's 5 years ago, a lot could have changed by now.

maybe it helps, maybe not 

regards, Achim


Am Mo., 18. März 2024 um 11:41 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> Hi Michael
>
> It looks like a ClassLoading issue (the import is there but the class
> comes from another classloader).
>
> Did you try to set the TCCL just before creating the vertx HttpServer ?
>
> Regards
> JB
>
> On Sun, Mar 17, 2024 at 5:54 PM Michael Elbaz 
> wrote:
> >
> > Hello i use vertx on Karaf everything is ok but when i want to run an
> vertx http server (just http)
> >
> > vertx.createHttpServer()
> > .requestHandler(router)
> > .listen(8080)
> > .onSuccess(LOGGER::error)
> > .onFailure(LOGGER::error);
> >
> >
> > i get this error java.lang.NoClassDefFoundError:
> javax/net/ssl/TrustManager (i also get this one in karaf log:  Using the
> default address resolver as the dns resolver could not be loaded)
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: JDK 13/14 support for Karaf 4.2.10 and 4.3.0

2020-06-05 Thread Achim Nierbeck
Hi JB,

thanks for the pointers. Would it be reasonable to place that information
also on the download page?

regards, Achim


Am Fr., 5. Juni 2020 um 07:03 Uhr schrieb Jean-Baptiste Onofre <
j...@nanthrax.net>:

> Hi guys,
>
> I would like to send a quick note/update about the Karaf JDK support.
>
> Regarding runtime, Karaf 4.2.x and 4.3.x supports JDK 11 without problem.
> For Karaf 4.2.9, I did improvements about ASM (to support new JDK version).
>
> However, for now, Karaf 4.2.x and 4.3.x don’t start with JDK 13 or JDK 14.
> I gonna release 4.2.9 right now, the target is to support JDK 13 and 14
> for Karaf 4.2.10 and 4.3.0.
>
> Regards
> JB



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: Basic authentication of WAB using Jaas in Karaf

2020-05-13 Thread Achim Nierbeck
Yes, the configuration is case sensitive.
regarding sample for Karaf, I can do that, but there had been a reason for
consuming 10 Pages in the "Apache Karaf Cookbook" :)


regards, Achim


Am Di., 12. Mai 2020 um 23:10 Uhr schrieb Gerald Kallas <
catsh...@mailbox.org>:

> Hi Alex,
>
> we did make some experience with TLS and basic authentication on HTTP
> consumers in between (and with the help of this mailing list).
>
> I started a article series on my blog, see
>
> https://www.catshout.de/?p=161
>
> for a single HTTP consumer with TLS and basic authentication enabled. It's
> based on camel-jetty. All examples are written in Blueprint DSL. Hope this
> helps a bit. Feel free to comment.
>
> I'll proceed with a REST API secured in same manner and some discussions
> about the limitations and options.
>
> Best
> - Gerald
>
> > Alex Soto  hat am 12. Mai 2020 19:55 geschrieben:
> >
> >
> > This threads talks about the need to :
> >
> >
> http://karaf.922171.n3.nabble.com/Jetty-security-camel-servlet-td2120289.html
> >
> > Quote:
> >
> >
> > > you need to use the OSGi HTTP service
> > > api to properly configure the security bits (by implementing
> > > org.osgi.service.http.HttpContext interface).
> >
> >
> >
> > Are there any examples of this?
> >
> > Best regards,
> > Alex soto
> >
> >
> >
> >
> >
> > > On May 12, 2020, at 11:42 AM, Alex Soto  wrote:
> > > Thanks, JB.
> > >
> > > I found the problem was, a typo in the `realm-name` in the web.xml
> file. It appears to be case-sensitive. I had:
> > >
> > > 
> > > BASIC
> > > Karaf
> > > 
> > >
> > >
> > > But in the jetty.xml:
> > >
> > > 
> > > karaf
> > >
> > >
> > > So I think it could not match the `Karaf` in the Web.xml to the
> `karaf` in the Jetty.xml.
> > > I wish the error message was more explicit. Anyway, now the web app is
> properly initialized, BUT… the security constraint is not being applied to
> my Camel Rest services, only to the ‘/admin’. URL.
> > > For example:
> > >
> > > http://localhost:8181/admin/api/rest/executions
> > >
> > > Does not prompt for a password, it successfully returns the data from
> the Camel Rest DSL route. And this url
> > >
> > > http://localhost:8181/admin
> > >
> > > is protected with basic authentication, so the browser prompts me for
> the user name and password.
> > >
> > > What I need is protect everything starting with '/admin’
> > >
> > > Any ideas?
> > >
> > > Best regards,
> > > Alex soto
> > >
> > >
> > >
> > >
> > >
> > > > On May 12, 2020, at 11:24 AM, Jean-Baptiste Onofre 
> wrote:
> > > > Hi,
> > > >
> > > > It sounds like a class loader issue, so possible.
> > > >
> > > > Let me add an example in Karaf showing basic auth.
> > > >
> > > > Regards
> > > > JB
> > > >
> > > >
> > > >
> > > > > Le 12 mai 2020 à 15:39, Alex Soto  a écrit
> :
> > > > > I found that I have multiple versions of Jetty deployed in Karaf,
> that is: 9.4.20.v20190813, and 9.4.22.v20191022
> > > > > Would this be the reason for the following exception:
> > > > >
> > > > > 2020-05-12T09:10:19,122 | ERROR | paxweb-extender-2-thread-1 |
> WebAppPublisher | 302 - org.ops4j.pax.web.pax-web-extender-war - 7.2.14 |
> Error deploying web application
> > > > > java.lang.IllegalStateException: No LoginService for
> org.eclipse.jetty.security.authentication.BasicAuthenticator@1d7311a1 in
> ConstraintSecurityHandler@64779d1e{STARTING}
> > > > > at
> org.eclipse.jetty.security.authentication.LoginAuthenticator.setConfiguration(LoginAuthenticator.java:92)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:344)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:419)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:120)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.server.session.SessionHandler.doStart(SessionHandler.java:504)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:120)
> ~[?:?]
> > > > > at
> org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:879)

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-11 Thread Achim Nierbeck
> ~[?:?]
> at 
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.register(WebAppPublisher.java:228)
> ~[?:?]
> at 
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:173)
> ~[?:?]
> at 
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:129)
> ~[?:?]
> at
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
> ~[osgi.core-6.0.0.jar:?]
> at
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
> ~[osgi.core-6.0.0.jar:?]
> at
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
> ~[osgi.core-6.0.0.jar:?]
> at
> org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
> ~[osgi.core-6.0.0.jar:?]
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
> ~[osgi.core-6.0.0.jar:?]
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
> ~[osgi.core-6.0.0.jar:?]
> at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish(WebAppPublisher.java:98)
> ~[?:?]
> at
> org.ops4j.pax.web.extender.war.internal.WebObserver.deploy(WebObserver.java:217)
> ~[?:?]
> at
> org.ops4j.pax.web.extender.war.internal.WebObserver$1.doStart(WebObserver.java:172)
> ~[?:?]
> at
> org.ops4j.pax.web.extender.war.internal.extender.SimpleExtension.start(SimpleExtension.java:59)
> ~[?:?]
>
> at 
> org.ops4j.pax.web.extender.war.internal.extender.AbstractExtender.lambda$createExtension$0(AbstractExtender.java:277)
>  ~[?:?]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> [?:1.8.0_171]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_171]
>
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>  [?:1.8.0_171]
>
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>  [?:1.8.0_171]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> [?:1.8.0_171]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [?:1.8.0_171]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
>
>
>
> Best regards,
> Alex soto
>
>
>
>
> On May 11, 2020, at 8:36 AM, Alex Soto  wrote:
>
> Ok I saw it now, it was hidden:
>
> Test Realm
>
>
> Best regards,
> Alex soto
>
>
>
>
> On May 11, 2020, at 8:31 AM, Alex Soto  wrote:
>
> Thanks Achin and JB,
>
> I looked at that example, but that is is WAR, and I am looking for WAB
> example.  Still, in the ‘web.xml’ file there is no reference to JAAS
> realm.  Where do you indicate the realm name? (I have my own realm separate
> from the default Karaf one).
>
> Actually, it is not fun having to guess all this basic stuff, and also a
> productivity drain, I am sorry to say.
>
>
> Best regards,
> Alex soto
>
> On May 11, 2020, at 3:12 AM, Jean-Baptiste Onofre  wrote:
>
> No rush, I think it’s easier for our users to find "how to" ;)
>
> Thanks !
> Regards
> JB
>
> Le 11 mai 2020 à 09:09, Achim Nierbeck  a écrit :
>
> Sure ..
> maybe I find some time during this week to create this there ;)
>
> regards, Achim
>
> p.s. this just reminds me, that those samples are also in the "Apache
> Karaf Cookbook" :)
>
> Am Mo., 11. Mai 2020 um 06:32 Uhr schrieb Jean-Baptiste Onofre <
> j...@nanthrax.net>:
>
>> Maybe worth to add this in the Karaf wab example as well.
>>
>> I will.
>>
>> Regards
>> JB
>>
>> Le 10 mai 2020 à 13:45, Achim Nierbeck  a écrit
>> :
>>
>> Hi,
>>
>> there is a sample app for Pax-Web, which is also used in the test-suite:
>>
>> https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/war-authentication
>> And actually you just need to reference the jaas of the surrounding Karaf
>> instance in your web.xml file.
>>
>> regards, Achim
>>
>>
>>
>> Am Fr., 8. Mai 2020 um 18:41 Uhr schrieb Alex Soto > >:
>>
>>> Hello,
>>>
>>> Is there a good tutorial or documentation on how to protect a WAB (Web
>>> Application Bundle) with JAAS authentication?
>>> My Karaf version is 4.2.8.  Documentation here
>>> https://karaf.apache.org/manual/latest/webcontainer is scarce, only
>>> referring to Jetty global config, (even that failed for me).  I have
>>> mu

Re: Basic authentication of WAB using Jaas in Karaf

2020-05-11 Thread Achim Nierbeck
Sure ..
maybe I find some time during this week to create this there ;)

regards, Achim

p.s. this just reminds me, that those samples are also in the "Apache Karaf
Cookbook" :)

Am Mo., 11. Mai 2020 um 06:32 Uhr schrieb Jean-Baptiste Onofre <
j...@nanthrax.net>:

> Maybe worth to add this in the Karaf wab example as well.
>
> I will.
>
> Regards
> JB
>
> Le 10 mai 2020 à 13:45, Achim Nierbeck  a écrit :
>
> Hi,
>
> there is a sample app for Pax-Web, which is also used in the test-suite:
>
> https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/war-authentication
> And actually you just need to reference the jaas of the surrounding Karaf
> instance in your web.xml file.
>
> regards, Achim
>
>
>
> Am Fr., 8. Mai 2020 um 18:41 Uhr schrieb Alex Soto  >:
>
>> Hello,
>>
>> Is there a good tutorial or documentation on how to protect a WAB (Web
>> Application Bundle) with JAAS authentication?
>> My Karaf version is 4.2.8.  Documentation here
>> https://karaf.apache.org/manual/latest/webcontainer is scarce, only
>> referring to Jetty global config, (even that failed for me).  I have
>> multiple WABs and WARs in the same Karaf container, and I don’t want to
>> apply the same JAAS authentication to all of them.   From the comment:
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 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>
>
>
>

-- 

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>


Re: Basic authentication of WAB using Jaas in Karaf

2020-05-10 Thread Achim Nierbeck
Hi,

there is a sample app for Pax-Web, which is also used in the test-suite:
https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/war-authentication
And actually you just need to reference the jaas of the surrounding Karaf
instance in your web.xml file.

regards, Achim



Am Fr., 8. Mai 2020 um 18:41 Uhr schrieb Alex Soto :

> Hello,
>
> Is there a good tutorial or documentation on how to protect a WAB (Web
> Application Bundle) with JAAS authentication?
> My Karaf version is 4.2.8.  Documentation here
> https://karaf.apache.org/manual/latest/webcontainer is scarce, only
> referring to Jetty global config, (even that failed for me).  I have
> multiple WABs and WARs in the same Karaf container, and I don’t want to
> apply the same JAAS authentication to all of them.   From the comment:
>
> 
> 
> 
> 
> 
> 
> 

Re: [UPDATE] Karaf Virtual Meetup preparation

2020-05-08 Thread Achim Nierbeck
Hey,

an update regarding the recording.
We needed to make some "Post"-Production as the video was somehow stored in
Portrait instead of Landscape.
Therefore it did take a bit longer.
Please find it here:
https://www.youtube.com/watch?v=PYXT5y8gwAg

Best regards, Achim


Am Fr., 1. Mai 2020 um 06:54 Uhr schrieb Jean-Baptiste Onofre <
j...@nanthrax.net>:

> ;)
>
> I like your quote ;)
>
> Thanks,
> Cheers,
> JB
>
> > Le 30 avr. 2020 à 20:27, Maurice Betzel  a
> écrit :
> >
> > Great, now you asked I have to come up with an explanation 
> >
> > Like Karaf with OSGi being my unicorn in software.
> >
> > Wiki extract:
> >
> > The unicorn is a legendary creature that has been described since
> > antiquity...(of software science)
> > A symbol of purity and grace (practice long known theories, force modular
> > thinking and design), which could be captured only by a virgin. In the
> > encyclopedias, its horn was said to have the power to render poisoned
> water
> > potable and to heal sickness...(resolve a big ball of mud, I do not have
> a
> > analogy for the virgin yet:))
> > The unicorn continues to hold a place in popular culture. It is often
> used
> > as a symbol of fantasy or rarity...(it’s time to change that).
> >
> >
> >
> > --
> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>
>

-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: Handling legacy libraries in OSGi/Karaf - Karat Meet-up chat questions

2020-05-01 Thread Achim Nierbeck
Thanks for taking that "burden" on getting up in the middle of the night.
Great to have so many people from all over the world in the meetup.
One thing I know for sure, the next meetup will also contain a "virtual"
part.
I'm really eager on testing how it works out to combine being present and
being virtual.

regards, Achim


Am Fr., 1. Mai 2020 um 01:51 Uhr schrieb Paul Fraser :

> Hi,
>
> Thanks to all involved with the Zoom meetup.
>
> Getting up at 1am (AU time) for a 2am meeting to stare at a computer for 2
> hours was a stretch but well worth the effort.
>
> The 90% improvement in cost by Netflix when using Karaf was an outstanding
> fact presented.
>
> Paul Fraser
>
> On 1/05/2020 6:27 am, Francois Papon wrote:
>
> Yes!
>
> I'm joining Achim, community is very important for the project, don't 
> hesitate to share proposals and ideas :)
> Every questions and feedbacks are welcome, this how we can improve Apache 
> Karaf and make it great for the users!
>
> PS: kudo to JB and Achim for the organization, it was perfect!
>
> regards,
>
> Françoisfpa...@apache.org
>
> Le 30/04/2020 à 21:25, Achim Nierbeck a écrit :
>
> Hey People,
>
> don't be intimidated by other on this list :)
> If you have questions or ideas on answering others, don't hesitate to do
> so.
> TBH, when I was a Karaf noob I just hang out here with a bunch of ideas
> what needed be improved regarding the web-container.
> So someone told me to just do it. AFAIRC that's been JB and Guillaume :)
> I would love to see a vibrant community on this list again, so there is no
> question not worth to be asked and no answer to simple to be said.
>
> take care, Achim
>
> P.S. was lot's of fun today, thanks to all that participated
>
>
> Am Do., 30. Apr. 2020 um 21:13 Uhr schrieb Maurice Betzel <
> m.bet...@gaston-schul.com>:
>
>> I did have some stuff regarding this on github.
>>
>> Aries Spi-Fly and bundeling non Osgi stuff:
>> https://github.com/Maurice-Betzel/twelvemonkeys-osgi
>>
>> Even native code can be bundled:
>> https://github.com/Maurice-Betzel/lmdb-osgi
>>
>>
>>
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>
>
>
> --
>
> 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>
>
>
>

-- 

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>


Re: Handling legacy libraries in OSGi/Karaf - Karat Meet-up chat questions

2020-04-30 Thread Achim Nierbeck
Hey People,

don't be intimidated by other on this list :)
If you have questions or ideas on answering others, don't hesitate to do
so.
TBH, when I was a Karaf noob I just hang out here with a bunch of ideas
what needed be improved regarding the web-container.
So someone told me to just do it. AFAIRC that's been JB and Guillaume :)
I would love to see a vibrant community on this list again, so there is no
question not worth to be asked and no answer to simple to be said.

take care, Achim

P.S. was lot's of fun today, thanks to all that participated


Am Do., 30. Apr. 2020 um 21:13 Uhr schrieb Maurice Betzel <
m.bet...@gaston-schul.com>:

> I did have some stuff regarding this on github.
>
> Aries Spi-Fly and bundeling non Osgi stuff:
> https://github.com/Maurice-Betzel/twelvemonkeys-osgi
>
> Even native code can be bundled:
> https://github.com/Maurice-Betzel/lmdb-osgi
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: [ANN] Apache Karaf Meetup, schedule

2020-04-30 Thread Achim Nierbeck
Update:
I was able to configure the meetin in a way, that a password isn't needed
and still we're able to meet in a good manner :)

best regards, Achim

Am Mi., 29. Apr. 2020 um 18:07 Uhr schrieb Achim Nierbeck <
bcanh...@googlemail.com>:

> Hi,
>
> yes please register, otherwise you wont be able to join.
> It's going to be a zoom meeting where we will post the URL separately to
> the password.
> I'll try to push the record button early enough :)
>
> regards, Achim
>
>
> Am Mi., 29. Apr. 2020 um 16:06 Uhr schrieb Giamma :
>
>> Hi,
>>
>> not sure I will be able to join, I have a 50% chance, may I still
>> register?
>>
>>
>>
>> On Wed, Apr 29, 2020 at 3:15 PM Jean-Baptiste Onofre 
>> wrote:
>>
>>> Yes, I will try to record on zoom.
>>>
>>> Regards
>>> JB
>>>
>>> Le 29 avr. 2020 à 15:09, Serge Huber  a écrit :
>>>
>>> Will these sessions be recorded?
>>>
>>> cheers,
>>>   Serge...
>>>
>>> On Wed, Apr 29, 2020 at 3:03 PM Jean-Baptiste Onofre 
>>> wrote:
>>>
>>>> Ooops, yes, April ;)
>>>>
>>>> Thanks,
>>>> Regards
>>>> JB
>>>>
>>>> Le 29 avr. 2020 à 15:02,   a
>>>> écrit :
>>>>
>>>> Hello Jean-baptiste,
>>>> I guess you mean April and not May...
>>>> Carl
>>>>
>>>> Le 29 avril 2020 14:22:21 Jean-Baptiste Onofre  a
>>>> écrit :
>>>>
>>>>> Hi every Karaf enthusiasts,
>>>>>
>>>>> We are please to announce the schedule for the first Apache Karaf
>>>>> "Virtual" Meetup planned tomorrow, Thursday May 30th.
>>>>>
>>>>> Here’s the schedule:
>>>>>
>>>>> * 6pm - 6:15pm : connecting, welcoming
>>>>> * 6:15pm - 6:45pm : Apache Karaf on the cloud (JB Onofré)
>>>>> * 6:50pm - 7:20pm : Apache Karaf at Netflix, operation efficiency and
>>>>> cost benefits (Dmitry Vasilyev, Saied Mirzaei)
>>>>> * 7:25pm - 7:35pm : Apache Karaf roadmap, DevX, open discussion (JB
>>>>> Onofré, moderated by Achim Nierbeck)
>>>>> * 7:35pm - 7:40pm : Wrapping up, next events
>>>>>
>>>>>
>>>>> In term of connection details, you have to register on
>>>>> https://www.meetup.com/Paris-Apache-Karaf-Meetup-Group/events/269056325/
>>>>>
>>>>> We will communicate the Zoom URL there and you will receive a personal
>>>>> password to connect.
>>>>>
>>>>> I will start the Zoom session 30 minutes before the meetup start.
>>>>>
>>>>> See you all tomorrow,
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>> --
>> Gian Maria Romanato
>> 
>>
>
>
> --
>
> 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>
>
>

-- 

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>


Re: [ANN] Apache Karaf Meetup, schedule

2020-04-29 Thread Achim Nierbeck
Hi,

yes please register, otherwise you wont be able to join.
It's going to be a zoom meeting where we will post the URL separately to
the password.
I'll try to push the record button early enough :)

regards, Achim


Am Mi., 29. Apr. 2020 um 16:06 Uhr schrieb Giamma :

> Hi,
>
> not sure I will be able to join, I have a 50% chance, may I still register?
>
>
>
> On Wed, Apr 29, 2020 at 3:15 PM Jean-Baptiste Onofre 
> wrote:
>
>> Yes, I will try to record on zoom.
>>
>> Regards
>> JB
>>
>> Le 29 avr. 2020 à 15:09, Serge Huber  a écrit :
>>
>> Will these sessions be recorded?
>>
>> cheers,
>>   Serge...
>>
>> On Wed, Apr 29, 2020 at 3:03 PM Jean-Baptiste Onofre 
>> wrote:
>>
>>> Ooops, yes, April ;)
>>>
>>> Thanks,
>>> Regards
>>> JB
>>>
>>> Le 29 avr. 2020 à 15:02,   a
>>> écrit :
>>>
>>> Hello Jean-baptiste,
>>> I guess you mean April and not May...
>>> Carl
>>>
>>> Le 29 avril 2020 14:22:21 Jean-Baptiste Onofre  a
>>> écrit :
>>>
>>>> Hi every Karaf enthusiasts,
>>>>
>>>> We are please to announce the schedule for the first Apache Karaf
>>>> "Virtual" Meetup planned tomorrow, Thursday May 30th.
>>>>
>>>> Here’s the schedule:
>>>>
>>>> * 6pm - 6:15pm : connecting, welcoming
>>>> * 6:15pm - 6:45pm : Apache Karaf on the cloud (JB Onofré)
>>>> * 6:50pm - 7:20pm : Apache Karaf at Netflix, operation efficiency and
>>>> cost benefits (Dmitry Vasilyev, Saied Mirzaei)
>>>> * 7:25pm - 7:35pm : Apache Karaf roadmap, DevX, open discussion (JB
>>>> Onofré, moderated by Achim Nierbeck)
>>>> * 7:35pm - 7:40pm : Wrapping up, next events
>>>>
>>>>
>>>> In term of connection details, you have to register on
>>>> https://www.meetup.com/Paris-Apache-Karaf-Meetup-Group/events/269056325/
>>>>
>>>> We will communicate the Zoom URL there and you will receive a personal
>>>> password to connect.
>>>>
>>>> I will start the Zoom session 30 minutes before the meetup start.
>>>>
>>>> See you all tomorrow,
>>>>
>>>> Regards
>>>> JB
>>>>
>>>
>>>
>>>
>>
>
> --
> Gian Maria Romanato
> 
>


-- 

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>


Re: Apache Karaf community Meetup in April and CFP

2020-02-20 Thread Achim Nierbeck
Oh we have plenty of beer here.
Mostly the world famous Tannenzäpfle from the Schwarzwald ;)
But also non-alcoholic beverages
I'm really looking forward to it

best regards, Achim

Am Do., 20. Feb. 2020 um 21:03 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> Awesome ! Looking forward to have beers with you !
>
> Cheers
> JB
>
> Le jeu. 20 f?vr. 2020 ? 19:55, Mike Hummel  a ?crit :
>
>> Hi,
>>
>> 30.04. would be possible for me too. I'm not part of the core community
>> but working a lot with karaf and currently moving the productive systems to
>> kubernetes. I have a bunch of problems with it currently and could
>> contribute solutions for it.
>>
>> And I like beer and good tech talks ;)
>>
>> Regards, Mike
>>
>> > On 20. Feb 2020, at 19:44, Maurice Betzel 
>> wrote:
>> >
>> > JB, i left my smiley away so it was up to you if you would like to
>> punch me
>> > in the face or I could buy you a beer or two . Happy to add a smiley
>> here.
>> >
>> >
>> >
>> > --
>> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>
>>

-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: Apache Karaf community Meetup in April and CFP

2020-02-20 Thread Achim Nierbeck
Hi,

yeah sorry I might have communicated this wrong. It's open to everybody to
participate right away at 4 pm.
My intention is to have an even more public advertising for the later part,
to reach even more people via our regular meetup channels.
That's been the sole purpose of the "later" part. Though thinking about it
I might do the advertisement for the event via meetup.com via a "split"
event.
Might be easier to track who'll join early and who'll join later on. This
will also be needed to plan for the catering, as we (as company) can host
up to 30ish People in our meetup space.

If there is anything still unclear feel free to let us know.

regards, Achim

P.S. don't forget to give us a ping if you would like to give a talk :)

Am Do., 20. Feb. 2020 um 10:16 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> Ahhh got it 
>
> The schedule will be shared soon. We will start at 4pm up to late at night
> 
>
> Regards
> JB
>
> Le jeu. 20 f?vr. 2020 ? 10:08, Maurice Betzel 
> a ?crit :
>
>> Simply put, at what time should i be there?
>>
>>
>>
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>
>

-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: Karaf community Meetup?

2020-02-19 Thread Achim Nierbeck
NP ...
mgmt summary.
We moved to the 30th of April and will start at 4 p.m. CET ;)
If you want to provide a talk, feel free to contact us here or via DM.

regards, Achim


Am Mi., 19. Feb. 2020 um 14:49 Uhr schrieb cooshal :

> Hi:
>
> My bad. Thanks for the pointer.
>
> Regards,
> Kushal.
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Apache Karaf community Meetup in April and CFP

2020-02-19 Thread Achim Nierbeck
Hi all,

JB and I had a call yesterday trying to organize our first Apache Karaf
community event.
As it's already end of February, the date for March has been a bit to close
for comfort.
Therefore we decided to move the event to the 30th of April.
My employer the codecentric AG will host the event in our venue here in
Karlsruhe.
Therefore we will start in the early afternoon at 4 p.m.
JB and I thought about 4 slots of talk and some pauses in between.
I would like to call for participation in giving a talk.
Right now we have the following kind of schedule planned:

Start at 4 p.m have 2 talks, and some networking.
Around 6:30 p.m. we'd like to start with the "second" half of the community
event which we like to open even further to more people outside this
community.
We will advertise the second half with another two talks more broadly in
the local communities.

One note regarding technical setup, we're evaluating if it's possible to
have the talks available live via a zoom call. This isn't "fixed" yet, and
if we're able to create such a setup, people who would like to join
remotely will only be allowed by invitation.

Hope to get a bunch of feedback by the community :)

thanks, Achim
-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: Http Whiteboard - Pax-Web multiple instances

2020-02-04 Thread Achim Nierbeck
Hi Markus,

if you find bugs, please fix them ;)
Regarding the different samples. That's been the second blog, I wrote two
at the time.
The given sample is for the WhiteBoard approach, but you can also have the
Web-Container approach.
See the first Blog for details, that's where I outsourced my thoughts of
the time ;)

regards, Achim


Am Di., 4. Feb. 2020 um 12:17 Uhr schrieb Markus Rathgeb <
maggu2...@gmail.com>:

> Hi all,
>
> the both examples and its mechanism differs (thanks for providing it).
>
> The one JB refers to is using a bundle header. This example has (the
> time I tested it) not worked for me. My research (at the time I
> comment this the first time) has been that this works for the usage of
> the "Web Application Specification" only. I did not check it again,
> but I was not aware that something has been changed.
>
> The one Achim refers to uses a HttpContextMapping service additional
> to the Servlet service and sets the necessary properties.
> Achim, thanks a lot for your example. This one is working for me!
>
> >
> https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/whiteboard-extended/src/main/java/org/ops4j/pax/web/extender/samples/whiteboard/internal/Activator.java
>
> As it is only an example, it does not matter, but there is a bug in
> this example.
> All the http context mapping service registrations are assigned to
> "httpContextMappingReg" and all servlet registrations to "servletReg".
> The respective ...2 and ...3 variables are not used.
> So, there is only one of each service unregistered and freed.
>
> Best regards,
> Markus
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: Http Whiteboard - Pax-Web multiple instances

2020-02-03 Thread Achim Nierbeck
Hi,

This is the source:
https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/whiteboard-extended/src/main/java/org/ops4j/pax/web/extender/samples/whiteboard/internal/Activator.java
and here is the very very old blog about it, I wrote after implementing it
:-)
https://nierbeck.de/2013/05/bind-certain-web-applications-to-specific-httpconnectors-ii/

hope it helps :)


regards, Achim


Am Mo., 3. Feb. 2020 um 21:49 Uhr schrieb Markus Rathgeb <
maggu2...@gmail.com>:

> Hm, I checkout the master branch of Pax Web and grepped the samples
>
> grep -ri Web-VirtualHosts samples
>
> No hits. Can you point me to the sample that is using Web-VirtualHosts?
>
> Achim: FYI it seems the link in your signature
> "http://wiki.ops4j.org/display/paxweb/Pax+Web/; does not exist
> anymore.
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: Http Whiteboard - Pax-Web multiple instances

2020-02-03 Thread Achim Nierbeck
Hi,

the functionality should be working, as the samples provided by the pax-web
project are also used for the integration tests, which do work ...  at
least the last time I tested :D
for details about how it works, please take a look at the pax-web project
:)

regards, Achim


Am Fr., 31. Jan. 2020 um 19:30 Uhr schrieb Alex Soto :

> This seems to work for me, but I have my doubts.   Following the example
> here:
> https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/whiteboard-extended
> I made the following changes.
>
> In my blueprint:
>
>  "org.ops4j.pax.web.service.whiteboard.HttpContextMapping">
> 
> 
>   externalAPIContext
>   
> 
>
>
>  "org.ops4j.pax.web.extender.whiteboard.runtime.DefaultHttpContextMapping">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>
>  "org.apache.camel.component.servlet.CamelHttpTransportServlet"/>
>
>
>  />
>  "org.apache.camel.component.servlet.osgi.OsgiServletRegisterer"
> init-method="register"
> destroy-method="unregister">
>
>
> 
> 
> 
> 
> 
> 
>
>
> In my jetty.xml:
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> externalAPIConnector
> 
> 
> 
>
>
> In my Camel Context:
>
>  component="servlet"
> bindingMode="xml"
> contextPath="{{context.path}}{{api.root.path}}"
> port="{{port}}"
> enableCORS="false"
> clientRequestValidation="true">
>
> 
> 
> 
>
>
> But,  I am wondering if this correct, because in the example the Servlet
> is registered with service property *httpContext.id
> *, which I am not setting anywhere. The Jetty
> Connector name is configured in the
> *org.ops4j.pax.web.service.whiteboard.HttpContextMapping*,  but I don’t
> see how it is matched to my Camel Servlet. Notice that the
> *org.apache.camel.component.servlet.osgi.OsgiServletRegisterer *bean is
> the one registering the servlet with the OSGi HTTP Service, but there is no
> way to specify the *httpContext.id  *property*.  *Is
> this property required to match the HttpContextMapping to the Servlet?
>
> Any insight is appreciated.
>
> Best regards,
> Alex soto
>
>
>
>
> On Jan 31, 2020, at 9:29 AM, Alex Soto  wrote:
>
> Thanks JB and Markus,
>
> This is very close to what I am looking for (I still need to read more the
> examples) but in my particular case, I am using Camel Rest DSL (with
> servlet component) connecting it to the OSGi managed 
> *org.osgi.service.http.HttpService.
>  *In other words, I am not using the Camel Jetty component for my rest
> services.  This is how I am setting up Camel to use the OSGi HTTP Service:
>
>  />
>  "org.apache.camel.component.servlet.CamelHttpTransportServlet"/>
>  org.apache.camel.component.servlet.osgi.OsgiServletRegisterer" init-method
> ="register" destroy-method="unregister”>
> 
> 
> 
> 
> 
> 
>
>  "{{context.path}}{{api.root.path}}"
> port="{{port}}"
> enableCORS="false"
> clientRequestValidation="true">
> 
> https://lists.apache.org/thread.html/69182ee8feef88896f840efde48146053997119e820ef037853c1c9b@%3Cuser.karaf.apache.org%3E
> You also referenced to http://blog.nanthrax.net/?p=352
> My observations has been that it should work for "Web Bundles" and I
> did not found (that time) a way to get it working for servlets.
>
>
> May I ask you if you already checked that this is really still working
> for servlets?
>
>
>
>

-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: Karaf community Meetup in Karlsruhe (Germany) - "call for Talks"

2020-01-14 Thread Achim Nierbeck
If we have more Ideas for talks I might expand it to the morning :D
The venue will be in Karlsruhe (or maybe Bruchsal, close enough to
Karlsruhe)
Depending on the amount of People.
Our Office is big enough for 30 People.
If we get more than that, I'll try to get something close to the ZKM in
Karlsruhe.

regards, Achim


Am Di., 14. Jan. 2020 um 09:47 Uhr schrieb Toni Menzel <
toni.men...@rebaze.com>:

> Question: it won't start before 13:00, right? So its good enough to arrive
> same day? What is the venue?
>
>
>
> *Toni Menzel | rebaze.com <https://www.rebaze.com> | growing developer
> culture*
>
>
> On Tue, Jan 14, 2020 at 9:45 AM Toni Menzel 
> wrote:
>
>> I don't have a good (karaf related) talk to propose yet, but i totally
>> back JBs topics (cloud + microservices).
>> The open panel discussion can be a center-part of the whole event imho.
>> Toni
>>
>>
>>
>> *Toni Menzel | rebaze.com <https://www.rebaze.com> | growing developer
>> culture*
>>
>>
>> On Tue, Jan 14, 2020 at 9:35 AM Achim Nierbeck 
>> wrote:
>>
>>> Hi JB,
>>>
>>> great :)
>>> I'm open for more input :)
>>>
>>> I like the idea of a discussion panel
>>>
>>> regards, Achim
>>>
>>> Am Di., 14. Jan. 2020 um 09:33 Uhr schrieb Jean-Baptiste Onofré <
>>> j...@nanthrax.net>:
>>>
>>>> Hi Achim,
>>>>
>>>> I would like to submit two talks:
>>>>
>>>> - Karaf on the cloud
>>>> - Karaf as microservices runtime
>>>>
>>>> I would like also to propose a "discussion panel". I won't be a talk,
>>>> more 30mn open discussion about: Karaf, OSGi, pros and cons, what should
>>>> we do better ?
>>>>
>>>> Thoughts ?
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 14/01/2020 09:12, Achim Nierbeck wrote:
>>>> > Hi,
>>>> >
>>>> > looks like we have a date for a community meetup in Karlsruhe Germany.
>>>> > It's going to be the 19th of March.
>>>> > Now I would like to call for talks, so we can decide how "big" we're
>>>> > going to have it ;)
>>>> >
>>>> > So please be welcome to start proposing your talks ...
>>>> >
>>>> > best regards, Achim
>>>> >
>>>> > --
>>>> >
>>>> > 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>
>>>> >
>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbono...@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.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/>
>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>>
>>>

-- 

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>


Re: Karaf community Meetup in Karlsruhe (Germany) - "call for Talks"

2020-01-14 Thread Achim Nierbeck
Here a quick sheet, for an idea on how we might organize the talks :)

https://docs.google.com/spreadsheets/d/1XYhPA-xeIleiY_6Ei3Krz_hYkfJAU4DWoVQBVI6pTus/edit?usp=sharing

Ideas welcome!

regards, Achim

Am Di., 14. Jan. 2020 um 09:34 Uhr schrieb Achim Nierbeck <
bcanh...@googlemail.com>:

> Hi JB,
>
> great :)
> I'm open for more input :)
>
> I like the idea of a discussion panel
>
> regards, Achim
>
> Am Di., 14. Jan. 2020 um 09:33 Uhr schrieb Jean-Baptiste Onofré <
> j...@nanthrax.net>:
>
>> Hi Achim,
>>
>> I would like to submit two talks:
>>
>> - Karaf on the cloud
>> - Karaf as microservices runtime
>>
>> I would like also to propose a "discussion panel". I won't be a talk,
>> more 30mn open discussion about: Karaf, OSGi, pros and cons, what should
>> we do better ?
>>
>> Thoughts ?
>>
>> Regards
>> JB
>>
>> On 14/01/2020 09:12, Achim Nierbeck wrote:
>> > Hi,
>> >
>> > looks like we have a date for a community meetup in Karlsruhe Germany.
>> > It's going to be the 19th of March.
>> > Now I would like to call for talks, so we can decide how "big" we're
>> > going to have it ;)
>> >
>> > So please be welcome to start proposing your talks ...
>> >
>> > best regards, Achim
>> >
>> > --
>> >
>> > 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>
>> >
>>
>> --
>> Jean-Baptiste Onofré
>> jbono...@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.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/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
>

-- 

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>


Re: Karaf community Meetup in Karlsruhe (Germany) - "call for Talks"

2020-01-14 Thread Achim Nierbeck
Hi JB,

great :)
I'm open for more input :)

I like the idea of a discussion panel

regards, Achim

Am Di., 14. Jan. 2020 um 09:33 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> Hi Achim,
>
> I would like to submit two talks:
>
> - Karaf on the cloud
> - Karaf as microservices runtime
>
> I would like also to propose a "discussion panel". I won't be a talk,
> more 30mn open discussion about: Karaf, OSGi, pros and cons, what should
> we do better ?
>
> Thoughts ?
>
> Regards
> JB
>
> On 14/01/2020 09:12, Achim Nierbeck wrote:
> > Hi,
> >
> > looks like we have a date for a community meetup in Karlsruhe Germany.
> > It's going to be the 19th of March.
> > Now I would like to call for talks, so we can decide how "big" we're
> > going to have it ;)
> >
> > So please be welcome to start proposing your talks ...
> >
> > best regards, Achim
> >
> > --
> >
> > 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>
> >
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.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/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>


Karaf community Meetup in Karlsruhe (Germany) - "call for Talks"

2020-01-14 Thread Achim Nierbeck
Hi,

looks like we have a date for a community meetup in Karlsruhe Germany.
It's going to be the 19th of March.
Now I would like to call for talks, so we can decide how "big" we're going
to have it ;)

So please be welcome to start proposing your talks ...

best regards, Achim

-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: Karaf community Meetup?

2020-01-14 Thread Achim Nierbeck
Hi,

looks like we have two favorite days.
https://doodle.com/poll/cnszma2qrdcx524g
March 12th or 19th.

Right now I'm in favor of the 19th ... gives me a bit more time organizing.
I'll follow up with another mail regarding, who might want to give a talk,
depending on the amount of talks we'll see how long ;)

best regards, Achim

Am Fr., 10. Jan. 2020 um 15:58 Uhr schrieb Francois Papon <
francois.pa...@openobject.fr>:

> Thanks very much Achim!
>
> regards,
>
> François
> fpa...@apache.org
>
> Le 10/01/2020 à 13:54, Jean-Baptiste Onofré a écrit :
> > Hi Achim,
> >
> > thanks for leading this up !
> >
> > As said, I will be there wherever it will be, whenever it will be ;)
> >
> > Regards
> > JB
> >
> > On 10/01/2020 10:06, Achim Nierbeck wrote:
> >> Hi,
> >>
> >> on Slack we had a conversation last year, about the general interest of
> >> having a get-together regarding this karaf community. As quite some
> >> people are kind of close (or at least close enough) to travel with a
> >> train to Karlsruhe, I made the offering of hosting such an event in our
> >> company venue.
> >> To get a bit more traction on this topic I would like to invite
> >> everybody who's interested in the following doodle so I have a better
> >> understanding about the size of the event. And which would be the best
> >> day for most of the people :)
> >>
> >> Regarding if it's a full day event or an half day and so fourth we can
> >> discuss after we found out which date and how many people would be
> >> willing to participate as "Speaker"
> >>
> >> https://doodle.com/poll/cnszma2qrdcx524g
> >>
> >> oh and a happy new year to everybody ;)
> >>
> >> regards, Achim
> >>
> >> --
> >>
> >> 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>
> >>
>


-- 

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>


Karaf community Meetup?

2020-01-10 Thread Achim Nierbeck
Hi,

on Slack we had a conversation last year, about the general interest of
having a get-together regarding this karaf community. As quite some people
are kind of close (or at least close enough) to travel with a train to
Karlsruhe, I made the offering of hosting such an event in our company
venue.
To get a bit more traction on this topic I would like to invite everybody
who's interested in the following doodle so I have a better understanding
about the size of the event. And which would be the best day for most of
the people :)

Regarding if it's a full day event or an half day and so fourth we can
discuss after we found out which date and how many people would be willing
to participate as "Speaker"

https://doodle.com/poll/cnszma2qrdcx524g

oh and a happy new year to everybody ;)

regards, Achim

-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: Custom Karaf + Pax-Exam + Java11

2019-12-22 Thread Achim Nierbeck
Thanks for the hints from Serge and Oliver.
I had an email prepared and wanted to wait till everything runs smoother :)
The KarafTestSupport needs some rework if you want to use it as basis for
custom Karaf containers.
So actually I just made sure I have all the required VM Options needed.

Thanks for the hints :)

regards, Achim


Am So., 22. Dez. 2019 um 12:40 Uhr schrieb Serge Huber :

> Yes indeed this is exactly the problem I’m seeing. I guess we really need
> to use the KarafTestSupport finally :)
>
> Cheers,
>   Serge
>
> T +41 22 361 3424 <+41%2022%20361%203424>
> 9 route des Jeunes | 1227 Acacias | Switzerland
> jahia.com <http://www.jahia.com/>
> SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
> <https://twitter.com/sergehuber> | VCARD
> <http://www.jahia.com/vcard/HuberSerge.vcf>
>
>
> > JOIN OUR COMMUNITY <http://www.jahia.com/> to evaluate, get trained and
> to discover why Jahia is a leading User Experience Platform (UXP) for
> Digital Transformation.
>
> Le 22 déc. 2019 à 12:34, Oliver Lietz  a écrit :
>
> On Sunday, December 22, 2019 5:34:02 AM CET Jean-Baptiste Onofré wrote:
>
> Hi Achim,
>
>
> Hi,
>
> Serge reported the same on Unomi.
>
>
> I gonna check as, on Jenkins, Karaf itests (based on Pax Exam 4.13.1)
>
> are working fine.
>
>
> The think I did for JDK9+ is:
>
>
>
> https://github.com/apache/karaf/blob/master/itests/common/src/main/java/org/
>
> apache/karaf/itests/KarafTestSupport.java#L184
>
>
> So, if your tests extend KarafTestSupport, it should be straight forward.
>
> If you don't extend KarafTestsSupport, you have to mimic the configuration.
>
>
> We have done it similar for Sling:
>
>
> https://github.com/apache/sling-org-apache-sling-karaf-integration-tests/blob/
>
> master/src/main/java/org/apache/sling/karaf/testing/KarafTestSupport.java#L151
>
> And it reminds me to open a PR because the duplication of options in
> Karaf's
> KarafTestSupport is really ugly.
>
> Regards,
> O.
>
> Regards
>
> JB
>
>
> On 21/12/2019 17:39, Achim Nierbeck wrote:
>
> Hi,
>
>
> it's one of those days where it's better to just stop for now.
>
> Though I've spent quite some time on figuring out, without real success
>
> though.
>
> Maybe one on the list does have a bright moment to point me into the
>
> right direction :)
>
> I was working on upgrading the latest dependencies for my karaf+vertx
>
> project. [1]
>
> And while on it I was trying to build with Java 11. Now what really
>
> puzzled me, the Pax-Exam tests all failed because the test container
>
> never really started. When trying to start the container alone,
>
> everything runs smoothly. Therefore it's something I'm missing with the
>
> pax-exam setup.
>
> I'd be grateful for any input on where I'm wrong :)
>
>
> Thanks, Achim
>
>
>
> [1] - https://github.com/ANierbeck/Karaf-Vertx/tree/jdk11
>
>
>
>
>
>

-- 

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>


Re: Custom Karaf + Pax-Exam + Java11

2019-12-22 Thread Achim Nierbeck
Hi,

ok, that didn't work out, cause a customized Karaf can't be tested with the
KarafTestSupport class.
Nevertheless it does work now, cause I was missing a couple of those
VMOptions needed. Therefore I needed to add that.

If I now look at the usability for the KarafTestSupport class, in case we
want to make it more usable for anybody having his own custom Karaf,
it needs to be made more modular regarding the configuration.

Thanks, Achim

P.S. a working example can be found here now:
https://github.com/ANierbeck/Karaf-Vertx/blob/master/Vertx-Exampl-ITest/src/test/java/de/nierbeck/example/vertx/test/CustomVertxKarafTest.java#L91

Am So., 22. Dez. 2019 um 05:34 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> Hi Achim,
>
> Serge reported the same on Unomi.
>
> I gonna check as, on Jenkins, Karaf itests (based on Pax Exam 4.13.1)
> are working fine.
>
> The think I did for JDK9+ is:
>
>
> https://github.com/apache/karaf/blob/master/itests/common/src/main/java/org/apache/karaf/itests/KarafTestSupport.java#L184
>
> So, if your tests extend KarafTestSupport, it should be straight forward.
> If you don't extend KarafTestsSupport, you have to mimic the configuration.
>
> Regards
> JB
>
> On 21/12/2019 17:39, Achim Nierbeck wrote:
> > Hi,
> >
> > it's one of those days where it's better to just stop for now.
> > Though I've spent quite some time on figuring out, without real success
> > though.
> > Maybe one on the list does have a bright moment to point me into the
> > right direction :)
> > I was working on upgrading the latest dependencies for my karaf+vertx
> > project. [1]
> > And while on it I was trying to build with Java 11. Now what really
> > puzzled me, the Pax-Exam tests all failed because the test container
> > never really started. When trying to start the container alone,
> > everything runs smoothly. Therefore it's something I'm missing with the
> > pax-exam setup.
> > I'd be grateful for any input on where I'm wrong :)
> >
> > Thanks, Achim
> >
> >
> > [1] - https://github.com/ANierbeck/Karaf-Vertx/tree/jdk11
> >
> > --
> >
> > 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>
> >
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.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/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>


Custom Karaf + Pax-Exam + Java11

2019-12-21 Thread Achim Nierbeck
Hi,

it's one of those days where it's better to just stop for now.
Though I've spent quite some time on figuring out, without real success
though.
Maybe one on the list does have a bright moment to point me into the right
direction :)
I was working on upgrading the latest dependencies for my karaf+vertx
project. [1]
And while on it I was trying to build with Java 11. Now what really puzzled
me, the Pax-Exam tests all failed because the test container never really
started. When trying to start the container alone, everything runs
smoothly. Therefore it's something I'm missing with the pax-exam setup.
I'd be grateful for any input on where I'm wrong :)

Thanks, Achim


[1] - https://github.com/ANierbeck/Karaf-Vertx/tree/jdk11

-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 


Re: Karaf, Pax Web, Jetty: "some" client authentication

2019-05-21 Thread Achim Nierbeck
Right now this only works for webbundles as their web-context is bound to a
connector.
Haven't tried it, but it could be bend to work with whiteboard servlets.

regards, Achim

Am Do., 16. Mai 2019 um 21:23 Uhr schrieb Markus Rathgeb <
maggu2...@gmail.com>:

> I assume I need to use a "Web Application" and cannot rely on servlets etc.
> https://osgi.org/specification/osgi.cmpn/7.0.0/service.war.html
>
> Any change to get this mixed with Declarative Service?
>
> Am Do., 16. Mai 2019 um 20:32 Uhr schrieb Markus Rathgeb <
> maggu2...@gmail.com>:
> >
> > If this already known (WRT to the following comment)?
> >
> https://nierbeck.de/2013/01/bind-certain-web-applications-to-specific-httpconnectors/#comment-62
> >
> > Am Do., 16. Mai 2019 um 20:26 Uhr schrieb Markus Rathgeb <
> maggu2...@gmail.com>:
> > >
> > > Hi Łukasz, hi JB,
> > >
> > > thank you for that information.
> > >
> > > I did not found an official documentation for that feature.
> > >
> > > I found this one (WRT the information given to me from you):
> > > * https://ops4j1.jira.com/browse/PAXWEB-396
> > > *
> https://nierbeck.de/2013/01/bind-certain-web-applications-to-specific-httpconnectors/
> > > * http://blog.nanthrax.net/?p=352
> > > * Source code of Pax Web
> > >
> > > I gave it a try using two additional connectors in jetty.xml.
> > > I used the example that has been present in the current jetty.xml as
> > > "SelectChannelConnector" did not work ("Caused by:
> > > java.lang.ClassNotFoundException:
> > > org.eclipse.jetty.server.nio.SelectChannelConnector not found by
> > > org.eclipse.jetty.server [62]").
> > > ===
> > > 
> > > 
> > > 
> > > 
> > > 
> > >  type="org.eclipse.jetty.server.ConnectionFactory">
> > > 
> > >  > > class="org.eclipse.jetty.server.HttpConnectionFactory">
> > >  > > refid="httpConfig" />
> > > 
> > > 
> > > 
> > > 
> > >  > > default="localhost" />
> > >  > > default="8201" />
> > >  > > default="3" />
> > > conn1
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >  type="org.eclipse.jetty.server.ConnectionFactory">
> > > 
> > >  > > class="org.eclipse.jetty.server.HttpConnectionFactory">
> > >  > > refid="httpConfig" />
> > > 
> > > 
> > > 
> > > 
> > >  > > default="localhost" />
> > >  > > default="8202" />
> > >  > > default="3" />
> > > conn2
> > > 
> > > 
> > > 
> > > ===
> > >
> > > So, additional to 8181 there should be two connetors. conn1 on 8201
> > > and conn2 on 8202.
> > >
> > > I created two bundles. Each bundle registers one servlet and use one
> > > Web-Connector settings:
> > >
> > > Bundle 1 - Component:
> > > ===
> > > @Component(immediate = true)
> > > @Header(name = "Web-Connectors", value = "conn1")
> > > @Header(name = "Web-VirtualHosts", value = "localhost")
> > > public class ComponentImpl {
> > >
> > > private static final String ALIAS = "/1";
> > >
> > > private final HttpService httpService;
> > >
> > > @Activate
> > > public ComponentImpl(final @Reference HttpService httpService)
> > > throws ServletException, NamespaceException {
> > > this.httpService = httpService;
> > > httpService.registerServlet(ALIAS, new HttpServlet() {
> > >
> > > @Override
> > > protected void doGet(final HttpServletRequest req, final
> > > HttpServletResponse resp)
> > > throws ServletException, IOException {
> > > final PrintWriter writer = resp.getWriter();
> > > writer.println("This is the servlet: " + ALIAS);
> > > }
> > >
> > > }, null, null);
> > > }
> > >
> > > @Deactivate
> > > public void close() {
> > > httpService.unregister(ALIAS);
> > > }
> > >
> > > }
> > > ===
> > >
> > > The "Bundle 2 - Component" is identicial to the "1" but uses the alias
> > > "/2" and the "Web-Connectors" "conn2".
> > >
> > > But this does not seem to work as expected.
> > > "/1" and "/2" can be open on port 8181, 8201 and 8202.
> > >
> > > So, all of them are available on all connectors.
> > >
> > > Can you point me to my misconfiguration?
> > > Or can you provide me two working demo bundles each of them using
> > > another connector?
> > >
> > > Best regards,
> > > Markus
> > >
> > > Am Do., 16. Mai 2019 um 16:18 Uhr schrieb Jean-Baptiste Onofré
> > > :
> > > >
> > > > Hi,
> > > >
> > > > I'm not 

Re: Enabling HTTPS

2018-10-25 Thread Achim Nierbeck
Hi,

I'm sure you'll find some of your questions answered here:
http://ops4j.github.io/pax/web/SNAPSHOT/User-Guide.html#ssl-configuration

regards, Achim

Am Do., 25. Okt. 2018 um 17:59 Uhr schrieb Leschke, Scott <
slesc...@medline.com>:

> I’m attempting to get https working by following the instructions at:
> https://karaf.apache.org/manual/latest/webcontainer
>
> I’m confused by the setting for *org.ops4j.pax.web.ssl.password*
>
> What is that intended to be. How is it defined?
>
>
>
> Also, what’s the difference between these:
>
> *org.osgi.service.http.secure.enabled=true*
>
> and
>
> *org.osgi.service.https.enabled=true* ?
>
>
>
> Anyway, I’m getting the following:
>
> Caused by: java.security.UnrecoverableKeyException: failed to decrypt safe
> contents entry: javax.crypto.BadPaddingException: Given final block not
> properly padded. Such issues can arise if a bad key is used during
> decryption.
>
>
>
> My org.ops4j.pax.web.cfg (slightly obfuscated) is shown below.
>
>
>
> Scott
>
>
>
>
>
> org.osgi.service.http.enabled=false
>
> org.osgi.service.http.port=8181
>
>
>
> org.osgi.service.http.port.secure=8443
>
> org.osgi.service.http.secure.enabled=true
>
> org.osgi.service.https.enabled=true
>
>
>
> org.ops4j.pax.web.config.file=${karaf.etc}/jetty.xml
>
> org.apache.karaf.features.configKey=org.ops4j.pax.web
>
>
>
> org.ops4j.pax.web.ssl.keystore=c:/KeyStorePath
>
> org.ops4j.pax.web.ssl.password=??  Not sure what this is exactly
>
> org.ops4j.pax.web.ssl.keypassword=MyKeystorePWD
>
>
>
> javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Running Camel in a Karaf OSGi container

2018-10-18 Thread Achim Nierbeck
Hi,

afaik you can also use declarative Services as starting point for your
Camel routes/rotue-builders

http://camel.apache.org/camel-and-scr.html

Therefore I'd think blueprint isn't mandatory.
Also it's not mandatory to start with a blueprint dsl, use java instead
just let your route builder be created by blueprint.

As usual, there are many roads to Rome.

Regards, Achim

Am Do., 18. Okt. 2018 um 10:17 Uhr schrieb Tim Ward :

> This is an argument that I hear a lot. I’m not a Camel expert, but it
> really sounds as though the DSL needs some work. The whole point of a DSL
> is that by being domain specific it is supposed to be natural and easy.
> Instead it sounds as though it is forcing people into using Blueprint
> despite that being a “less preferred” option for some people.
>
> Given the level of Camel integration in Karaf/Blueprint there must be
> someone in the community with the relevant skills to overhaul the DSL and
> make it fit for purpose?
>
> Best Regards,
>
> Tim
>
> On 17 Oct 2018, at 23:46, John F. Berry  wrote:
>
> Thank you.. I was thinking of abandoning the Java DSL and ultimately going
> this way, given my lack of success of "dumping it" into an OSGi container
> of some sort.  The rest of my shop, though, are not blueprint DSL, Camel or
> Apache product savvy, so the learning curve for my coworkers will be more
> disconnected than tapping into their java knowledge.
> I was attempting, originally, to introduce Camel as a solution via Java
> DSL to encourage its adoption.
>
> On Wednesday, October 17, 2018, 3:50:58 PM EDT, Jean-Baptiste Onofré <
> j...@nanthrax.net> wrote:
>
>
> You can also directly use the Camel Blueprint DSL directly, just putting
> your route in OSGI-INF/blueprint/route.xml:
>
> 
> http://camel.apache.org/schema/blueprint;>
> 
> 
> ...
> 
> 
> 
> 
>
> Regards
> JB
>
> On 17/10/2018 21:46, Ranx wrote:
> >
> > You'll want to use the bundle plugin and create a blueprint.xml to
> bootstrap
> > your Camel Java DSL. I use the Camel Java DSL all the time in Blueprint
> for
> > a variety of reasons (testing is easier as the RouteBuilders exist
> without
> > the camel context). I’m not sure why your Camel blueprint archetype is
> > blowing up but I’d start with that first but then you’ll have to modify
> the
> > blueprint file to add your
> >
> > Here's a snippet:
> >
> >
> > 
> > 
> >
> >
> >   > id="document-logic-service"xmlns="
> http://camel.apache.org/schema/blueprint;>
> >  
> >  
> >  
> >
> > The RouteBuilders can be independently unit tested then with
> > CamelTestSupport outside the Blueprint container.
> >
> > This also allows an injection and setup to take place for your route
> > builders when they are instantiated and then when the Camel context is
> given
> > their reference. Without that step Camel and Felix/Karaf are unaware of
> > their existence.
> >
> > If you can’t get the archetype to run and create a Camel Blueprint
> project
> > for you, I’d Google around for a sample project that has the POM correct.
> >
> > Generally I'll have a features file and configuration file associated
> with
> > the project as well so that the features repository can be added and
> > installed. There may be a better way to do this with profiles in Karaf 4
> but
> > I'm a bit behind the times in that regard.
> >
> > Ranx
> >
> >
> >
> >
> > --
> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> >
>
>
>

-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Karaf pax exam test works locally but fails on travis-ci

2018-08-27 Thread Achim Nierbeck
Try to use a different tool, I've experienced that travis-ci also does have
a limitation on the time of a project build.
Therefore it might very well be, that your project just takes to long.

regards, Achim

Am So., 26. Aug. 2018 um 22:45 Uhr schrieb Steinar Bang :

> I've merged in a large change to master of my project[1], transforming a
> vaadin webapp into a react webapp.
>
> In the last commit on master before the merge, the pax exam test[2] runs
> as expected.
>
> After the merge the test[3] fails to start on travis-ci.
>
> The test after the merge runs fine when I run it locally, but as said,
> it fails to start on travis-ci.
>
> Does anyone have any idea how to debug this?  The travis-ci log doesn't
> say much other than that it times out waiting for the karaf node to
> start in the pax exam test, and I don't know how to get hold of the
> karaf.log after the build.
>
> Thanks!
>
>  - Steinar
>
>
> References;
> [1] 
> [2] <
> https://github.com/steinarb/ukelonn/blob/a3e9b928a781c78252c65a69c6298b433ae065aa/ukelonn.tests/src/test/java/no/priv/bang/ukelonn/tests/UkelonnServiceIntegrationTest.java#L54
> >
> [3] <
> https://github.com/steinarb/ukelonn/blob/5755236cc036bc256348dc6d7b38ff2c95748a97/ukelonn.tests/src/test/java/no/priv/bang/ukelonn/tests/UkelonnServiceIntegrationTest.java#L45
> >
>
>

-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Do karaf support yaml file as configuration

2018-08-08 Thread Achim Nierbeck
AFAIK this works.
As you give a maven coordinate with is "serialized" to the given filename.

regards, Achim

Am Mi., 8. Aug. 2018 um 11:51 Uhr schrieb imranrazakhan <
imranrazak...@gmail.com>:

> Suppose we have feature file like,
>
>
> 
> http://karaf.apache.org/xmlns/features/v1.0.0;>\
> 
> 
> finalname="/etc/test_properties.cfg">mvn:test/config-test/1.0.0-SNAPSHOT/cfg
> mvn:test/config-test/1.0.0-SNAPSHOT
> 
> 
>
> Do Karaf support configuration like below and parse yaml accordingly
>
>
>
> 
> finalname="/etc/test_properties.yaml">mvn:test/config-test/1.0.0-SNAPSHOT/cfg
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: How to analyze karaf bundle level memory and cpu usage

2018-06-23 Thread Achim Nierbeck
If you can't get the numbers via JMX, I'm pretty sure there will be no
further possible way.
Afaik it's really hard to determine the amount of memory spent on a certain
bundle.

regards, Achim

2018-06-22 13:49 GMT+02:00 Jean-Baptiste Onofré :

> I don't use hawtio.
>
> I'm using directly Karaf ;)
>
> Regards
> JB
>
> On 22/06/2018 13:18, imranrazakhan wrote:
> > Do hawtio have any options? I installed but couldn't get any
> >
> >
> >
> > --
> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> >
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: gogo console commands

2018-05-11 Thread Achim Nierbeck
I thought 4.2 is OSGi Core 6, but besides that you're right, it's certainly
not yet OSGi 7 compatible.
Also the GoGo shell isn't upgraded yet.

regards, Achim

2018-05-11 11:02 GMT+02:00 João Assunção :

> Hi Scott,
>
> Isn't the Converter service a recent introduction to the OSGi framework? I
> have the idea the Converter was introduced in OSGi core 7 (release a few
> weeks ago) and Karaf 4.2.0 is still using OSGi Core 5.
> Maybe someone else can confirm this.
>
> Regards,
> João Assunção
>
> Email: joao.assun...@exploitsys.com
> Mobile: +351 916968984
> Phone: +351 211933149
> Web: www.exploitsys.com
>
>
>
> On Fri, May 11, 2018 at 6:23 AM, Scott Lewis  wrote:
>
>> I've created some custom gogo console commands, and they work fine on
>> the gogo console in felix.
>>
>> When I run them on Karaf 4.2.0, however, the command handlers themselves
>> are executed , but I also use a
>> org.apache.felix.service.command.Converter so that I can return complex
>> types (and Lists of complex types) and have the gogo runtime call into
>> my Converter.format impl for formatting the instances of the complex
>> return types.
>>
>> Using a debugger, I can see  my Converter service format method called
>> by the felix gogo console, but the Converter.format method is never
>> called in Karaf console, and no output is produced (either than my table
>> header line written out as String with no conversion).
>>
>> Has anyone added gogo commands to Karaf that use the Converter services
>> to convert complex types to output strings?   Is there something else
>> that needs to be configured in Karaf runtime to allow this?
>>
>> Thanksinadvance,
>>
>> Scott
>>
>>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: pax-support-jsf in Karaf

2018-02-26 Thread Achim Nierbeck
As I already tried to tell you, with Jetty you don't need to install the
pax-jsf-support feature, as it is for undertow only.

regards, Achim

2018-02-26 17:43 GMT+01:00 Ryan Moquin <fragility...@gmail.com>:

> I don't want to use undertow, if I try to install the pax-jsf-support
> feature, it says pax-http-undertow is required.  I don't know if maybe it's
> an error that it requires undertow since when you install the jsf support
> feature, a lot of Jetty bundles get installed.  I personally am fine
> with only jetty, if I can install the jsf support without undertow :)
>
> Also, to JB's suggestion.  I was running with a clean karaf and when I
> install the features, I end up with the problem above.  I am wondering if
> this whole problem is because I keep getting an error that undertow is a
> requirement for the pax-jsf-support feature (I think if I look at the
> feature info, it is listed as a requirement, which would make sense based
> on the error.)
>
> I'll see if maybe an older pax version is getting referenced somehow?
>
> Ryan
>
>
> On Mon, Feb 26, 2018, 10:36 AM Achim Nierbeck <bcanh...@googlemail.com>
> wrote:
>
>> Hi,
>>
>> you need to differentiate, if you want to do JSF with jetty there is no
>> extra module needed, if you want to use undertow instead of Jetty, you'll
>> need that extra module.
>>
>> regards, Achim
>>
>> 2018-02-26 16:08 GMT+01:00 Jean-Baptiste Onofré <j...@nanthrax.net>:
>>
>>> We did a lot of improvements for 4.2.x around that and in new Pax
>>> CDI/Pax Web
>>> releases (just out couple of days ago).
>>>
>>> Anyway, it seems there's a mix between undertow and jetty. It should be
>>> one or
>>> the other (changing the HTTP provider).
>>>
>>> Can you please try from a cleanup instance ?
>>>
>>> Regards
>>> JB
>>>
>>> On 02/26/2018 03:30 PM, Ryan Moquin wrote:
>>> > I wanted to try out JSF support in Karaf, but seem to get a lot of
>>> problems
>>> > originating between undertow and jetty.  When I try to install
>>> pax-jsf-support,
>>> > it says I need pax-http-undertow.  I can install pax-http-undertow
>>> fine.  When I
>>> > install pax-jsf-support, it installs jetty (which seems odd if it
>>> depends on the
>>> > feature for a different servlet container)and then I see the following
>>> error (if
>>> > I install pax-war, then pax-http-undertow, jetty and undertow seem to
>>> install
>>> > without any problems, but if I then add pax-jsf-support, I also get the
>>> > following error as well as a bunch related to CDI after it):
>>> >
>>> > 2018-02-26 09:03:10,917 | WARN  | onfig-1-thread-1 | JettyServerImpl
>>>
>>> >   | 154 - org.ops4j.pax.web.pax-web-jetty - 6.0.9 | No
>>> configuration file
>>> > found with name jetty.xml. Filename given: undertow.properties, will
>>> read this
>>> > one instead.
>>> > 2018-02-26 09:03:10,954 | INFO  | tures-1-thread-1 |
>>> FeaturesServiceImpl
>>> >   | 8 - org.apache.karaf.features.core - 4.1.5 |
>>> >  org.apache.xbean.asm5-shaded/4.4.0
>>> > 2018-02-26 09:03:10,957 | INFO  | tures-1-thread-1 |
>>> FeaturesServiceImpl
>>> >   | 8 - org.apache.karaf.features.core - 4.1.5 |
>>>  openwebbeans-impl/1.6.3
>>> > 2018-02-26 09:03:10,962 | INFO  | tures-1-thread-1 |
>>> FeaturesServiceImpl
>>> >   | 8 - org.apache.karaf.features.core - 4.1.5 |
>>> >  org.ops4j.pax.cdi.extension/1.0.0
>>> > 2018-02-26 09:03:10,968 | WARN  | onfig-1-thread-1 | XmlParser
>>>
>>> >   | 117 - org.eclipse.jetty.util - 9.3.21.v20170918 |
>>> > FATAL@file:/C:/dev/karaf/etc/undertow.properties line:1 col:1 :
>>> > org.xml.sax.SAXParseException; systemId:
>>> > file:/C:/dev/karaf/etc/undertow.properties; lineNumber: 1;
>>> columnNumber: 1;
>>> > Content is not allowed in prolog.
>>> > 2018-02-26 09:03:10,969 | ERROR | onfig-1-thread-1 | JettyServerImpl
>>>
>>> >   | 154 - org.ops4j.pax.web.pax-web-jetty - 6.0.9 | Exception
>>> while starting
>>> > Jetty
>>> > org.xml.sax.SAXParseException: Content is not allowed in prolog.
>>> > at
>>> > com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.
>>> createSAXParseException(ErrorHandlerWrapper.java:203)
>>> >

Re: pax-support-jsf in Karaf

2018-02-26 Thread Achim Nierbeck
Hi,

you need to differentiate, if you want to do JSF with jetty there is no
extra module needed, if you want to use undertow instead of Jetty, you'll
need that extra module.

regards, Achim

2018-02-26 16:08 GMT+01:00 Jean-Baptiste Onofré :

> We did a lot of improvements for 4.2.x around that and in new Pax CDI/Pax
> Web
> releases (just out couple of days ago).
>
> Anyway, it seems there's a mix between undertow and jetty. It should be
> one or
> the other (changing the HTTP provider).
>
> Can you please try from a cleanup instance ?
>
> Regards
> JB
>
> On 02/26/2018 03:30 PM, Ryan Moquin wrote:
> > I wanted to try out JSF support in Karaf, but seem to get a lot of
> problems
> > originating between undertow and jetty.  When I try to install
> pax-jsf-support,
> > it says I need pax-http-undertow.  I can install pax-http-undertow
> fine.  When I
> > install pax-jsf-support, it installs jetty (which seems odd if it
> depends on the
> > feature for a different servlet container)and then I see the following
> error (if
> > I install pax-war, then pax-http-undertow, jetty and undertow seem to
> install
> > without any problems, but if I then add pax-jsf-support, I also get the
> > following error as well as a bunch related to CDI after it):
> >
> > 2018-02-26 09:03:10,917 | WARN  | onfig-1-thread-1 | JettyServerImpl
>
> >   | 154 - org.ops4j.pax.web.pax-web-jetty - 6.0.9 | No
> configuration file
> > found with name jetty.xml. Filename given: undertow.properties, will
> read this
> > one instead.
> > 2018-02-26 09:03:10,954 | INFO  | tures-1-thread-1 |
> FeaturesServiceImpl
> >   | 8 - org.apache.karaf.features.core - 4.1.5 |
> >  org.apache.xbean.asm5-shaded/4.4.0
> > 2018-02-26 09:03:10,957 | INFO  | tures-1-thread-1 |
> FeaturesServiceImpl
> >   | 8 - org.apache.karaf.features.core - 4.1.5 |
>  openwebbeans-impl/1.6.3
> > 2018-02-26 09:03:10,962 | INFO  | tures-1-thread-1 |
> FeaturesServiceImpl
> >   | 8 - org.apache.karaf.features.core - 4.1.5 |
> >  org.ops4j.pax.cdi.extension/1.0.0
> > 2018-02-26 09:03:10,968 | WARN  | onfig-1-thread-1 | XmlParser
>
> >   | 117 - org.eclipse.jetty.util - 9.3.21.v20170918 |
> > FATAL@file:/C:/dev/karaf/etc/undertow.properties line:1 col:1 :
> > org.xml.sax.SAXParseException; systemId:
> > file:/C:/dev/karaf/etc/undertow.properties; lineNumber: 1;
> columnNumber: 1;
> > Content is not allowed in prolog.
> > 2018-02-26 09:03:10,969 | ERROR | onfig-1-thread-1 | JettyServerImpl
>
> >   | 154 - org.ops4j.pax.web.pax-web-jetty - 6.0.9 | Exception while
> starting
> > Jetty
> > org.xml.sax.SAXParseException: Content is not allowed in prolog.
> > at
> > com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.
> createSAXParseException(ErrorHandlerWrapper.java:203)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(
> ErrorHandlerWrapper.java:177)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
> XMLErrorReporter.java:400)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
> XMLErrorReporter.java:327)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.impl.XMLScanner.
> reportFatalError(XMLScanner.java:1472)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$
> PrologDriver.next(XMLDocumentScannerImpl.java:994)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(
> XMLDocumentScannerImpl.java:602)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(
> XMLNSDocumentScannerImpl.java:112)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
> .scanDocument(XMLDocumentFragmentScannerImpl.java:505)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(
> XML11Configuration.java:841)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(
> XML11Configuration.java:770)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.parsers.XMLParser.
> parse(XMLParser.java:141)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(
> AbstractSAXParser.java:1213)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$
> JAXPSAXParser.parse(SAXParserImpl.java:643)
> > ~[?:?]
> > at
> > com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.
> parse(SAXParserImpl.java:327)
> > ~[?:?]
> > at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:201)
> ~[?:?]
> > at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:221)
> ~[?:?]
> > at
> > org.eclipse.jetty.xml.XmlConfiguration.(XmlConfiguration.java:137)
> ~[?:?]
> > at
> > org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.start(
> 

Re: [Karaf] Missing requirement

2017-12-15 Thread Achim Nierbeck
Hi,

you should try to depend on already existing features.
For one, there are spring features available from Karaf itself, that'll
reduce already.
Same is for all the logging part.
Make sure to define your logging dependencies in your maven pom as
provided

CXF etc. are also features which already exist, for those you'll need to
make sure to actually depend on those.

That'll help you.

regards, Achim

2017-12-15 10:33 GMT+01:00 GFO :

> Hello,
>
> Indeed, I didn't notice my examples are not in my messages... thanks for
> the
> information!
>
> exclusion of slf4j : https://pastebin.com/Wa36sas1
> feature.xml : https://pastebin.com/wr9S2q2t
>
> Thanks.
>
> Regards,
> GFO
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Update on the Karaf website look'n feel

2017-12-04 Thread Achim Nierbeck
Hi JB & François,

indeed it looks much more eye friendly.

Great work.

Achim

2017-12-04 18:29 GMT+01:00 Jean-Baptiste Onofré :

> Hi guys,
>
> A new Karaf enthusiast and close friend, François (Papon) proposed a
> website pull request providing a nice update for the website.
>
> He provided a very good PR, providing an updated look'n feel. We now have
> a cleaner and even more professional looking website.
>
> I promoted the website (as the content didn't change, only the look'n
> feel).
>
> I would like to warmly thank François for this work.
>
> Thanks !
> Regards
> JB
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: jetty/karaf bind issue

2017-11-26 Thread Achim Nierbeck
Hard to tell from here,
though since it's JettyServerImpl which fails to bind to the configured
Port, something else blocks it.
So this isn't a common problem seen unless there is already another process
blocking it.

regards, Achim

2017-11-26 17:24 GMT+01:00 smunro :

> No, I've checked that in the process list.
>
> The only thing that's suspect is that we have a massive client bundle (that
> could arguably broken). We've used declarative services to try and impose a
> start up order. The client bundle in question holds all the jetty features
> and the angular WAR, but sits in a grace period for a number of minutes
> before coming up, but I expect that to be normal given that's the last
> bundle I expect to start.
>
> This problem can only be replicated when I use the service-wrapper. I'll
> put
> sysutils to work on it to see If can diagnose it further, but if this isn't
> a common issue people are finding, then it must be something up with the
> environment.  If it was happening both in manual mode and service mode, it
> would be a lot easier to pinpoint the problem.
>
> Stephen
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: jetty/karaf bind issue

2017-11-26 Thread Achim Nierbeck
Hi Stephen,

might it be that you have two instances of Karaf running?
One as service and the other one trying to start as standalone?

Regards, Achim

2017-11-26 17:12 GMT+01:00 smunro :

> Hello Achim,
>
> I know it's obvious it's being blocked, the problem is that there is
> nothing
> else on the machine. I've checked the running processes and blocked ports.
> This only occurs when using the wrapper-server to start/stop karaf and
> never
> seems to occur when starting/stopping karaf manually.
>
> It may just boil down to a timing/resource issue with the net-service, but
> I
> thought I'd run it past the forum in case anyone has encountered this
> issue.
>
> Stephen
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: jetty/karaf bind issue

2017-11-26 Thread Achim Nierbeck
Hi,

obviously something else is already running on the configured port for the
webcontainer.
That is by default 8181. So you need to make sure you stop the other
process blocking that port.

regards, Achim

2017-11-26 15:01 GMT+01:00 smunro :

> Hello,
>
> I'm currently having an issue with running karaf as a windows service.
> Intermittently, I'm getting an exception during startup of the service (see
> below). If I restart sometimes, it'll be fine, but other times, I get this
> issue. This doesn't occur if I start karaf manually and stop it manually.
> Is
> there a known issue or recommended strategy for dealing with this?
>
> !org.ops4j.pax.web.pax-web-runtime - 6.0.7 | Could not start the servlet
> context for context path []
> java.net.BindException: Address already in use: bind
> at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
> at sun.nio.ch.Net.bind(Net.java:433) [?:?]
> at sun.nio.ch.Net.bind(Net.java:425) [?:?]
> at
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
> [?:?]
> at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
> [?:?]
> at org.eclipse.jetty.server.ServerConnector.open(
> ServerConnector.java:317)
> [178:org.eclipse.jetty.server:9.3.14.v20161028]
> at
> org.eclipse.jetty.server.AbstractNetworkConnector.doStart(
> AbstractNetworkConnector.java:80)
> [178:org.eclipse.jetty.server:9.3.14.v20161028]
> at
> org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235)
> [178:org.eclipse.jetty.server:9.3.14.v20161028]
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.
> start(AbstractLifeCycle.java:68)
> [181:org.eclipse.jetty.util:9.3.14.v20161028]
> at org.eclipse.jetty.server.Server.doStart(Server.java:401)
> [178:org.eclipse.jetty.server:9.3.14.v20161028]
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.
> start(AbstractLifeCycle.java:68)
> [181:org.eclipse.jetty.util:9.3.14.v20161028]
> at
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(
> JettyServerImpl.java:329)
> [203:org.ops4j.pax.web.pax-web-jetty:6.0.7]
> at
> org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(
> HttpServiceStarted.java:250)
> [205:org.ops4j.pax.web.pax-web-runtime:6.0.7]
> at
> org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(
> HttpServiceStarted.java:221)
> [205:org.ops4j.pax.web.pax-web-runtime:6.0.7]
> at
> org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(
> HttpServiceStarted.java:205)
> [205:org.ops4j.pax.web.pax-web-runtime:6.0.7]
> at
> org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(
> HttpServiceProxy.java:65)
> [205:org.ops4j.pax.web.pax-web-runtime:6.0.7]
> at
> org.apache.cxf.transport.http.osgi.ServletExporter.updated(
> ServletExporter.java:108)
> [125:org.apache.cxf.cxf-rt-transports-http:3.1.11]
> at
> org.apache.felix.cm.impl.helper.ManagedServiceTracker.
> updated(ManagedServiceTracker.java:189)
> [7:org.apache.felix.configadmin:1.8.16]
> at
> org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(
> ManagedServiceTracker.java:152)
> [7:org.apache.felix.configadmin:1.8.16]
> at
> org.apache.felix.cm.impl.helper.ManagedServiceTracker.
> provideConfiguration(ManagedServiceTracker.java:85)
> [7:org.apache.felix.configadmin:1.8.16]
> at
> org.apache.felix.cm.impl.ConfigurationManager$
> ManagedServiceUpdate.provide(ConfigurationManager.java:1479)
> [7:org.apache.felix.configadmin:1.8.16]
> at
> org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(
> ConfigurationManager.java:1435)
> [7:org.apache.felix.configadmin:1.8.16]
> at org.apache.felix.cm.impl.UpdateThread.run0(
> UpdateThread.java:141)
> [7:org.apache.felix.configadmin:1.8.16]
> at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.
> java:109)
> [7:org.apache.felix.configadmin:1.8.16]
> at java.lang.Thread.run(Thread.java:748) [?:?]
>
> Stephen
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: web container not working on installing web

2017-11-19 Thread Achim Nierbeck
Hi,

as long as you don't have any application using the war feature you won't
be able to access the server.
It waits till the first WAB or other web related bundle is deployed and
will serve it's content when available.

regards, Achim


2017-11-17 16:34 GMT+01:00 Saravanakumar Murugesan :

> Hi
>
> I installed war feature, on executing feature install war.
>
> I got log messages as below in karaf.log
>
> 34:35,545 | INFO  | paxweb-config-1-thread-1 | JettyFactoryImpl
>  | 100 - org.ops4j.pax.web.pax-web-jetty - 6.0.6 | HTTP/2 not
> available, creating standard ServerConnector for Http
> 2017-11-17T20:34:35,546 | INFO  | paxweb-config-1-thread-1 |
> JettyServerImpl  | 100 - org.ops4j.pax.web.pax-web-jetty
> - 6.0.6 | Pax Web available at [0.0.0.0]:[8181]
>
> I tried connecting localhost:8181, it does not work and it says connection
> refused.
>
> I attached logs .
>
> I would like to know the reason for connection refused error.
>
> thank you for your help
>
>
> cheers
> MSK
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Strange resolution problem

2017-10-09 Thread Achim Nierbeck
Hi,

looks like you do have an import for it in your bundle. So somewhere in
your bytecode there seems to be an import for it.
Maybe you've used a newer version while building, compared to what you've
got when running.

regards, Achim

2017-10-09 8:42 GMT+02:00 David Leangen :

>
> Hi!
>
> I am stumped. I am having a resolution issue in Karaf as follows:
>
>
> org.osgi.framework.BundleException: Unable to resolve
> net.leangen.expedition.platform.ddd.diag [101](R 101.0): missing
> requirement [net.leangen.expedition.platform.ddd.diag [101](R 101.0)]
> osgi.wiring.package; (&(osgi.wiring.package=*org.osgi.service.serializer*
> )(version>=1.0.0)(!(version>=2.0.0))) Unresolved requirements:
> [[net.leangen.expedition.platform.ddd.diag [101](R 101.0)]
> osgi.wiring.package; (&(osgi.wiring.package=*org.osgi.service.serializer*
> )(version>=1.0.0)(!(version>=2.0.0)))]
>
>
> The problem is that there **is no package** org.osgi.service.serializer.
> There is only org.apache.felix.serializer.
>
> I have gone through all my OBRs and repositories, but cannot find any
> reference to that package. I even did a search in the Karaf code and did
> not find any such reference. Since the package does not exist, the
> resolution error is correct. The problem is: why is there a requirement on
> that package in the first place??
>
>
> What am I missing??
>
>
> Thanks!
> =David
>
>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: karaf 3.0.1 just prints NullPointerException trying to append a property

2017-09-28 Thread Achim Nierbeck
Hi,

afair 3.0.x was never "designed" to work with Java8.
The reason might have been the ASM stuff, so I wouldn't rely on that.

If you want to use Karaf 3.0.x you'll need to stick to Java 7 I fear.

regards, Achim


2017-09-28 7:22 GMT+02:00 Jean-Baptiste Onofré :

> Hi David,
>
> Something is wrong on 3.0.1 (at least with Java 8): all commands throw a
> NullPointerException (even a simple bundle:list).
>
> After a quick look, it seems to be related to blueprint and aries proxy
> (and asm).
>
> I'm checking and I will fix that.
>
> Regards
> JB
>
>
> On 09/28/2017 12:45 AM, KARR, DAVID wrote:
>
>> I'm unfortunately forced to use Karaf 3.0.1 for some maintenance changes
>> I need to make, and I don't even regularly use karaf.
>>
>> The setup process requires entering some commands into karaf after it
>> starts up.  First there's a call to "config:property-append" with certain
>> parameters.  When I do this, or even just "config:property-append --help",
>> it just says "Error executing command: java.lang.NullPointerException",
>> with no other information.
>>
>> What might be wrong here, and what can I do to get more information?
>>
>> Assuming I get this working, is it practical to pipe a set of commands
>> into karaf, so it will enter them after it presents the command prompt?
>>
>>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Executing a Karaf command in Pax Exam Test

2017-08-13 Thread Achim Nierbeck
Hi,

take a look at these lines, they'll give you something similar I'm sure:
https://github.com/ANierbeck/Karaf-Cassandra/blob/master/Karaf-Cassandra-ITest/src/test/java/de/nierbeck/cassandra/itest/TestBase.java#L150-L180

btw. if in doubt, there are a couple of tests around that class using it.
So there should be plenty of samples ;)

regards, Achim


2017-08-13 14:06 GMT+02:00 Kerry :

> Hi,
>
> I'm writing an integration test and in it I want to execute the Karaf
> 'install' command. I don't want to provision the bundle at Karaf start-up
> but specifically attempt to install it in a test to ensure a certain
> behaviour occurs.
>
> I found this page: http://planet.jboss.org/post/a
> dvanced_integration_testing_with_pax_exam_karaf and it makes use of a
> 'CommandProcessor' interface but searching the current Karaf source code it
> appears this class no longer exists.
>
> Is there a way that I can achieve the above?
>
> Thanks
>
> Kerry
>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: fragment not bound to its host (karaf v.4.1.2)

2017-08-09 Thread Achim Nierbeck
Hmm ..
usually you have to refresh the host bundle for that.
Did we add such a functionality in the past to the bundle:install command?
I thought that one is a inherited one

regards, Achim


2017-08-09 17:20 GMT+02:00 Nicolas Brasey :

> It worked on 4.0.8 but I did not try on 4.1.1.
>
> Here is the jira:
> https://issues.apache.org/jira/browse/KARAF-5299
>
>
>
>
>
>
>
> On Wed, Aug 9, 2017 at 4:35 PM, Jean-Baptiste Onofré 
> wrote:
>
>> Yes, please.
>>
>> Did it work on 4.1.1 ?
>>
>> Regards
>> JB
>>
>>
>> On 08/09/2017 04:25 PM, Nicolas Brasey wrote:
>>
>>> Hi,
>>>
>>> I have a fragment bundle which does not get attached to its host when
>>> using the command bundle:install. It gets bound correctly if I drop the
>>> bundle in the deploy directory.
>>>
>>> Should I open a Jira ?
>>>
>>> Thanks,
>>> Nicolas
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbono...@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Karaf 4.1.x / httplite incompatibility

2017-08-08 Thread Achim Nierbeck
No Problem :)


This message gave me the hint:
Port already in use: 4;

That usually only happens if at least two instances are running

regards, Achim

2017-08-08 15:42 GMT+02:00 Stephen Winnall <st...@winnall.ch>:

> 
>
> Yes, Achim, you were right. I had a Karaf instance left over from
> somewhere that had got detached from NetBeans… When I killed it the problem
> went away.
>
> Apologies.
>
> Steve
>
> On 8 Aug 2017, at 13:37, Achim Nierbeck <bcanh...@googlemail.com> wrote:
>
> Hi,
>
> looks more like you already have another instance of Karaf running, no?
>
> regards, Achim
>
> 2017-08-08 12:55 GMT+02:00 winnall <st...@winnall.ch>:
>
>> Jean-Baptiste Onofré fixed this issue for 4.1.2 and others. Thank you! So
>> -
>> with the release today of 4.1.2 - I tried it out. The original problem has
>> indeed disappeared, but I'm now seeing new behaviour that appears also to
>> have its root in httplite.
>>
>> When I start Karaf, I see
>>  and in the log I see
>>
>>
>> Is this a follow-on issue or something quite different that was hidden by
>> the previous issue?
>>
>> Steve
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.
>> com/Karaf-4-1-x-httplite-incompatibility-tp4050094p4051180.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/>
> 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: Karaf 4.1.x / httplite incompatibility

2017-08-08 Thread Achim Nierbeck
Hi,

looks more like you already have another instance of Karaf running, no?

regards, Achim

2017-08-08 12:55 GMT+02:00 winnall :

> Jean-Baptiste Onofré fixed this issue for 4.1.2 and others. Thank you! So -
> with the release today of 4.1.2 - I tried it out. The original problem has
> indeed disappeared, but I'm now seeing new behaviour that appears also to
> have its root in httplite.
>
> When I start Karaf, I see
>  and in the log I see
>
>
> Is this a follow-on issue or something quite different that was hidden by
> the previous issue?
>
> Steve
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Karaf-4-1-x-httplite-incompatibility-tp4050094p4051180.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Turn off Karaf configuration persistence manager

2017-08-06 Thread Achim Nierbeck
Hi,

I guess it's been missing a version till now.
I added it to version 4.2.0.
For a patch level version this change does have to much implications.

regards, Achim


2017-08-06 13:45 GMT+02:00 Dominik Przybysz :

> Hi,
> is there any chance that KARAF-4803 [1] will be merged and closed in the
> next Karaf version? It is very confusing for my users that when I change a
> property via command line, than the property is changed in my store and
> also in the karaf etc.
>
> [1] https://issues.apache.org/jira/browse/KARAF-4803
>
> --
> Pozdrawiam / Regards,
> Dominik Przybysz
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: war deployment servlet spec 3

2017-07-27 Thread Achim Nierbeck
Hi Matt,

it depends on what kind of Servlet3 application you deploy.
As Karaf doesn't use jetty directly but uses Pax Web as intermediate layer
for the deployment and management of web applications in an OSGi manner.
Actually you can also replace Jetty with undertow or Tomcat.

Never the less, you have a couple different ways of deploying your web
application.
1)
Let's go the easiest for non OSGi people. You drop your non-OSGi war in the
deploy folder or
install it with a war-URL handler attached, e.g.
war:my.groupId/myArtifact/version
That'll make sure your non-OSGi war is transformed into a OSGi war where
the myArtifact will be used as the web-ContextPath.

2)
You create a OSGi war, and add a web-ContextPath to it.
These WABs just need this manifest header, which makes sure the wab is
going to be identified as such.
2a) use a regular WAR with web.xml, the WAB-Extender will make sure to
retrieve everthing needed from the web.xml and will make sure the war is
deployed as such, but also that parts are available as OSGi services
2b) use a regular WAR without web.xml, the WEB-Extender will check for
annotated Servlet classes and will make sure the complete war is deployed
correctly, again also registering parts as services

3)
Use the HttpService, is the "old" OSGi way of registering plain Servlets
and resources, and requires an Activator class where those services are
registered with the HttpService

4)
The WebContainer (non-Standardised), is the PaxWeb Extension of the
HttpService, which provides a way to register all possible services around
servlets.

5)
The Whiteboard extender will listen to any registered Service like Servlet
and will make sure it's handled by the underlying container.
5a) the OSGi standard one, with all Props and possibilities in the spec.
5b) the original Pax Web one, which uses a different set of Properties

In your case it sounds like your looking for 2b), so make sure you do have
a web-ContextPath in the manifest header.

All kind of different ways can also be seen in the samples of Pax-Web [1]

regards, Achim

[1] - https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples


2017-07-28 5:13 GMT+02:00 Matthew Shaw :

> Hi All,
>
>
>
> I’m using karaf 4.1.1 deploying a servlet 3 enabled war using the
> bundle:install command. It installs successfully and the bundle moves to a
> state of active. However the app is not starting up. On the latest karaf
> doco it does state that there needs to be a web.xml in the war for the war
> feature to work. However, I’ve noticed that internally karaf is using
> jetty9 which supports servlet 3 ie. No web.xml.
>
>
>
> How can I get this to work?
>
>
>
> Cheers,
>
> Matt.
>
> This email, including any attachments sent with it, is confidential and
> for the sole use of the intended recipient(s). This confidentiality is not
> waived or lost, if you receive it and you are not the intended
> recipient(s), or if it is transmitted/received in error.
>
> Any unauthorised use, alteration, disclosure, distribution or review of
> this email is strictly prohibited. The information contained in this email,
> including any attachment sent with it, may be subject to a statutory duty
> of confidentiality if it relates to health service matters.
>
> If you are not the intended recipient(s), or if you have received this
> email in error, you are asked to immediately notify the sender. You should
> also delete this email, and any copies, from your computer system network
> and destroy any hard copies produced.
>
> If not an intended recipient of this email, you must not copy, distribute
> or take any action(s) that relies on it; any form of disclosure,
> modification, distribution and/or publication of this email is also
> prohibited.
>
> Although the Queensland Ambulance Service takes all reasonable steps to
> ensure this email does not contain malicious software, the Queensland
> Ambulance Service does not accept responsibility for the consequences if
> any person's computer inadvertently suffers any disruption to services,
> loss of information, harm or is infected with a virus, other malicious
> computer programme or code that may occur as a consequence of receiving
> this email.
>
> Unless stated otherwise, this email represents only the views of the
> sender and not the views of the Queensland Government.
>
> 
> 
>
> The content presented in this publication is distributed by the Queensland
> Government as an information source only. The State of Queensland makes no
> statements, representations or warranties about the accuracy, completeness
> or reliability of any information contained in this publication. The State
> of Queensland disclaims all responsibility and all liability (including
> without limitation for liability in negligence) for all expenses, losses,
> damages and costs you might incur as a result of the information being
> 

Re: Features for Async and UserAdmin services?

2017-07-27 Thread Achim Nierbeck
Hi Scott,

for user admin service there is the ops4j project of course Useradmin ;)
it also contains a feature file:

https://github.com/ops4j/org.ops4j.pax.useradmin

about Async I'm not sure but afaik there is an aries project available, my
best guess is, that there also might be a feature file since it's an aries
project.

regards, Achim


2017-07-27 16:11 GMT+02:00 Leschke, Scott :

> Are there features defined for these and if so, how would I install them?
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Karaf in Docker

2017-06-16 Thread Achim Nierbeck
Hi,

I recently used the following as entry point:
https://github.com/ANierbeck/Karaf-Vertx/blob/master/Vertx-Karaf-Cluster-Docker/src/main/resources/entrypoint.sh
the docker is generated through a maven build:
but that one uses this entry file:
https://github.com/ANierbeck/Karaf-Vertx/blob/master/Vertx-Karaf-Cluster-Docker/pom.xml#L59
that's it, you'll have a constant docker log.

regards, Achim


2017-06-16 17:47 GMT+02:00 Jean-Baptiste Onofré :

> Yes, but I tried with kellar.
>
> Let me check with 4.1.1 "vanilla".
>
> Regards
> JB
>
> On 06/16/2017 04:13 PM, Daniel McGreal wrote:
>
>> But your Dockerfile gets the distribution from
>> http://www-us.apache.org/dist/karaf/${KARAF_VERSION}/apache-
>> karaf-4.1.1.tar.gz > /karaf/$%7BKARAF_VERSION%7D/apache-karaf-4.1.1.tar.gz> ?
>>
>> On 16 Jun 2017, at 15:12, Jean-Baptiste Onofré > j...@nanthrax.net>> wrote:
>>>
>>> Let me check as I'm using a custom Karaf distribution (kellar).
>>>
>>> I keep you posted.
>>>
>>> Regards
>>> JB
>>>
>>> On 06/16/2017 04:10 PM, Daniel McGreal wrote:
>>>
 Indeed…
 The mkroli Dockerfile is identical, apart from the MAINTAINER line, and
 yet I get an error in some script file, and the container exits when the
 console appears (presumably because it encounters an EOF?)...
 Argent:~ dan$ docker run mkroli/karaf
 __ __  
/ //_/ __ _/ __/
   / ,<  / __ `/ ___/ __ `/ /_
  / /| |/ /_/ / /  / /_/ / __/
 /_/ |_|\__,_/_/   \__,_/_/
   Apache Karaf (4.1.1)
 Hit '' for a list of available commands
 and '[cmd] --help' for help on a specific command.
 Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
 Error in initialization script: /opt/karaf/etc/shell.init.script:
 String index out of range: 0
 karaf@root()>
 Argent:~ dan$
 Running in server mode works, but is a bit quiet. Is there a way for it
 to also output something like log:tail when booted?
 docker run mkroli/karaf server
 I’m surprised yours works as-is, though I am finding Docker not to be
 living up anywhere near to its hype.
 Dan.

> On 16 Jun 2017, at 15:04, Jean-Baptiste Onofré  > wrote:
>
> Hi Dan,
>
> docker run kellar
>   __ __  
>  / //_/ __ _/ __/
> / ,<  / __ `/ ___/ __ `/ /_
>/ /| |/ /_/ / /  / /_/ / __/
>   /_/ |_|\__,_/_/   \__,_/_/
>
> Apache Karaf (4.1.1)
>
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
>
>
> What issue do you have ?
>
> Do you see the MOTD and then it exits ?
>
> Regards
> JB
>
> On 06/16/2017 03:58 PM, Daniel McGreal wrote:
>
>> This seems fairly identical to the mkroli Dockerfile. Does docker run
>> work for you with this file then presumably? For me, it exits as soon as
>> the console appears.
>>
>>> On 16 Jun 2017, at 14:27, Jean-Baptiste Onofré >> > wrote:
>>>
>>> Hi Dan,
>>>
>>> Here's a dockerfile I'm using starting from the official java image:
>>>
>>> FROM java:8-jdk
>>> ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
>>>
>>> ENV KARAF_VERSION=4.1.1
>>>
>>> RUN wgethttp://www-us.apache.org/dist/karaf/${KARAF_VERSION}/apa
>>> che-karaf-${KARAF_VERSION}.tar.gz
>>> 
>>> >> apache-karaf-$%7BKARAF_VERSION%7D.tar.gz>; \
>>>   mkdir /opt/karaf; \
>>>   tar --strip-components=1 -C /opt/karaf -xzf
>>> apache-karaf-${KARAF_VERSION}.tar.gz; \
>>>   rm apache-karaf-${KARAF_VERSION}.tar.gz; \
>>>   mkdir /deploy; \
>>>   sed -i 's/^\(felix\.fileinstall\.dir\s*=\s*\).*$/\1\/deploy/'
>>> /opt/karaf/etc/org.apache.felix.fileinstall-deploy.cfg
>>>
>>> VOLUME ["/deploy"]
>>> EXPOSE 1099 8101 4
>>> ENTRYPOINT ["/opt/karaf/bin/karaf"]
>>>
>>> By the way, I'm in the process to create official Apache Karaf
>>> images.
>>>
>>> Regards
>>> JB
>>>
>>> On 06/16/2017 03:12 PM, Daniel McGreal wrote:
>>>
 Hi Karaf users,
 I’m trying to run Karaf in Docker using mkroli/karaf.
 docker run mkroli/karaf fails, possibly because the console is
 running and it gets an EOF immediately. docker run mkroli/karaf server
 works, but is a bit silent for my liking… can I somehow get it to 
 output
 log:tail?
 Best, Dan.

>>>
>>> --

Re: Karaf 4 - how to set properties for commands

2017-06-15 Thread Achim Nierbeck
Hi Martin,

afaik you still can also use the "old" style with blueprint.
As you are using blueprint anyway that shouldn't be much of a big deal.
The idea about the new command way is to not depend on blueprint for Karaf
internals.

The @Reference annotation is actually a karaf own annotation,
org.apache.karaf.shell.api.action.lifecycle.Reference
There is no filtering available on that annotation.

regards, Achim


2017-06-15 8:38 GMT+02:00 Martin Lichtin :

> So far I could not find a way to do this in the new Karaf command
> framework.
> A command is now instantiated each time it is invoked.
> It can use OSGi services (@Reference) but there doesn't seem to be a way
> to set a filter for it.
> I can access the BlueprintContainer (it's  available as a service), but
> not the beans by their name.
> oh well..
>
>
>
> On 02.06.2017 20:23, Martin Lichtin wrote:
>
>> In Karaf 3, a command can be defined in Blueprint as:
>>
>> 
>>   
>> 
>>   
>> 
>>
>> where in my case "producerTemplate" comes from a CamelContext created in
>> the same Blueprint context.
>>
>> Now in Karaf 4, how would I do the same, i.e. set the property?
>>
>> - Martin
>>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Does hibernate work in karaf 4.1 (it does in 4.0)?

2017-06-14 Thread Achim Nierbeck
Hi tom,

I know Karaf 4.1.1 and Hibernate works, though I don't have an OSS project
at hand to prove it.
I might sound a bit grumpy, but my gut feeling tells me the root to your
issues are those bndtools generated bundles.
I fear sometimes they do provide to much "included" when run in a Karaf
env.
If you want to have a Karaf with Hibernate running, start with a vanilla
Karaf (not minimal).
Issue the following commands:
feature:install hibernate
feature:install jpa
You'll see that most of the required bundles are already available.
For example a bundle providing Expression Language.

Just as a hint, maybe it's best to start off with a vanilla Karaf and if
you know the features are working, and you know which ones are actually
required, to go down the path of building a customized karaf.

regards, Achim




2017-06-14 20:36 GMT+02:00 :

> I've been struggling to get our code that uses Hibernate to work within
> Karaf 4.1 today.
> I have created a simple test case, which is on github:
> https://github.com/tomq42/karaf-tests-hibernate. There are a variety of
> branches, each with a different combination of hibernate and karaf. The
> branches karaf_4.0.9 and hibernate_5.3.4_karaf_4.1.1 are the most
> interesting.
>
> My test is to have a bundle with an activator, where the start method just
> does:
>
> javax.validation.Validation
> .byProvider(HibernateValidator.class)
> .providerResolver(new MyProviderResolver())
> .configure()
> .buildValidatorFactory()
> .getValidator();
>
> I write the java with bndtools in Eclipse. I then run the gradle script
> provided by bndtools to publish the resulting bundle to my local maven
> repository. I then run maven to build a feature containing the bundle, and
> then use the karaf-assembly packaging to product a karaf distribution,
> including the karaf "enterprise" feature repository, and hence its
> "hibernate-validator" feature. I then run the distribution, and it either
> says "great, created a validator", or prints a nasty stack trace.
>
> If I try this with karaf 4.1.1, I can't get it to work. It fails with
>
>   javax.validation.ValidationException: HV000183: Unable to initialize
> 'javax.el.ExpressionFactory'. Check that you have the EL dependencies on
> the classpath
>...
>   Caused by: java.lang.ClassNotFoundException: 
> com.sun.el.ExpressionFactoryImpl
> not found by org.hibernate.validator
>
>
> The thing is that I try with Karaf 4.0.9, and I *can* get it to work. Same
> code, just compiled against different versions of hibernate, so that the
> requirements match the version of karaf. In both cases, I have configured
> Eclipse/bndtools to use the same version of hibernate as that version of
> Karaf ships with.
>
> Karaf 4.0 series seems to use hibernate 5.0.3, Karaf 4.1 seems to use
> hibernate 5.3.4.
>
> From within eclipse I can run OSGi using bndtools. If I compile and run
> against Hibernate 5.0, and ensure that the glassfish.javax.el bundle is
> available at runtime, I can successfully create a validator. I can then
> build the same bundle and build my Karaf 4.0 based distribution, and the
> result runs. I can use hibernate 5.2 as well, and that works within
> bndtools (I'm not sure I would know how to make karaf use a later version
> of hibernate than the one it ships with).
>
> If I build and run against hibernate 5.3 within bndtools, I get the error
> (java.lang.ClassNotFoundException: com.sun.el.ExpressionFactoryImpl), and
> I get the same if I then build the java and build my karaf 4.1 based
> distribution. Note that in both cases I have the glassfish.javax.el
> available, so the com.sun.el classes should be available.
>
> For a while I was convinced that it was a problem with boot class
> delegation, since com.sun.* is in the org.osgi.framework.bootdelegation
> setting in the config.properties file. I wondered whether because of that
> boot class delegation, it wouldn't attempt to load the classes out of the
> bundle, and instead try to load them from the boot classloader. However the
> same is true in Karaf 4.0.9, and it works fine there. So I think that was a
> red herring.
>
> So something seems to changed within hibernate to render it incompatible
> with Karaf 4.1?
>
> So I'm out of ideas. The fact that it works in 4.0.9 suggest that
> fundamentally I'm not doing anything wrong, and that something has changed
> in hibernate to cause this to now fail.
>
> I found an old thread on this list on which Christian had posted a link to
> some test cases for Hibernate, here: https://github.com/hibernate/
> hibernate-validator/blob/master/osgi/integrationtest/
> src/test/java/org/hibernate/validator/osgi/integrationtest/
> OsgiIntegrationTest.java. I have experimented with using context class
> loaders, as per the test case, in the hope that this might fix it, but it
> doesn't seem to.
>
> Can anyone confirm whether hibernate works on 4.1.1, and if so, what I'm
> doing wrong? I'm hoping 

Re: Why can I not satisfy "(&(osgi.extender=osgi.component)(version>=1.3.0)(!(version>=2.0.0)))"

2017-06-14 Thread Achim Nierbeck
Hi Tom,

also, how does your bnd "project" look like,
my gut feeling tells me right now, it might be because of duplicate bundles
installed via std. Karaf and bnd-tools,
may this be an issue?

regards, Achim


2017-06-14 10:08 GMT+02:00 Jean-Baptiste Onofré :

> Hi,
>
> Can you share your sample project ?
>
> Thanks,
> Regards
> JB
>
>
> On 06/14/2017 09:18 AM, t...@quarendon.net wrote:
>
>> I'm trying to build a custom karaf distribution using the maven
>> karaf-assembly packaging type.
>>
>> My latest issue is that the build fails with
>>
>> missing requirement osgi.extender; filter:="(&(osgi.extender=osgi
>> .component)(version>=1.3.0)(!(version>=2.0.0)))"
>>
>> I interpret this as meaning the bundle uses DS and therefore I need
>> apache.felix.scr.
>>
>> If I don't add my bundle in, the build works, and when I start up the
>> resulting karaf, feature:list shows that scr is installed and started.
>> "bundle:headers mvn:org.apache.felix/org.apache.felix.scr/2.0.10" shows:
>>
>> Provide-Capability =
>>  osgi.extender;uses:=org.osgi.service.component;osgi.extende
>> r=osgi.component;version:Version=1.3
>>
>> So I appear to have that capability don't I?
>>
>> So why does the build apparently fail in that way?
>>
>> My POM has:
>> 
>>  
>>  org.apache.karaf.features
>>  framework
>>  ${karafVersion}
>>  kar
>>  
>>  
>>  org.apache.karaf.features
>>  standard
>>  ${karafVersion}
>>  features
>>  xml
>> compile
>>  
>>
>> and then:
>>
>>  
>>  org.apache.karaf.tooling
>>  karaf-maven-plugin
>>  4.1.1
>>  true
>>  
>>  
>>  wrapper
>>  
>>  
>>  eventadmin
>>  
>>  
>>  standard
>>  webconsole
>>  http-whiteboard
>>  scr
>>  prereqs
>>  
>>  1.8
>>  
>>  
>>
>>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: org.ops4j.pax.url.wrap/2.5.2 missing org.slf4j package?

2017-06-13 Thread Achim Nierbeck
Thank good for Karaf features, I don't actually have to "FIX" a bundle
(like re-invent the world a second time) [1]
I just need to make sure the feature declares a capability that a bundle
"should" have, though
I've to admit that those requirements added by bnd is actually more
hindering then helpful.

regards, Achim

[1] -
https://github.com/ops4j/org.ops4j.pax.web/commit/72935c741bf76fc2397253d3cba4f9a9b712cee8


2017-06-13 23:16 GMT+02:00 :

> > the easiest would be to actually remove that "new" requirement for those
> > components.
> > A fix for this is on it's way for Pax Web, so you'll have something
> that'll
> > work for you.
>
> Sorry Achim, you'll need to spell that out. What is that you'd fix? Create
> a pax-web bundle that contains and exports the javax.servlet packages?
>
> Thanks in advance of the fix though.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: org.ops4j.pax.url.wrap/2.5.2 missing org.slf4j package?

2017-06-13 Thread Achim Nierbeck
Tom,

the easiest would be to actually remove that "new" requirement for those
components.
A fix for this is on it's way for Pax Web, so you'll have something that'll
work for you.

regards, Achim


2017-06-13 19:40 GMT+02:00 :

>
> I'm trying to build a custom karaf distribution with the "karaf-assembly"
> maven packaging.
> I am making slow progress :-)
>
> My latest issue comes about through trying to resolve lack of a
> javax.servlet package requirement.
> So I naively included the org.apache.felix:org.apache.felix.http.servlet-api
> bundle as a dependency of the feature I'm including in my assembly. This is
> what we normally use in development in bndtools, but we normally use apache
> felix HTTP rather than pax-web generally.
>
> As soon as I do that I get an odd build failure:
> Unable to resolve org.ops4j.pax.url.wrap/2.5.2: missing requirement
> [org.ops4j.pax.url.wrap/2.5.2] osgi.wiring.package; filter:="(&(osgi.wiring.
> package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))"]
>
> If I remove org.apache.felix.http.servlet-api it builds, and I can run
> the resulting karaf. My karaf shell fu isn't that great, but feature:list
> shows me that "wrap" is "started", and
>   bundle:info mvn:org.ops4j.pax.url/pax-url-wrap/2.5.2/jar/uber
> shows me that it imports the org.slf4j package. I don't know how to find
> out where it resolves that from from the shell, but the web console shows
> me:
>
> Imported Packages
> org.slf4j,version=1.7.25 from org.ops4j.pax.logging.pax-logging-api (5)
> org.slf4j,version=1.6.6 from org.ops4j.pax.logging.pax-logging-api (5)
> org.slf4j,version=1.5.11 from org.ops4j.pax.logging.pax-logging-api (5)
> org.slf4j,version=1.4.3 from org.ops4j.pax.logging.pax-logging-api (5)
>
> So I don't understand why I'm suddenly getting a resolution failure for
> slf4j from pax.url.wrap.
>
> I also don't understand why including 
> org.apache.felix:org.apache.felix.http.servlet-api
> suddenly causes this, nothing in the manifest for it would appear to
> indicate a need for it. All it is is a simple bundle that contains and
> exports the javax.servlet api.
>
> To sidestep the the question, how *should* I resolve the requirement for
> javax.servlet package? There doesn't seem to be a pax-web bundle that I can
> find that provides the javax.servlet package.
>
> Thanks (again).
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Understanding features and dependencies

2017-06-13 Thread Achim Nierbeck
Regarding the capabilities,

both.
It's determined by A) the bundles manifest entry. But in certain cases
those bundles don't explicit describe their capabilities fully.
In those cases it helps if the feature itself does describe that
capability.

regards, Achim


2017-06-13 13:55 GMT+02:00 Stephen Kitt :

> Hi Jean-Baptiste,
>
> On Tue, 13 Jun 2017 10:41:26 +0200
> Jean-Baptiste Onofré  wrote:
> > I think there's two questions:
> >
> > 1. Why does a refresh happen ?
> > A refresh can happen for instance when an optional import is resolved
> > (when installing a feature or a bundle) or when a new package version
> > is installed matching a version range.
> > So, especially in the case of optional import, you should check the
> > import of your bundle.
>
> OK, thanks.
>
> > 2. Why does your bundle not able to refresh ?
> > That's probably the most important. Maybe, you keep the bundle
> > context as member of a class and so it becomes invalid after the
> > refresh.
>
> That’s possible in some cases. Our main issue is that some of our
> bundles maintain state and don’t really like being stopped and started
> (in particular, our persistence bundles and our clustering bundles).
>
> > Before dealing with dependency or prerequisite, I would start to
> > address those points.
> >
> > The dependency flag is not a "complete" inner feature, so it's normal
> > that the feature is not installed if another one already provides the
> > corresponding capabilities.
>
> OK. Are capabilities here determined by explicit 
> declarations in the feature XML, or are they based on bundle manifest
> declarations?
>
> Regards,
>
> Stephen
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Exception starting karaf custom distro "minimal example" from docs

2017-06-13 Thread Achim Nierbeck
regarding your "maven" confidence ... do you happen to have a "Proxy"
connected to your maven setup?
In rare cases, or flaky internet connections your bundles might not have
been a jar at all, but a http error code ;)
This happens in rare cases.
Best to do a mvn clean install -U for updating all dependencies.

regards, Achim


2017-06-13 15:26 GMT+02:00 :

> > On 13 June 2017 at 12:32 Jean-Baptiste Onofré  wrote:
> >
> >
> > I don't understand why you have the pax-web feature.
> >
> > Do you have it defined in bootFeatures ? Or do you install it by hand ?
> >
> > I can confirm that I don't have pax-web feature on my custom distro.
>
> So I created a completely fresh directory, deleted the contents of my .m2
> maven repository cache, created a pom.xml file with your example contents
> in, and ran "mvn clean install".
>
> I ran target/assembly/bin/karaf.bat.
> feature:list then lists pax-http as "started".
>
> Interestingly though I have no exceptions in the log file.
>
> Well that's interesting.
> Worryingly, deleting my .m2 directory contents seems to have altered the
> behaviour. Going back to my original example, it now works closer to how I
> would expect.
> I admit my knowledge of Maven is low, but it's a cache isn't it?
> Re-downloading the dependencies ought not to have changed anything? That
> worries me.
>
> The good news is that this seems to have fixed things. I no longer have
> odd exceptions in the log.
>
> Confidence in Karaf has increased, confidence in maven lowered!
> Thanks for the help.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: missing requirement osgi.contract=JavaServlet

2017-06-12 Thread Achim Nierbeck
You are right, pax-web should provide you with that,
please open an issue for it at https://ops4j1.jira.com/projects/PAXWEB
if you don't have an account, give me a ping I'll create that one for you.

till this point in time, I wasn't even aware of that possible contract,
that's why it's missing.


regards, Achim



2017-06-12 14:48 GMT+02:00 :

> OK, I've "solved" this by creating an additional bundle that simply has
> the required:
>
> Provide-Capability: osgi.contract;osgi.contract=JavaServlet;version:Vers
>  ion="3.1";uses:="javax.servlet,javax.servlet.http,javax.servlet.descrip
>  tor,javax.servlet.annotation"
>
> line in the MANIFEST.
>
> I say "solved", the karaf assmembly now at least builds. I have yet to
> determine how successfully it actually runs.
>
> However, this seems like a gross hack to me. Shouldn't the pax-web
> http-api bundle provide this capability?
>
> Thanks.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: missing requirement osgi.contract=JavaServlet

2017-06-12 Thread Achim Nierbeck
Ok ... that's new, and when did that happen?
Which package is supposed to provide that?
And why do we now need another re-package package of the already available
servlet api package?

That's one of those moments I really can see why people say OSGi makes
everything far to complex ...

regards, Achim


2017-06-12 14:43 GMT+02:00 Tim Ward <tim.w...@paremus.com>:

> Requiring the JavaServlet contract is a good idea, and recommended by the
> OSGi Alliance (https://www.osgi.org/portable-java-contract-definitions/).
> You need a bundle which provides the contract in your runtime. I'd suggest
> using the repackaged servlet api from Apache Felix.
>
> Tim
>
> Sent from my iPhone
>
> On 12 Jun 2017, at 13:39, Achim Nierbeck <bcanh...@googlemail.com> wrote:
>
> taken from your first mail,
> your bundle mybundle seems  to declare an osgi contract on JavaServlet.
> Never seen that kind of dependency before.
> Make sure you have a clean import-package export-package structure in your
> bundle.
> I think that is your root issue.
>
> regarding using pax-web instead of felix-http. Both provide the http
> service according to the spec.
> So you should be safe on that :)
>
> regards, Achim
>
>
> 2017-06-12 14:10 GMT+02:00 <t...@quarendon.net>:
>
>> With regard to the "wrap/0.0.0" error, running Maven with -X gives me:
>>
>> Caused by: 
>> org.apache.karaf.features.internal.service.Deployer$CircularPrerequisiteException:
>> [wrap/0.0.0]
>> at org.apache.karaf.features.internal.service.Deployer.deploy(
>> Deployer.java:266)
>> at org.apache.karaf.profile.assembly.Builder.resolve(Builder.
>> java:1429)
>> at org.apache.karaf.profile.assembly.Builder.startupStage(Build
>> er.java:1183)
>> at org.apache.karaf.profile.assembly.Builder.doGenerateAssembly
>> (Builder.java:659)
>> at org.apache.karaf.profile.assembly.Builder.generateAssembly(
>> Builder.java:441)
>> at org.apache.karaf.tooling.AssemblyMojo.doExecute(AssemblyMojo
>> .java:506)
>> at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.
>> java:262)
>> ... 22 more
>>
>>
>> Suggesting a circular dependency issue somewhere, though quite where, who
>> knows. There are one or two references to "pax-url-wrap" in the -X output,
>> but that's all there is that mentions "wrap" at any point.
>>
>> Don't know whether that helps?
>>
>
>
>
> --
>
> 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: missing requirement osgi.contract=JavaServlet

2017-06-12 Thread Achim Nierbeck
taken from your first mail,
your bundle mybundle seems  to declare an osgi contract on JavaServlet.
Never seen that kind of dependency before.
Make sure you have a clean import-package export-package structure in your
bundle.
I think that is your root issue.

regarding using pax-web instead of felix-http. Both provide the http
service according to the spec.
So you should be safe on that :)

regards, Achim


2017-06-12 14:10 GMT+02:00 :

> With regard to the "wrap/0.0.0" error, running Maven with -X gives me:
>
> Caused by: 
> org.apache.karaf.features.internal.service.Deployer$CircularPrerequisiteException:
> [wrap/0.0.0]
> at org.apache.karaf.features.internal.service.Deployer.
> deploy(Deployer.java:266)
> at org.apache.karaf.profile.assembly.Builder.resolve(
> Builder.java:1429)
> at org.apache.karaf.profile.assembly.Builder.startupStage(
> Builder.java:1183)
> at org.apache.karaf.profile.assembly.Builder.
> doGenerateAssembly(Builder.java:659)
> at org.apache.karaf.profile.assembly.Builder.
> generateAssembly(Builder.java:441)
> at org.apache.karaf.tooling.AssemblyMojo.doExecute(
> AssemblyMojo.java:506)
> at org.apache.karaf.tooling.AssemblyMojo.execute(
> AssemblyMojo.java:262)
> ... 22 more
>
>
> Suggesting a circular dependency issue somewhere, though quite where, who
> knows. There are one or two references to "pax-url-wrap" in the -X output,
> but that's all there is that mentions "wrap" at any point.
>
> Don't know whether that helps?
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: PaxExam test using hibernate validator can't find validator

2017-06-05 Thread Achim Nierbeck
hmm ...
is it possible for you to show us your feature file?
Or maybe it's possible for you to start writing a simpler example that also
fails.
I doubt there is something wrong on Karaf or Pax Exam.

With a simple example it might be easier for us to show you where the
crucial step is.

regards, Achim


2017-06-05 21:42 GMT+02:00 KARR, DAVID <dk0...@att.com>:

> Ok, I guess I’ve resolved my package resolution issues.  I finally
> realized that "hibernate-validator-osgi-features" is not a feature id,
> but simply the “name” property in the “features” element in the
> features.xml file.  When I changed my feature reference to
> “hibernate-validator” (you may have been trying to tell me this), that got
> past package resolution.
>
>
>
> Unfortunately, I’m now back to the original problem that led me to try
> tweaking the feature references, which is this:
>
>
>
> Unable to create a Configuration, because no Bean Validation provider
> could be found. Add a provider like Hibernate Validator (RI) to your
> classpath.
>
>
>
> The feature references were definitely wrong before, but there must be
> something else wrong now after fixing the feature references.
>
>
>
> I tried changing the “LogLevel” in my PaxExam configuration from WARNING
> to DEBUG.  This gave me a lot more information, but I don’t know if it’s
> useful.  Is there some other karaf config that might be relevant here?
>
>
>
> *From:* Achim Nierbeck [mailto:bcanh...@googlemail.com]
> *Sent:* Monday, June 05, 2017 11:48 AM
>
> *To:* user@karaf.apache.org
> *Subject:* Re: PaxExam test using hibernate validator can't find validator
>
>
>
> Hi,
>
>
>
> You can extract the resolution chain from that message:
>
>
> org.osgi.service.resolver.ResolutionException: Unable to resolve root:
>
>
>
> missing requirement [root] osgi.identity; osgi.identity=usl-fraudcheck;
> type=karaf.feature; version="[2.5.0.SNAPSHOT,2.5.0.SNAPSHOT]";
> filter:="(&(osgi.identity=usl-fraudcheck)(type=karaf.
> feature)(version>=2.5.0.SNAPSHOT)(version<=2.5.0.SNAPSHOT))"
>
>
>
> means that this feature can't be resolve because -->
>
>
>
> [caused by: Unable to resolve usl-fraudcheck/2.5.0.SNAPSHOT:
>
>
>
>
>
> a missing requirement:
>
> missing requirement [usl-fraudcheck/2.5.0.SNAPSHOT] osgi.identity;
> osgi.identity=com.att.detsusl.usl-fraudcheck-api; type=osgi.bundle;
> version="[2.5.0.SNAPSHOT,2.5.0.SNAPSHOT]"; resolution:=mandatory
>
>
>
> the bundle com.att.detsusl.usl-fraudcheck-api in version 2.5.0-SNAPSHOT
> can't be resolved
>
> [caused by: Unable to resolve com.att.detsusl.usl-
> fraudcheck-api/2.5.0.SNAPSHOT:
>
>
>
> beacause of a missing requirement:
>
>
>
> missing requirement [com.att.detsusl.usl-fraudcheck-api/2.5.0.SNAPSHOT]
>
>
>
> a package -->
>
> osgi.wiring.package; filter:="(&(osgi.wiring.package=
>
>
>
>
>
> javax.validation)(version>=1.1.0)(!(version>=2.0.0)))"]]
>
>
>
> in version greater 1.1.0 and less then 2.0.0
>
>
>
>
>
> regarding
>
>
>
> Note that usl-fraudcheck-impl is the module that this features file is
> contained within (this seems odd, but I didn’t write this). Also note that
> the “usl-fraudcheck-api” module does NOT have a features file, which seems
> wrong to me.
>
>
>
> I fear you misunderstand the difference between a feature file and
> bundles.
>
>
>
> First of all a bundle is a jar with OSGi Manifest entries declaring
> Package-Imports and Package Exports.
>
> Package-Imports are such "requirements"
>
> For example your
>
> com.att.detsusl.usl-fraudcheck-api
>
> declares an Import Package requirement, or better an osgi.wiring.package
> requirement for
>
> a package javax.validation in a specific version range.
>
> In that case it needs to be at least 1.1.0 but not any higher then 2.0.0.
>
>
>
> A feature file is something used in the context of Karaf, it's not part of
> any OSGi spec. Such feature files usually declare how to
>
> install an application consistent of more then one bundle in a go.
>
> So in your case that would be the usl-fraudcheck part of your application.
>
>
>
> From your saying I take that your sub-modules aren't cleanly separated so
> it seems like your usl-fraudcheck-impl maven module not only contains the
> implementation bundle for the api but also a feature file.
>
> From a maven POV this is a bad thing, as you usually have one module for
> one artifact.
>
> Instead of that I would try to create a separate submodule for the karaf
> feature.
>
&

Re: PaxExam test using hibernate validator can't find validator

2017-06-05 Thread Achim Nierbeck
gt; I’ve mentioned earlier references the “hibernate-validator-osgi-features”
> feature (hopefully the correct name now).  The first features file also has
> the following two bundle references:
>
> 
> mvn:com.att.detsusl/usl-fraudcheck-api/${pom.version}
>
>
> mvn:com.att.detsusl/usl-fraudcheck-impl/${pom.
> version}
>
>
>
> Note that usl-fraudcheck-impl is the module that this features file is
> contained within (this seems odd, but I didn’t write this). Also note that
> the “usl-fraudcheck-api” module does NOT have a features file, which seems
> wrong to me.
>
>
>
> *From:* Achim Nierbeck [mailto:bcanh...@googlemail.com]
> *Sent:* Monday, June 05, 2017 10:52 AM
>
> *To:* user@karaf.apache.org
> *Subject:* Re: PaxExam test using hibernate validator can't find validator
>
>
>
> Hi,
>
>
>
> I'm not sure I follow.
>
> in the feature file I only see one feature which matches your criteria ...
> it's:
>
> hibernate-validator
>
>
>
> see also this file:
> https://repo1.maven.org/maven2/org/hibernate/hibernate-validator-osgi-
> karaf-features/5.4.1.Final/hibernate-validator-osgi-
> karaf-features-5.4.1.Final-features.xml
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__repo1.maven.org_maven2_org_hibernate_hibernate-2Dvalidator-2Dosgi-2Dkaraf-2Dfeatures_5.4.1.Final_hibernate-2Dvalidator-2Dosgi-2Dkaraf-2Dfeatures-2D5.4.1.Final-2Dfeatures.xml=DwMFaQ=LFYZ-o9_HUMeMTSQicvjIg=OsTemSXEn-xy2uk0vYF_EA=zZb2lymjKyVkZw87YbecB_Hy4INOm4PQUutcdFxTFzw=PGdpdzVRN8c5pV9ASiGYH9Cb1WRVtjdTEd7TETl5jpQ=>
>
>
>
> So I don't understand where you got that name from: hibernate-validator-
> osgi-karaf-features
>
>
>
> that is only the name of the feature file, which doesn't mean the main
> feature of that file needs to be the same :)
>
> regards, Achim
>
>
>
>
>
> 2017-06-05 19:22 GMT+02:00 KARR, DAVID <dk0...@att.com>:
>
> Ok, makes sense, but it still isn’t quite there yet.
>
>
>
> In the features file in a module called “usl-base”, I added the following
> repository definition next to a couple of existing ones:
>
> mvn:org.hibernate/hibernate-validator-osgi-
> karaf-features/5.4.1.Final/xml/features
>
>
>
> In the “usl-base” feature in that features file, I added the following
> reference:
>
> hibernate-validator-
> osgi-karaf-features
>
>
>
> Looking at the actual features file that is referenced here, I noticed
> that I had some redundant bundle references in this features file, so I
> removed them (“hibernate-validator”, “classmate”, et cetera).
>
>
>
> I then installed this features file, and then reran my test, and the karaf
> startup failed with this:
>
> org.osgi.service.resolver.ResolutionException: Unable to resolve root:
> missing requirement [root] osgi.identity; osgi.identity=usl-fraudcheck;
> type=karaf.feature; version="[2.5.0.SNAPSHOT,2.5.0.SNAPSHOT]";
> filter:="(&(osgi.identity=usl-fraudcheck)(type=karaf.
> feature)(version>=2.5.0.SNAPSHOT)(version<=2.5.0.SNAPSHOT))" [caused by:
> Unable to resolve usl-fraudcheck/2.5.0.SNAPSHOT: missing requirement
> [usl-fraudcheck/2.5.0.
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__2.5.0.=DwMFaQ=LFYZ-o9_HUMeMTSQicvjIg=OsTemSXEn-xy2uk0vYF_EA=zZb2lymjKyVkZw87YbecB_Hy4INOm4PQUutcdFxTFzw=EKd8wFOOOGPMtVLSUVCjnrqceDzQ5sY7l9OlqwUkFh0=>
> SNAPSHOT] osgi.identity; osgi.identity=usl-base; type=karaf.feature
> [caused by: Unable to resolve usl-base/2.5.0.SNAPSHOT: missing requirement
> [usl-base/2.5.0.SNAPSHOT] osgi.identity; 
> osgi.identity=hibernate-validator-osgi-karaf-features;
> type=karaf.feature]]
>
>
>
> The “usl-fraudcheck” feature is the feature in the module with my test,
> which references the “usl-base” feature.  So, it seems that it couldn’t
> find the “hibernate-validator-osgi-karaf-features” feature.
>
>
>
> I then verified that the following file exists:
>
> ~/.m2/repository/org/hibernate/hibernate-validator-osgi-karaf-features/
> 5.4.1.
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__5.4.1.=DwMFaQ=LFYZ-o9_HUMeMTSQicvjIg=OsTemSXEn-xy2uk0vYF_EA=zZb2lymjKyVkZw87YbecB_Hy4INOm4PQUutcdFxTFzw=7eedWhkpbVoFuObejraXLkglQbtUnuBHNez1qyOUdVQ=>
> Final/hibernate-validator-osgi-karaf-features-5.4.1.Final-features.xml
>
>
>
> However, I found it curious that it begins with the following content:
>
> 
>
> 
>
> http://karaf.apache.org/xmlns/features/v1.4.0
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__karaf.apache.org_xmlns_features_v1.4.0=DwMFaQ=LFYZ-o9_HUMeMTSQicvjIg=OsTemSXEn-xy2uk0vYF_EA=zZb2lymjKyVkZw87YbecB_Hy4INOm4PQUutcdFxTFzw=5galb2ITF6lsXAjDEH6EnhU

Re: PaxExam test using hibernate validator can't find validator

2017-06-05 Thread Achim Nierbeck
hmm ... to me this artifact:

org.hibernate:hibernate-validator-osgi-karaf-features

doesn't sound like a bundle but more like a feature.

and according to this[1], it is a feature file.
So make sure you reference the "hibernate-validator" feature in your own
feature file.

if you want to define a dependency to another feature file from your own.
make sure to have a repo definition:

mvn:org.hibernate/hibernate-validator-osgi-karaf-features/5.4.1.Final/xml/features


regards, Achim

[1] -
http://search.maven.org/#artifactdetails%7Corg.hibernate%7Chibernate-validator-osgi-karaf-features%7C5.4.1.Final%7Cpom
[2] -
https://repo1.maven.org/maven2/org/hibernate/hibernate-validator-osgi-karaf-features/5.4.1.Final/hibernate-validator-osgi-karaf-features-5.4.1.Final-features.xml

2017-06-05 17:37 GMT+02:00 KARR, DAVID :

> I'm working on a codebase that builds a bunch of OSGi modules, and deploys
> to karaf.
>
> I'm attempting to implement javax.validation using Hibernate Validator.  I
> was able to get the correct Maven artifacts in order for my plain unit
> tests to work.
>
> However, when I ran my PaxExam integration test, it fails with:
>
> "Unable to create a Configuration, because no Bean Validation provider
> could be found. Add a provider like Hibernate Validator (RI) to your
> classpath."
>
> After some research, I determined that I needed to use the
> "hibernate-validator-osgi-karaf-features" artifact.  However, this just
> gives me a new error:
>
> "Could not find artifact org.hibernate:hibernate-
> validator-osgi-karaf-features:jar:5.4.1.Final in central (
> http://repo1.maven.org/maven2/)"
>
> Here is an excerpt of a "features.xml" file inside the definition of a
> feature that is dependent feature of the main feature in the module where
> my integration test is:
> 
> wrap:mvn:javax.validation/validation-
> api/1.1.0.Final$Bundle-Name=javax.validationBundle-
> SymbolicName=javax.validationBundle-Version=1.1.0.Final
> mvn:org.hibernate/hibernate-validator/5.4.1.Final
> wrap:mvn:org.hibernate/hibernate-validator-
> osgi-karaf-features/5.4.1.Final$Bundle-Name=hibernate-
> validator-osgi-karaf-featuresBundle-SymbolicName=
> hibernate-validator-osgi-karaf-featuresBundle-
> Version=5.4.1.Final
> 
>
> I'm guessing that part of my problem is that this is a POM artifact, not a
> JAR artifact, but I don't know what to do here.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Weird behaviour when uninstalling feature with fragment

2017-05-29 Thread Achim Nierbeck
Hi Steinar ...

Not sure, but at first glance this reminds me of a system.exit somewhere in
the code.
May it be that something in your code fires this on a "change" or Bundle
stop?
But maybe a lib your using might fire this in case of an "error".

regards, Achim

2017-05-29 21:19 GMT+02:00 Steinar Bang :

> > Steinar Bang :
>
> > When I followed your instructions, and:
> >  - Created a maven module that rebundled the liquibase-slf4j jar into an
> >OSGi bundle fragment (as outlined in your gist)
> >  - Modified the feature.xml file as outlined in the quoted file above
> >(the start levels are important)
>
> It works: ie. the feature installs, and liquibase output ends up in
> karaf.log.
>
> However, when I uninstall the feature containing the fragment, karaf
> itself shuts down.
>
> Has anyone else seen something similar?
> Is this expected behaviour of fragments?
>
> If I remove the liquibase-slf4j-osgi fragment OSGi bundle from the
> feature, then liquibase output ends up on the karaf console, but there
> are no strange side effects from uninstalling the feature.
>
> Here's karaf.log output from the shutdown that happens caused by feature
> uninstall (the unexpected stuff is from "2017-05-28T23:30:02,177"
> ("FelixShutdown"):
>
> 2017-05-28T23:30:01,840 | INFO  | pipe-feature:install
> ukelonn-db-derby-test | FeaturesServiceImpl  | 9 -
> org.apache.karaf.features.core - 4.1.1 | Removing features:
> feature:ukelonn-db-derby-test/[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]
> 2017-05-28T23:30:02,040 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 | Changes to
> perform:
> 2017-05-28T23:30:02,040 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |   Region: root
> 2017-05-28T23:30:02,041 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 | Bundles to
> uninstall:
> 2017-05-28T23:30:02,041 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  derby/10.11.101.1616546
> 2017-05-28T23:30:02,041 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.api/1.0.0.SNAPSHOT
> 2017-05-28T23:30:02,041 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.db.liquibase/1.0.0.SNAPSHOT
> 2017-05-28T23:30:02,041 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.db.test/1.0.0.SNAPSHOT
> 2017-05-28T23:30:02,041 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  no.priv.bang.ukelonn.rebundled.liquibase-slf4j-osgi/2.0.0
> 2017-05-28T23:30:02,042 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.liquibase.core/3.5.3
> 2017-05-28T23:30:02,042 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.base.spi/1.5.0
> 2017-05-28T23:30:02,042 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.pax.jdbc/1.0.1
> 2017-05-28T23:30:02,042 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.pax.jdbc.derby/1.0.1
> 2017-05-28T23:30:02,042 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.osgi.service.jdbc/1.0.0.201505202023
> 2017-05-28T23:30:02,042 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.yaml.snakeyaml/1.17.0
> 2017-05-28T23:30:02,043 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 | Stopping bundles:
> 2017-05-28T23:30:02,045 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.yaml.snakeyaml/1.17.0
> 2017-05-28T23:30:02,046 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.osgi.service.jdbc/1.0.0.201505202023
> 2017-05-28T23:30:02,046 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.pax.jdbc/1.0.1
> 2017-05-28T23:30:02,049 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.ops4j.base.spi/1.5.0
> 2017-05-28T23:30:02,049 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
> | 9 - org.apache.karaf.features.core - 4.1.1 |
>  org.liquibase.core/3.5.3
> 2017-05-28T23:30:02,050 | INFO  | pool-3-thread-1  | FeaturesServiceImpl
>   

Re: Standard Webapp unable to locate blueprint .xml

2017-04-30 Thread Achim Nierbeck
Either way is fine with samples.
I'm not sure we have enough web samples in Karaf,
usually all samples are directed to Pax-Web as it's the actual
implementation of the Web-Container.

regards, Achim


2017-04-28 10:55 GMT+02:00 smunro :

> Ok,
>
> turns out that I was missing something rather obvious. Our pom file already
> has a copy-resources maven goal setup, which targets webapp/build
> (generated
> angular content is placed here by another plugin). So anything above this
> level was not being placed into the WAR file. I just added another
>  entry to copy /src/main/resources to copy over
> OSGI-INF/blueprint/rest.xml and everything is working as expected :)
>
> In addition, I removed the bundle activator.
>
> Thanks for helping me out with this one, sorry it turned out to be a minor
> thing, but at least I'm confident there is nothing wrong with Karaf or the
> maven plugin when using WAR types.
>
> I still think it would be good to do a simple example of the above, which
> I'm happy to do. I can either contribute that to your list of samples or
> link it to my own github.
>
> Stephen
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Standard-Webapp-unable-to-locate-blueprint-xml-tp4050233p4050278.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Simply Protect HTTP servlet

2017-04-29 Thread Achim Nierbeck
Hi Christiano,

you could try with a servlet filter, though since you already have a
Web-ContextPath you are actually already using the WAB approach.
With Pax-Web the file-extension actually doesn't matter. So if you just add
a web.xml to it you should be safe to use the default jaas mechanism
provided by karaf and pax-web/jetty at that point.

regards, Achim


2017-04-29 9:17 GMT+02:00 Cristiano Costantini <
cristiano.costant...@gmail.com>:

> Hello Jean-Baptiste an thank you for the reply!
>
> your approach would be great as I just need the quickest way to protect
> the access with a username and password.
>
> The problem is that the application is not a WAR, it is just a bundle with
> the  that publish  HTML/Javascript/CSS resources plus a
> Servlet registered via spring.xml with  interface="javax.servlet.http.HttpServlet" ref="myServlet"> so I don't
> have a web.xml
>
> For the moment I will try to enable http basic auth for the urls by
> changing the main karaf's jetty.xml file, this is ok to satisfy my short
> term needs.
>
> If you have in mind any idea to enable security-constraint from within
> the bundle (without touching the karaf's jetty.xml) when you don't have a
> web.xml, I'll be glad to know it as I would prefer not to touch the
> configuration of karaf.
>
> Thank you
> Cristiano
>
>
> Il giorno sab 29 apr 2017 alle ore 06:54 Jean-Baptiste Onofré <
> j...@nanthrax.net> ha scritto:
>
>> Hi Cristiano,
>>
>> It depends if you want to use leverage the authentication/authorization to
>> access to a pattern/url or if you want to use JAAS internally to your
>> application with a subject.
>>
>> Basically, imagine you have your servlet where you defined the pattern to
>> /foo
>> (via the service properties if you use the http-whiteboard for instance).
>>
>> Then, you can define the security constraint in jetty.xml or in your
>> configuration.
>>
>> If you package as a war, you can use a web.xml similar to:
>>
>> 
>> http://java.sun.com/xml/ns/javaee;
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;>
>>  cristiano_application
>>  
>>  index.jsp
>>  
>>  
>>  authenticated
>>  
>>  All files
>>  
>>  /*
>>  
>>  
>>  
>>  user
>>  
>>  
>>  
>>  BASIC
>>  karaf
>>  
>>  
>>  
>>  user
>>  
>> 
>>
>> Then, the access to any servlet (/*) in your application will be secure
>> using
>> the karaf JAAS realm.
>>
>> Regards
>> JB
>>
>> On 04/28/2017 12:58 PM, Cristiano Costantini wrote:
>> > Hello All,
>> >
>> > How can I implement a Basic HTTP Authentication similar to the one use
>> by Karaf
>> > WebConsole (which I understand uses Jaas) to protect access to HTTP
>> resources in
>> > Karaf?
>> >
>> > thanks
>> > Cristiano
>>
>> --
>> Jean-Baptiste Onofré
>> jbono...@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: going from karaf 4.0.9 to 4.1.1 broken logging

2017-04-26 Thread Achim Nierbeck
Hi,

yeah I've already filed a bug for that in pax exam.
I think this is due to the fact that Karaf 4.1.x uses the log4j2 backend
instead of the log4j backend it previously used.

regards, Achim

[1] - https://ops4j1.jira.com/browse/PAXEXAM-815

2017-04-26 15:27 GMT+02:00 nino martinez wael 
:

> Sorry for the weird subject.. In my pax exam tests I no longer have
> logging when going from 4.0.9 to 4.1.1
>
> karafDistributionConfiguration().frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf")
> .type("zip").version("4.0.9"))
> .unpackDirectory(new File("target/paxexam/unpack/"))
> ,CoreOptions.systemTimeout(36),
> configureConsole().ignoreLocalConsole(),
> logLevel(LogLevel.DEBUG),
>
>
> something seems off..
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Standard Webapp unable to locate blueprint .xml

2017-04-25 Thread Achim Nierbeck
Hi,

here's one that uses blueprint to register servlets, though no WAB [1].
another one I have using cxf rest is also a non WAB bundle [2].
For a WAB with blueprint I'd need to create a sample first. That'll take
some time though :)

regards, Achim


[1] -
https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/whiteboard-blueprint
[2] -
https://github.com/ANierbeck/Karaf-Microservices/tree/master/service-proxy

2017-04-25 13:23 GMT+02:00 smunro :

> Thanks for the swift reply and the information.
>
> Sadly, I tried as you suggested and removed the activator and it's
> definition in the maven plugin. Even after changing my type to JAR. I still
> had the missing configuration error.
>
> What I did in the past was simply created a standard OSGI bundle with no
> web
> components i.e no WEB-INF folder. This allowed my REST server to work fine,
> but I was asked to have it working with the web osgi bundle.
>
> Again, I consistently get the same "missing configuration" error. Late on,
> I'll download the karaf source and see what exactly is causing getResource
> problems.
>
> I don't suppose you know of any examples lingering around that are standard
> WAB bundles with a blueprint definition? I've had a look around, and not
> really found much. What I did find added several additional bundles
> confused
> matters further.
>
> At the moment, I'm just trying to hard code the cxf rest server in the
> activator class and register end points to see if that works, but
> personally, I'd rather have declaration control over these things hence the
> usage of blueprint.
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Standard-Webapp-unable-to-locate-blueprint-xml-tp4050233p4050248.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Standard Webapp unable to locate blueprint .xml

2017-04-25 Thread Achim Nierbeck
Hi,

I'm not sure if the blueprint extender does have an issue with WAR types,
but if changing it to JAR fixes your issue.
Then go for using JARs ;)

regards, Achim


2017-04-24 22:10 GMT+02:00 smunro :

> Looking at this further, the getResources method in the code seems unable
> to
> find a "configuration" for whatever blueprint file name I use (I've tried
> renaming the file and the error will use what ever name I give it).
>
> Is there an underlying problem with using the WAR type with blueprint or am
> I missing something in my configuration?
>
> As mentioned, I can get the cx-jaxrs code working fine in a normal JAR
> bundle, It's only when I try to integrate it into a WAR type bundle.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Standard-Webapp-unable-to-locate-blueprint-xml-tp4050233p4050240.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Standard Webapp unable to locate web.xml

2017-04-25 Thread Achim Nierbeck
Hi,

first of all make sure to either only depend on an activator or on
blueprint, it's something you shouldn't mix.
If a JAR works for you, just stick to the jar, the actual zip file
extension name isn't much of a concern.
The Web-ContextPath element in the manifest is what makes it a WAB, nothing
else ;)
After that Pax-Web tries to find the appropriate web.xml and other stuff
making a war (or just Servlet3 annotated servlets)

regards, Achim

2017-04-24 16:46 GMT+02:00 smunro :

> Hello,
>
> I realise this topic has been raised in the past for an older version of
> karaf, but even after following the steps in that advice given, I am still
> unable to get past karaf throwing a FileNotFoundException.
>
> Essentially, I have a run-of-the-mill angular web app and some noddy
> servlets, which I want to eliminate with jaxrs. I followed the guide to
> doing this, creating a OSGI-INF in src/main/resources and defining a
> rest.xml blueprint file.
>
> The maven plugin in the pom looks as follows:
>
> 
> 
>
> war
> 
> 
> <_wab>src/main/resources
> /demo
>
> .,WEB-INF/classes,{maven-dependencies} Bundle-ClassPath>
>
>
> demonamespace.Activator
> 
> 
>
> When starting the bundle, I get:
> 2017-04-24 15:21:27,091 | ERROR | nsole user karaf | BlueprintContainerImpl
> | 12 - org.apache.aries.blueprint.core - 1.7.1 | Unable to start blueprint
> container for bundle com.smartergridsolutions.sgs-ui.client/0.0.1.SNAPSHOT
> java.io.FileNotFoundException: Unable to find configuration file for
> WEB-INF/OSGI-INF/blueprint/rest.xml
> at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.getResources(
> BlueprintContainerImpl.java:454)[12:org.apache.aries.blueprint.core:1.7.1]
>
> I've tried the same in a standard JAR osgi bundle and it works perfectly,
> so
> obviously it's an issue with paths. As said, a previous post on this forum
> indicated that a <_wab> entry was needed, but this does not seem to have
> worked. If it helps, I've included the header's from the generated war in
> my
> .m2 folder:
>
> Bundle-Name: Demo
> Bundle-Version: 0.0.1.SNAPSHOT
> Bundle-ClassPath: .,WEB-INF/classes
> Bundle-Activator: demonamespace.Activator
> Web-ContextPath: /demo
> Bundle-Blueprint: OSGI-INF/blueprint/rest.xml
> Created-By: Apache Maven Bundle Plugin
> Build-Jdk: 1.8.0_73
>
> Any suggestions or advice would be useful. I've burned up half a day
> perusing google and trying different things to get it working. I'll I've
> managed to do is get it working when not running it as a WAR type. In
> addition, even if someone has some good examples to look at, that too would
> be great.
>
> Thanks,
> Stephen
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Standard-Webapp-unable-to-locate-web-xml-tp4050233.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Trying to use "mvn karaf:run"

2017-04-21 Thread Achim Nierbeck
Hmm


Sounds a bit Over designed to me.
How about building your own custom distribution based on the feature?
Now your user just need to unpack the distribution and run Karaf add it is
with bin/Karaf

Regards, Achim



Steinar Bang  schrieb am Fr. 21. Apr. 2017 um 18:26:

> I'm trying to use "mvn karaf:run" to replace the old "mvn
> pax:provision" config I used to have.
>
> I used "mvn pax:provision" before I took the leap into using karaf, and
> I continued to have it working so that people could have a quick way to
> use my webapp without installing anything more than git, java and maven:
>   git clone https://github.com/steinarb/ukelonn.git
>   cd ukelonn
>   git checkout using-vaadin
>   mvn -P use-gogoshell install
>   cd ukelonn.gogoshell
>   mvn install pax:provision
> and then open a browser on  http://localhost:8090/ukelonn/ while the
> maven command is running.
>
> However, when I went to karaf 4.1.1 I decided to just rip out the
> pax:provision stuff: manually resolving the OSGi dependencies, was too
> much work for something I don't actually use myself.
>
> So I looked into "mvn karaf:run" to see if that would work for me, and
> unfortunately it doesn't.
>
> As far as I can tell, "mvn karaf:run" is intended to run a single bundle
> from a project with bundle...?
>
> https://github.com/apache/karaf/blob/master/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/RunMojo.java
>
>
> That won't work for me:
>  1. The bundle I tried on, ie. the main bundle, has
> war so even if it could run solo, it wouldn't
> work
>
> https://github.com/steinarb/ukelonn/blob/master/ukelonn.bundle/pom.xml
> the starting fails here:
>
> https://github.com/apache/karaf/blob/master/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/RunMojo.java#L141
>
>  2. The bundle can't run solo, it needs the api bundle
>  https://github.com/steinarb/ukelonn/blob/master/ukelonn.api/pom.xml
> and it needs the test database bundle
>
> https://github.com/steinarb/ukelonn/blob/master/ukelonn.bundle.test.db/pom.xml
>
> What would have worked for me would be to be able to specify a feature
> repository, and then what features to install from that repository
> (loading all required dependencies in the normal karaf way).
>
> Basically I would liked to be able to specify the same things I do in
> the karaf container based pax exam test:
>
> https://github.com/steinarb/ukelonn/blob/master/ukelonn.tests/src/test/java/no/priv/bang/ukelonn/tests/UkelonnServiceIntegrationTest.java#L57
> (I add the ukelonn repo and then load the database feature and the
> webapp feature, loading the dependencies in the processs)
>
> Is there a way to use the karaf:run goal that I haven't found?
> Is there a different karaf:* goal that can be used in the manner
> described above?
>
> Thanks!
>
> --

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Is there a recent pax exam karaf provisioning example somewhere?

2017-04-16 Thread Achim Nierbeck
Did you also reference the pax-jdbc feature in your feature file?
You'll need to declare that dependency to be installed.

regards, Achim


2017-04-15 19:39 GMT+02:00 Steinar Bang :

> > You wrote:
>
> > For now, I will go back to the surefire config (it saves me the job of
> > manually killing the leftover java processes, and gets further before
> > it fails).
>
> Summary: The surefire "0" config didn't work, and
> the leftover Java VM is a problem with surefire 2.19 and later
>
> With the surefire "0" config in place, the test
> failed much earlier, before the karaf runtime was even ready to start:
>  [WARNING] useSystemClassloader setting has no effect when not forking
>  Running no.priv.bang.ukelonn.tests.UkelonnServiceIntegrationTest
>  SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
>  SLF4J: Defaulting to no-operation (NOP) logger implementation
>  SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
> further details.
>  Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.132 sec
> <<< FAILURE! - in no.priv.bang.ukelonn.tests.UkelonnServiceIntegrationTest
>  no.priv.bang.ukelonn.tests.UkelonnServiceIntegrationTest  Time elapsed:
> 0.123 sec  <<< ERROR!
>  java.lang.RuntimeException: Problem starting container
>  Caused by: java.net.MalformedURLException: unknown protocol: mvn
>
>  no.priv.bang.ukelonn.tests.UkelonnServiceIntegrationTest  Time elapsed:
> 0.132 sec  <<< ERROR!
>  java.lang.NullPointerException
>  at org.apache.maven.surefire.junit4.JUnit4Provider.execute(
> JUnit4Provider.java:367)
>  at org.apache.maven.surefire.junit4.JUnit4Provider.
> executeWithRerun(JUnit4Provider.java:274)
>  at org.apache.maven.surefire.junit4.JUnit4Provider.
> executeTestSet(JUnit4Provider.java:238)
>  at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(
> JUnit4Provider.java:161)
>
> The leftover Java VM is a surefire issue.  It is an issue both with
> surefire 2.19.1 that I was running, and the current surefire 2.20.
>  http://maven.40175.n5.nabble.com/surefire-forked-vm-failed-
> tp5858900p5859320.html
>
> However, leftover VM isn't an issue with surefire 2.18, so I've
> downgraded to surefire 2.18.
>
> Now I'm back to the issue of why the pax-jdbc feature isn't found:
>  1. It's found in a regular karaf instance
>  2. It didn't help specifying the feature repository containing the
> feature pax-jdbc in my feature file
>
> All and any ideas are welcome!
>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Is there a recent pax exam karaf provisioning example somewhere?

2017-04-15 Thread Achim Nierbeck
totally different ;)

if you are brave, you may want to take a look at the pax-web integration
tests with Karaf. [1]
Maybe there are enough hints for you to find out where exactly is your
mismatch :)

regards, Achim

[1] -
https://github.com/ops4j/org.ops4j.pax.web/tree/master/pax-web-itest/pax-web-itest-karaf/src/test/java/org/ops4j/pax/web/itest/karaf

2017-04-15 16:00 GMT+02:00 Steinar Bang <s...@dod.no>:

> >>>>> Achim Nierbeck <bcanh...@googlemail.com>:
>
> > the karaf container is always a forked process. If you want to run it as
> > non-forked you can use the following configuration:
>
> > runEmbedded(true)
>
> > this is especially useful if you want to debug your tests, but beware
> > because of the nature of how the tests run, this can only be used with
> > debugging and one test-method.
>
> Right.
>
> In the meantime I've found this thread
>  http://karaf.922171.n3.nabble.com/Pax-exam-tests-fail-to-
> start-properly-with-Karaf-4-0-4-tp4044841p4044843.html
>
> and have applied the same cure:
> 
>  org.apache.maven.plugins
>  maven-surefire-plugin
>  
>   0
>  
> 
>
> And that works... that is: it still doesn't start, but at least there
> isn't a Java VM still running after the test has failed.
>
> Does this the trigger the same behaviour as the runEmbedded(true)
> configuration? Or is that a competely different mechanism?
>
>


-- 

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: Is there a recent pax exam karaf provisioning example somewhere?

2017-04-15 Thread Achim Nierbeck
And it might be that this is an issue on your windows box, cause I rarely
have this kind of behavior on a mac.

regards, Achim

2017-04-15 15:55 GMT+02:00 Achim Nierbeck <bcanh...@googlemail.com>:

> Hi,
>
> the karaf container is always a forked process. If you want to run it as
> non-forked you can use the following configuration:
>
> runEmbedded(true)
>
> this is especially useful if you want to debug your tests, but beware
> because of the nature of how the tests run, this can only be used with
> debugging and one test-method.
>
> regards, Achim
>
>
> 2017-04-15 14:57 GMT+02:00 Steinar Bang <s...@dod.no>:
>
>> >>>>> Steinar Bang <s...@dod.no>:
>>
>> > There is this output at the end of the "mvn clean install":
>> > [ERROR] Failed to execute goal 
>> > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test
>> (default-test) on project ukelonn.tests: Execution default-test of goal
>> org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The
>> forked VM terminated without properly saying goodbye. VM crash or
>> System.exit called?
>> > [ERROR] Command was cmd.exe /X /C ""C:\Program
>> Files\Java\jdk1.8.0_121\jre\bin\java" -jar C:\Users\sbang\workspaces\ws06
>> \ukelonn\ukelonn.tests\target\surefire\surefirebooter5197692333401719291.jar
>> C:\Users\sbang\workspaces\ws06\ukelonn\ukelonn.tests\target\
>> surefire\surefire8860295739440543272tmp C:\Users\sbang\workspaces\ws06
>> \ukelonn\ukelonn.tests\target\surefire\surefire_05835872688929628334tmp"
>>
>> > Obviously maven thinks the process has terminated.  Just as obviously
>> > there is still a java process running (that prevents delete of the
>> > target\exam directory structure).
>>
>> The documentation says "With the Forked Container, the system under test
>> runs in a separate Java virtual machine under remote control from the
>> test driver."
>>  https://ops4j1.jira.com/wiki/display/PAXEXAM4/Pax+Exam
>>
>> How do I figure out whether I'm running a "forked container" or not?
>>
>> Is the mentioned "forked VM" in the rror message that has terminated,
>> the VM actually running the tests? (ie. the single VM started in a
>> "non-forked container" (or whatever it is called)...?).
>>
>> Or is the "forked VM" of the error message the front end that forks yet
>> another VM to do the job, and it's this second VM that is left running?
>> (ie. the "forked VM" of the error message is a VM started by maven
>> surefire, and this VM runs a "forked container" that starts yet another
>> VM where karaf is started and tests are run)
>>
>>
>
>
> --
>
> 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: Is there a recent pax exam karaf provisioning example somewhere?

2017-04-15 Thread Achim Nierbeck
Hi,

the karaf container is always a forked process. If you want to run it as
non-forked you can use the following configuration:

runEmbedded(true)

this is especially useful if you want to debug your tests, but beware
because of the nature of how the tests run, this can only be used with
debugging and one test-method.

regards, Achim


2017-04-15 14:57 GMT+02:00 Steinar Bang :

> > Steinar Bang :
>
> > There is this output at the end of the "mvn clean install":
> > [ERROR] Failed to execute goal org.apache.maven.plugins:
> maven-surefire-plugin:2.19.1:test (default-test) on project
> ukelonn.tests: Execution default-test of goal org.apache.maven.plugins:
> maven-surefire-plugin:2.19.1:test failed: The forked VM terminated
> without properly saying goodbye. VM crash or System.exit called?
> > [ERROR] Command was cmd.exe /X /C ""C:\Program
> Files\Java\jdk1.8.0_121\jre\bin\java" -jar C:\Users\sbang\workspaces\
> ws06\ukelonn\ukelonn.tests\target\surefire\surefirebooter5197692333401719291.jar
> C:\Users\sbang\workspaces\ws06\ukelonn\ukelonn.tests\target\surefire\surefire8860295739440543272tmp
> C:\Users\sbang\workspaces\ws06\ukelonn\ukelonn.tests\
> target\surefire\surefire_05835872688929628334tmp"
>
> > Obviously maven thinks the process has terminated.  Just as obviously
> > there is still a java process running (that prevents delete of the
> > target\exam directory structure).
>
> The documentation says "With the Forked Container, the system under test
> runs in a separate Java virtual machine under remote control from the
> test driver."
>  https://ops4j1.jira.com/wiki/display/PAXEXAM4/Pax+Exam
>
> How do I figure out whether I'm running a "forked container" or not?
>
> Is the mentioned "forked VM" in the rror message that has terminated,
> the VM actually running the tests? (ie. the single VM started in a
> "non-forked container" (or whatever it is called)...?).
>
> Or is the "forked VM" of the error message the front end that forks yet
> another VM to do the job, and it's this second VM that is left running?
> (ie. the "forked VM" of the error message is a VM started by maven
> surefire, and this VM runs a "forked container" that starts yet another
> VM where karaf is started and tests are run)
>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Is there a recent pax exam karaf provisioning example somewhere?

2017-04-14 Thread Achim Nierbeck
Hi Steinar,

it depends on what you want to test.

ignoreLocalConsole can safely be enabled, it will produce much less noise
on your log for your unit test.

for a full list of configuration options, take a look at the Pax Exam
documentation [1].


regards, Achim

[1] - https://ops4j1.jira.com/wiki/display/PAXEXAM4/Pax+Exam

2017-04-14 18:44 GMT+02:00 Steinar Bang :

> > Zoran Regvart :
>
> > I've done a couple of tests in this repository, perhaps that would be
> > of use to you:
>
> > https://github.com/zregvart/fuse-credential-store/tree/
> master/fuse-credential-store-karaf-parent/fuse-credential-
> store-karaf-itests
>
> Thanks! Looking at them now. :-)
>
> What's the ignoreLocalConsole() option? Switching off output to the
> local console? (I don't think I want that)
>
> (I assume the ignoreRemoteShell() option switches off the ssh server,
> and that's OK)
>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Blueprint and Pax-Web

2017-04-05 Thread Achim Nierbeck
Hi,

glad you found a solution.
But I think what you actually should be using is more like what is in this
sample/integration-test [1]
Registering a Servlet in one Bundle and re-using a filter from another
bundle
This is handled by a shared context.
In your case you just need a resource servlet, which can also be done with
DS (reduces the footprint compared to blueprint) [2]
and combine it with the filter in a shared context.

regards, Achim


[1] -
https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-itest/pax-web-itest-container/pax-web-itest-container-jetty/src/test/java/org/ops4j/pax/web/itest/jetty/SharedContextFilterIntegrationTest.java
[2] -
https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/whiteboard-ds/src/main/java/org/ops4j/pax/web/samples/whiteboard/ds/WhiteboardResource.java

2017-04-05 14:52 GMT+02:00 Castor :

> I got it!
>
> For future references if someone needs to solve the same problem, i solved
> it retrieving the OSGI service inside the filter using JNDI, it worked like
> a charm.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Blueprint-and-Pax-Web-tp4050033p4050040.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: bundle:watch

2017-04-04 Thread Achim Nierbeck
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

2017-04-04 Thread Achim Nierbeck
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  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Best Practices for Web application published by Karaf

2017-03-30 Thread Achim Nierbeck
Hi,

the Web-ContextPath is a OSGi Header and actually marks a WAR :D
Therefore what Christian just provided is a nice way of using the default
Servlet (Resource-Servlet) to use for static resources.

Another way is to use the following:

@Component(
service = {Object.class, WhiteboardResource.class}, //
WhiteboardResource only for testing
property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PATTERN +
"=/resources",
HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PREFIX +
"=/www"
}
)
public class WhiteboardResource {
}

details can also be found here: [1]

Or use a Servlet3 annotated Servlet and register it also as a WAB (use the
Web-ContextPath as OSGi header) [2]

@WebServlet(name = "helloWorld", urlPatterns = {"/hello"})
public class HelloWorld extends HttpServlet {
}


Something I haven't tried yet, but which I think could work is to combine
DS and the Servlet3 Annotation:

@Component(service = Servlet.class)
@WebServlet(name = "helloWorld", urlPatterns = {"/hello"})
public class HelloWorld extends HttpServlet {
}


regards, Achim


[1] -
https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/whiteboard-ds/src/main/java/org/ops4j/pax/web/samples/whiteboard/ds/WhiteboardResource.java#L22-L28
[2] -
https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/helloworld-servlet3/src/main/java/org/ops4j/web/samples/helloworld/servlet3/internal/HelloWorld.java#L27-L53

2017-03-30 11:54 GMT+02:00 Christian Schneider :

> I know Web-ContextPath is implemented by pax-web but I do not know if it
> is part of a standard. I am sure Achim knows this.
>
> Christian
>
> 2017-03-30 11:34 GMT+02:00 Cristiano Costantini <
> cristiano.costant...@gmail.com>:
>
>> Hi All and thank you for your support,
>> the solution suggested by Christian seems to me the simplest at the
>> moment.
>>
>> Where can I find more documentation on how "Web-ContextPath" works?
>> Do "Web-ContextPath" is an OSGi header or is it a Karaf specific header?
>> does it is implemented using some  some sub-project (i.e. Pax Web) ?
>>
>> thank you,
>> Cristiano
>>
>>
>>
>>
>> Il giorno mer 29 mar 2017 alle ore 12:12 Christian Schneider <
>> ch...@die-schneider.net> ha scritto:
>>
>>> I used this approach for a small angular UI:
>>> https://github.com/cschneider/Karaf-Tutorial/tree/master/tas
>>> klist-blueprint-cdi/angular-ui
>>>
>>> I just added Web-ContextPath to the Manifest and used the
>>> src/main/resources to deploy the static files.
>>> Web-ContextPath: /tasklist
>>>
>>> Christian
>>>
>>> 2017-03-29 11:10 GMT+02:00 Cristiano Costantini <
>>> cristiano.costant...@gmail.com>:
>>>
>>> Hello all,
>>>
>>> which the best practices to publish a web application from
>>> Karaf currently in 2017?
>>>
>>> I know that it exists the WebContainer (https://karaf.apache.org/manu
>>> al/latest/webcontainer) which supports both publishing of WABs or WARs
>>> to Karaf.
>>>
>>> I however see different approaches, used in conjunction with Javascript
>>> frameworks like Angular or Polymer, where the server side logic is reduced
>>> to REST services (no JSP required) which rely simply on the OSGi HTTP
>>> service to serve HTML and JS files.
>>>
>>> (one example, I stumbled onto the Openmuc project, it has an Angular
>>> application,  https://github.com/gythialy/o
>>> penmuc/tree/master/projects/webui/base, which is published by a regular
>>> bundle, its web files are inside the src/main/resource folder - note: this
>>> is a bundle running on felix, does not need karaf).
>>>
>>> I like the second kind of approach and it seems to me more suitable for
>>> JS framework like Polymer which I am studying right now. Also, I've tried
>>> the first approach but it was hard to make it work in Karaf the server side
>>> dependencies we had, so as today, we run our application on a standalone
>>> jetty or glassfish container.
>>>
>>> To go back to my initial question, what kind of approach do you
>>> recommend?
>>> Are there any recent sample or well made open source project or any
>>> maven archetype to use as starting point reference?
>>>
>>> I would like to hear also personal opinions :-)
>>>
>>> Thank you very much!
>>> Cristiano
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Christian Schneider
>>> http://www.liquid-reality.de
>>> 
>>>
>>> Open Source Architect
>>> http://www.talend.com
>>> 
>>>
>>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
> 
>
> Open Source Architect
> http://www.talend.com
> 
>



-- 

Apache Member
Apache Karaf 

Re: Best Practices for Web application published by Karaf

2017-03-29 Thread Achim Nierbeck
Hi Cristiano,

as with any Web Container, you can use any approach you like.
Actually you have much more approaches you can use.

For example if you just want a JS/REST frontend, register your REST servlet
as a Servlet Service, Pax Web will pick it up.
That's the Whiteboard approach. As with Karaf 4.1.x and Pax Web 6.x you
have not only the Pax-Web Whiteboard Extension mechanism, but also the
OSGi spec compliant one. So you don't end up in a "vendor" lock in.
Another approach is to actually just register your annotated servlet as
Service, with that you have the least OSGi "overhead".

So actually the webcontainer of Pax Web isn't only about WARs and WABs.

BTW. you can also register JSPs etc. via the Whiteboard Approach, but that
is a Pax Web speciality ;)

regards, Achim





2017-03-29 11:10 GMT+02:00 Cristiano Costantini <
cristiano.costant...@gmail.com>:

> Hello all,
>
> which the best practices to publish a web application from Karaf currently
> in 2017?
>
> I know that it exists the WebContainer (https://karaf.apache.org/
> manual/latest/webcontainer) which supports both publishing of WABs or
> WARs to Karaf.
>
> I however see different approaches, used in conjunction with Javascript
> frameworks like Angular or Polymer, where the server side logic is reduced
> to REST services (no JSP required) which rely simply on the OSGi HTTP
> service to serve HTML and JS files.
>
> (one example, I stumbled onto the Openmuc project, it has an Angular
> application,  https://github.com/gythialy/openmuc/tree/master/projects/
> webui/base, which is published by a regular bundle, its web files are
> inside the src/main/resource folder - note: this is a bundle running on
> felix, does not need karaf).
>
> I like the second kind of approach and it seems to me more suitable for JS
> framework like Polymer which I am studying right now. Also, I've tried the
> first approach but it was hard to make it work in Karaf the server side
> dependencies we had, so as today, we run our application on a standalone
> jetty or glassfish container.
>
> To go back to my initial question, what kind of approach do you recommend?
> Are there any recent sample or well made open source project or any maven
> archetype to use as starting point reference?
>
> I would like to hear also personal opinions :-)
>
> Thank you very much!
> Cristiano
>
>
>
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Is anybody using Jetty client from Karaf?

2017-03-24 Thread Achim Nierbeck
Hi Scott,

with Pax Web we use the Jetty client for testing Pax Web itself.
Might want to take a look at the integration tests of Pax Web.

regards, Achim


2017-03-24 6:03 GMT+01:00 Jean-Baptiste Onofré :

> Hi Scott,
>
> I tested Jetty client without problem. Do you have an test case ?
>
> Regards
> JB
>
> On 03/23/2017 09:20 PM, Leschke, Scott wrote:
>
>> /Sent this about 1.5 weeks ago. Thought I’d resend one more time just in
>> case
>> there’s somebody out there using this./
>>
>> / /
>>
>> *From:* Leschke, Scott [mailto:slesc...@medline.com]
>> *Sent:* Monday, March 13, 2017 11:52 AM
>> *To:* user@karaf.apache.org
>> *Subject:* Jetty client
>>
>>
>>
>> I’m curious if anybody is using the Jetty HTTP client from Karaf (v 4.0.8)
>> successfully. I would like to move from using Apache to Jetty but I get a
>> runtime NPE from Jetty.  I tried it with both the 9.3.16 and 9.4.2
>> versions of
>> the client with the exact same results.
>>
>>
>>
>> The following Jetty bundles were required.
>>
>>
>>
>> Jetty-client-9.3.16v…….
>>
>> Jetty-http-9.3.16v…….
>>
>> Jetty-io-9.3.16v…….
>>
>> Jetty-util-9.3.16v…….
>>
>>
>>
>> Scott Leschke
>>
>>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Run goal of karaf-maven-plugin does not configure the endorsed folders

2017-03-09 Thread Achim Nierbeck
Hi,

don't know if this will help you,
but as Pax-Exam does have a Karaf launcher, the sources might help you on
finding a solution [1]

regards, Achim

[1] -
https://github.com/ops4j/org.ops4j.pax.exam2/blob/master/containers/pax-exam-container-karaf/src/main/java/org/ops4j/pax/exam/karaf/container/internal/KarafTestContainer.java#L200-L202

2017-03-09 18:46 GMT+01:00 ivoleitao :

> Hello again,
>
> I think we have a much harder problem in here. I think I have to give up
> from this for now or make a completely new plugin. I've added the
> java.library.path
> also as a system property but it does not work also. I've came to the
> conclusion by looking at the karaf launcher that we need the boot classpath
> also and I don't now how to setup up that in an already launched vm. I
> dont' think that is even possible :-S
>
> I'm refering to this:
>
> setupClassPath() {
> # Add the jars in the lib dir
> for file in "${KARAF_HOME}"/lib/boot/*.jar
> do
> if [ -z "${CLASSPATH}" ]; then
> CLASSPATH="${file}"
> else
> CLASSPATH="${CLASSPATH}:${file}"
> fi
> done
> }
>
>
>
>
> On 9 March 2017 at 16:56, ivoleitao [via Karaf] <
> ml-node+s922171n4049819...@n3.nabble.com> wrote:
>
> > Hello,
> >
> > Thankyou. I've tried to correct this issue with the following code:
> >
> > private static final String JAVA_ENDORSED_DIRS =
> > "java.endorsed.dirs";
> > private static final String JAVA_EXT_DIRS = "java.ext.dirs";
> >
> > 
> >
> > String endorsedDirs = System.getProperty(JAVA_
> ENDORSED_DIRS,
> > "");
> > if (endorsedDirs != null && endorsedDirs.trim().length()
> >
> > 0) {
> > endorsedDirs += ":";
> > }
> > endorsedDirs += karafDirectory.getAbsolutePath() +
> > "/lib/endorsed";
> >
> > String extDirs = System.getProperty(JAVA_EXT_DIRS, "");
> > if (extDirs != null && extDirs.trim().length() > 0) {
> > extDirs += ":";
> > }
> > extDirs += karafDirectory.getAbsolutePath() +
> "/lib/ext";
> >
> > getLog().info("Setting system properties");
> > System.setProperty(JAVA_ENDORSED_DIRS, endorsedDirs);
> > System.setProperty(JAVA_EXT_DIRS, extDirs);
> >
> > But I'm still having the same error. When I launch from the command line
> > it works. I must be missing some additional stuff...
> > Any ideia what could be ?
> >
> > --
> > If you reply to this email, your message will be added to the discussion
> > below:
> > http://karaf.922171.n3.nabble.com/Run-goal-of-karaf-maven-
> > plugin-does-not-configure-the-endorsed-folders-tp4049794p4049819.html
> > To start a new topic under Karaf - User, email
> > ml-node+s922171n930749...@n3.nabble.com
> > To unsubscribe from Karaf - User, click here
> >  unsubscribe_by_code=930749=SXZvLmxlaXRhb0BnbWFpbC5jb218OT
> MwNzQ5fDU3MDgwNzUzMw==>
> > .
> > NAML
> >  viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.
> BasicNamespace-nabble.view.web.template.NabbleNamespace-
> nabble.view.web.template.NodeNamespace=
> notify_subscribers%21nabble%3Aemail.naml-instant_emails%
> 21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
> >
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Run-goal-of-karaf-maven-plugin-does-not-configure-the-
> endorsed-folders-tp4049794p4049820.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Multiple bundles dependencies injection (pax-cdi or blueprint)

2017-03-06 Thread Achim Nierbeck
Hi,

just some comments from the peanut gallery :-)

If you just want to wire services between different bundles, stick with DS.
If you also want to have the full Context and Dependency injection stuff
within your own bundle, for example some inner bundle bean wiring.
In that case go with Pax-CDI.
If you want to have servlets combined with services sometimes DS is enough.
If you want to have a full-blown WAR with lot's of different stuff in it,
Pax-CDI might be the solution, to reference external services.

So this solely depends on the use-case and how good you are in cutting
dependencies.

regards, Achim



2017-03-06 11:04 GMT+01:00 erwan :

> Hello,
> I'm new to osgi world (coming from a JEE bck) and trying to use pax-cdi at
> first to manage injection.
> I have 3 bundles
> Bundle A declares an interface:
> /package com.eg;
> public interface Itf {
> public void PrintITf();
>
> }/
>
> with Manifest generation using maven:
> com.eg*
>
>
> Bundle B implements this interface:
> /package com.eg.impl;
> public class ItfImpl implements Itf {
>
> public void PrintIFy() {
> System.out.println("Hello");
> }
> }/
>
> 
> com.eg*,*
> 
>
> Bundle C is trying to inject Itf (as it can be done using JEE):
> /@Inject
> private Itf itf;
> public void setItf(Itf itf) {
> this.itf= itf;
> }
>
> public Use() {
> itf.PrintIFy();
> }/
> 
> com.eg*, com.eg.impl*, *
> 
> 
> osgi.extender;
> filter:="(osgi.extender=pax.cdi)",
> org.ops4j.pax.cdi.extension;
> filter:="(extension=pax-cdi-extension)"
> 
>
> It doesn't seem to work as I always get NullPointerException starting
> bundle
> C.
>
> is this a classical use case in OSGI framework?
> Do you think I should change the way I split these 3 bundles (moving
> interface and implementation in the same bundle)?
>
> I also tried with blueprint without being able to do it as well...
> thanks for your help
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Multiple-bundles-dependencies-injection-pax-
> cdi-or-blueprint-tp4049756.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Deploying config files

2017-02-26 Thread Achim Nierbeck
Hi Kerry,

I'm not sure I follow the "template" logic here.
with the  property you can add any kind of configuration file.
One Use-Case for example is to place the needed jetty.xml file along the
installation of the pax-web feature.
So I'm not sure I see something missing at this point, so please could you
elaborate a bit more on this point, about what you are missing here :-)

regards, Achim


2017-02-26 10:08 GMT+01:00 JT :

> Hi JB,
>
> Thanks for the update. Good to know you are adding that functionality.
>
> One other thing I wondered about. If there is a need to add a
> configuration file as part of a feature, currently the only way to do this
> is to make a 'template' feature file including the  property.
> It would be nice if rather than creating a template, the config file to be
> included could be specified in the karaf tooling plugin. Would that be
> feasible? I don't require that myself right now but would be willing to
> take a look and submit a pull-request if I come up with a solution.
>
> Kerry
>
>
> On 26/02/17 08:47, Jean-Baptiste Onofré wrote:
>
>> Hi Kerry,
>>
>> you can install a cfg file dropping in the etc folder.
>>
>> For a command, I created a Jira some weeks ago about a config:install
>> command. It's already possible using tac| "command" but not obvious.
>>
>> config:install command (and MBean) will be available in 4.0.9 and 4.1.1.
>> You will be able to do:
>>
>> config:install mvn:groupId/artifactId/version/cfg
>>
>> Regards
>> JB
>>
>> On 02/26/2017 08:56 AM, JT wrote:
>>
>>> Hi All,
>>>
>>> I've seen how I can deploy a config file as part of a Karaf 'feature'
>>> using Christian's tutorial
>>> (http://www.liquid-reality.de/display/liquid/2011/09/23/Kara
>>> f+Tutorial+Part+2+-+Using+the+Configuration+Admin+Service?src=contextnav
>>> ).
>>>
>>>
>>> Is it possible to deploy a config file without the need to include in a
>>> features file? i.e. I would like to install it standalone with an
>>> install command such as 'install mvn:/cfg/config'
>>>
>>> many thanks
>>>
>>> Kerry
>>>
>>>
>>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: missing requirement [...] osgi.service; effective:=active; filter:="(objectClass=org.osgi.service.log.LogService)"

2017-02-22 Thread Achim Nierbeck
Actually it's not really a bug in Pax-Logging, as the feature.xml is
provided by Karaf.
And it's easy to fix for us, cause we just need to add this capability to
the feature.xml of the pax-logging feature we have in Karaf.

we just need to add the following snippet to the feature.xml


osgi.service;objectClass=org.osgi.service.log.LogService


regards, Achim


2017-02-22 10:27 GMT+01:00 Christian Schneider :

> As Tim explained your bundle has the requirement for a LogService OSGi
> service in its Manifest. Since I think karaf 4.0.5 requirements for
> services are also checked by the feature service of karaf. In version
> before these requirements were ignored.
>
> The problem now is that not all bundles that provide such services also
> define a capability for them in their Manifest. So while the actually is a
> LogService in karaf that is provided by pax logging this service is not
> announced statically in the Manifest using a Provide-Capability header. So
> in fact this is a bug in pax-logging as it should provide the capability. I
> will take care of an issue and fix at pax logging.
>
> You can fix this quickly by either switching off the functionality of
> karaf to look into service requirements or by providing the capability in
> config.
>
> 1. Edit etc/org.apache.karaf.features.cfg and set
> serviceRequirements=disable
>
> 2. Edit etc/config.properties and a line to
> org.osgi.framework.system.capabilities=
> osgi.service;effective:=active;objectClass=org.osgi.service.log.LogService
>
> The solution 2 wrongly attributes the LogService to the system bundle but
> this should still work.
>
> Christian
>
>
> On 22.02.2017 10:09, Timothy Ward wrote:
>
>> The missing requirement indicates that you need a Log Service
>> implementation (i.e. someone to provide you with the service). The
>> dependency that you’re compiling against is just the API (which is a good
>> thing to compile against) but you actually need an implementation at
>> runtime. Your build tools know that you need this service, and so have
>> added a requirement for the service to your bundle. Your bundle therefore
>> will not resolve until you have installed a bundle which declares that it
>> provides the service!
>>
>> Regards,
>>
>> Tim
>>
>> On 22 Feb 2017, at 09:05, Olivier21 
>>> wrote:
>>>
>>> Hello,
>>>
>>> I developed a SOAP service which is encapsulated in a kar archive. Then,
>>> I
>>> made a custom karaf distribution from Karaf 4.0.4. Everything works fine
>>> (no
>>> error message in the log files and the service works fine).
>>>
>>> The problem is when I try to do the same thing with Karaf 4.0.8, I got
>>> this
>>> message during the deployement :
>>>
>>> missing requirement [...] osgi.service; effective:=active;
>>> filter:="(objectClass=org.osgi.service.log.LogService)"
>>>
>>> How can I inject the service "org.osgi.service.log.LogService"?
>>>
>>> In my class, I have :
>>>
>>> protected LogService logService;
>>>
>>> public void setLogService( final LogService logService )
>>> {
>>> this.logService = logService;
>>> }
>>>
>>>
>>> In the file pom.xml, I have :
>>> 
>>> org.osgi
>>> org.osgi.service.log
>>> 
>>>
>>> Must I use  and if yes, what must be the contain of this
>>> element?
>>>
>>> It seems that the LogService service is not satisfied anymore and it
>>> seems
>>> to be the same problem that is specified here :
>>> http://karaf.922171.n3.nabble.com/VOTE-Apache-Karaf-Containe
>>> r-4-0-6-release-td4047647.html
>>>
>>> Please, could you help me please?
>>>
>>> Olivier
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: http://karaf.922171.n3.nabble.
>>> com/missing-requirement-osgi-service-effective-active-filter
>>> -objectClass-org-osgi-service-log-LogService-tp4049593.html
>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>
>>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Single install Karaf failover configuration using shared disk

2017-02-17 Thread Achim Nierbeck
Hi,

did you take a look at the documentation[1]?
I think that should be enough to run Karaf in a HA - Failover mode :-)
With a Filesystem lock and a certain "start"-level for your bundles that
should be easily configurable between a Cold and a Hot-Stand-By.

regards, Achim

[1] - http://karaf.apache.org/manual/latest/#_ha_failover_and_cluster

2017-02-15 15:05 GMT+01:00 Ed Kilby :

> I'm looking to implement failover (master/slave) for Karaf. Our current
> server setup has two application servers that have a shared SAN disk where
> our current Java applications are installed in a single location and can be
> started on either machine or both machines at the same time.
>
> I was looking to implement Karaf master/slave failover in a similar way
> (one install being shared by both app servers), however I'm not sure that
> this is really a well beaten path and would appreciate some advice on
> whether the alternatives (mentioned below) are significantly better.
>
> *Current idea for failover:*
> Install Karaf once on the shared SAN and setup basic file locking on this
> shared disk.
> Both application servers will effectively initiate the Karaf start script,
> however only one (the first) will fully start (grabbing the lock) and the
> second will remain in standby until it grabs the lock (if the master falls
> over)
>
> The main benefit I can see from this is that I only have to manage
> deploying components to one Karaf installation and I only need to manage
> one Karaf installation.
>
> *Alternatives*:
> We install Karaf in two separate locations on the shared SAN and setup to
> lock to the same lock file.
> Each application server will have their own Karaf instance, thus start
> script to run.
>
> This will make our deployment slightly more complicated (2 Karaf
> installations to manage and deploy to).
>
> I'd be interested if anyone can indicate any specific concerns that they
> have with the current idea.
>
> *Note*: I understand that Karaf-cellar can simplify my Karaf instance
> management, however we would need to undertake another round of PoCs etc..
> to approve our company use of cellar (as a separate product). Something
> that I'd like to migrate to in the future.
>
>
>
> EDW Technology Limited is a company registered in England and Wales with
> company number 3112883 and VAT number 667767961.
>
> Registered office: EDW House, 3 Radian Court, Knowlhill, Milton Keynes,
> MK5 8PJ
>
> [PP-Node-1]
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: K410: Exception caused by Jetty bug

2017-02-17 Thread Achim Nierbeck
Thanks,

will take care of that, the coming weekend.

regards, Achim

2017-02-17 9:52 GMT+01:00 Markus Rathgeb :

> Hi Achim,
>
> I have created the issues:
> * https://ops4j1.jira.com/browse/PAXWEB-1065
> * https://issues.apache.org/jira/browse/KARAF-4990
>
> Best regards,
> Markus
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: K410: Exception caused by Jetty bug

2017-02-17 Thread Achim Nierbeck
Hi,

please open an issue at OPS4j Pax Web for this dependency upgrade, and also
an Issue at Karaf for updating to the next patch level version.
That way we can keep track of it.

regards, Achim


2017-02-16 20:39 GMT+01:00 Markus Rathgeb :

> Hi,
>
> after I changed some stuff to use the recent Karaf 4.1.0 I realized an
> error in my log (see below if you are interested in the whole
> message).
> The error has been cased by a bug in the
> "org.eclipse.jetty.websocket.server" bundle (SPI without no-arg
> constructor).
> The issue has already been reported
> (https://github.com/eclipse/jetty.project/issues/1276).
> It has been resolved in the master branch and in the new 9.3 release
> "9.3.16.v20170120"
> (https://github.com/eclipse/jetty.project/commit/
> a205fb3aae65f9cd6721def40bc5956b04bfa9e4)
> already.
>
> The question I am interested in is, is there any change to see this
> fixed in Karaf 4.1.1
> I assume it is not possible easily as we need first a new release of Pax
> Web.
> And who knows what got broken between jetty-9.3.15.v20161220 and
> jetty-9.3.16.v20170120
>
> So, what do you think about?
>
> Best regards,
> Markus
>
>
>
> ===
> 2017-02-16 20:13:16,994 | ERROR | lixDispatchQueue | publisher
>| 12 - com.eclipsesource.jaxrs.publisher -
> 5.3.1.201602281253 | FrameworkEvent ERROR -
> com.eclipsesource.jaxrs.publisher
> org.osgi.framework.ServiceException: Service factory exception: Unable
> to instantiate class class
> org.eclipse.jetty.websocket.server.WebSocketServerFactory Does it have
> a public no-arg constructor?
> at org.apache.felix.framework.ServiceRegistrationImpl.
> getFactoryUnchecked(ServiceRegistrationImpl.java:352)
> [?:?]
> at org.apache.felix.framework.ServiceRegistrationImpl.getService(
> ServiceRegistrationImpl.java:247)
> [?:?]
> at org.apache.felix.framework.ServiceRegistry.getService(
> ServiceRegistry.java:344)
> [?:?]
> at org.apache.felix.framework.Felix.getService(Felix.java:3699) [?:?]
> at org.apache.felix.framework.BundleContextImpl.getService(
> BundleContextImpl.java:470)
> [?:?]
> at com.eclipsesource.jaxrs.publisher.internal.
> ResourceTracker.addingService(ResourceTracker.java:39)
> [12:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]
> at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(
> ServiceTracker.java:941)
> [?:?]
> at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(
> ServiceTracker.java:870)
> [?:?]
> at org.osgi.util.tracker.AbstractTracked.trackAdding(
> AbstractTracked.java:256)
> [?:?]
> at org.osgi.util.tracker.AbstractTracked.trackInitial(
> AbstractTracked.java:183)
> [?:?]
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
> [?:?]
> at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
> [?:?]
> at com.eclipsesource.jaxrs.publisher.internal.Activator.
> openAllServiceTracker(Activator.java:91)
> [12:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]
> at com.eclipsesource.jaxrs.publisher.internal.Activator.
> start(Activator.java:55)
> [12:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]
> at org.apache.felix.framework.util.SecureAction.
> startActivator(SecureAction.java:697)
> [?:?]
> at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)
> [?:?]
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2144) [?:?]
> at org.apache.felix.framework.Felix.setActiveStartLevel(
> Felix.java:1371)
> [?:?]
> at org.apache.felix.framework.FrameworkStartLevelImpl.run(
> FrameworkStartLevelImpl.java:308)
> [?:?]
> at java.lang.Thread.run(Thread.java:745) [?:?]
> Caused by: java.lang.RuntimeException: Unable to instantiate class
> class org.eclipse.jetty.websocket.server.WebSocketServerFactory Does
> it have a public no-arg constructor?
> at org.apache.aries.spifly.ProviderServiceFactory.getService(
> ProviderServiceFactory.java:37)
> ~[?:?]
> at org.apache.felix.framework.ServiceRegistrationImpl.
> getFactoryUnchecked(ServiceRegistrationImpl.java:347)
> ~[?:?]
> ... 19 more
> Caused by: java.lang.InstantiationException:
> org.eclipse.jetty.websocket.server.WebSocketServerFactory
> at java.lang.Class.newInstance(Class.java:427) ~[?:?]
> at org.apache.aries.spifly.ProviderServiceFactory.getService(
> ProviderServiceFactory.java:35)
> ~[?:?]
> at org.apache.felix.framework.ServiceRegistrationImpl.
> getFactoryUnchecked(ServiceRegistrationImpl.java:347)
> ~[?:?]
> ... 19 more
> Caused by: java.lang.NoSuchMethodException:
> org.eclipse.jetty.websocket.server.WebSocketServerFactory.()
> at java.lang.Class.getConstructor0(Class.java:3082) ~[?:?]
> at java.lang.Class.newInstance(Class.java:412) ~[?:?]
> at org.apache.aries.spifly.ProviderServiceFactory.getService(
> ProviderServiceFactory.java:35)
> ~[?:?]
> at org.apache.felix.framework.ServiceRegistrationImpl.
> 

Re: Tomcat as Karaf WebContainer

2017-01-30 Thread Achim Nierbeck
Hi,

actually you have the choice between three containers by now.
That is Jetty - default
Tomcat - do not use in production
and Undertow - not sure if it's safe to use in production

regards, Achim



2017-01-30 14:24 GMT+01:00 Jean-Baptiste Onofré :

> Hi Svetlin,
>
> Karaf wraps Pax Web. Pax Web 6.x ships Jetty (default for a while), but
> you now also have the choice between jetty and tomcat: it's two different
> features, both providing the same capability.
>
> Regards
> JB
>
>
> On 01/30/2017 02:17 PM, Zarev, Svetlin wrote:
>
>> Hello,
>>
>>
>>
>> In the karaf web container manual [1] it is said that it can use “tomcat
>> like” container, but the “war” feature uses jetty. Is it possible to use
>> tomcat instead of jetty and what should be done to achieve that ?
>>
>>
>>
>> [1] https://karaf.apache.org/manual/latest/webcontainer
>>
>>
>>
>> Best regards,
>>
>> Svetlin
>>
>>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: 4..1.0-SNAPSHOT failing to build

2017-01-21 Thread Achim Nierbeck
Hi,

sometimes the integration tests
a) take a bit long
b) have some blinking tests
to have it run quicker, just use -DskipTests

concerning repositories, it's available from [1]
and if not b) interferes with the build, those snapshots are regularly
build at [2]

regards, Achim

[1] - https://oss.sonatype.org/content/repositories/ops4j-snapshots/
[2] - http://ci.ops4j.org/jenkins/job/org.ops4j.pax.web-6.0.x/




2017-01-21 18:56 GMT+01:00 Dario Amiri :

> Thanks for the update, though it seems like it can't find the
> 6.0.2-SNAPSHOT that you deployed.
>
> [ERROR] Failed to execute goal on project container: Could not resolve
> dependencies for project
> com.trusphere.auth:container:karaf-assembly:2.0.1-SNAPSHOT: Could not
> find artifact
> org.ops4j.pax.web:pax-web-features:xml:features:6.0.2-SNAPSHOT in
> apache.snapshots
> (https://repository.apache.org/content/repositories/snapshots) -> [Help 1]
>
> I'll try building pax-web, I'm not always successful in my attempts to
> build pax-web which is why I would love it if the snapshots were sent to
> some repo on a regular basis.
>
> Thanks,
>
> D
>
>
> On 01/20/2017 10:54 PM, Jean-Baptiste Onofré wrote:
> > Hi,
> >
> > I just deployed a pax-web SNAPSHOT (or you have to build pax-web on
> > your own).
> >
> > For the release, I just finished SMX bundles release that provide
> > updates for 4.1.0 (I'm updating there).
> >
> > I do a last round during the week end and plan to cut the release very
> > soon.
> >
> > Regards
> > JB
> >
> > On 01/21/2017 07:50 AM, Dario Amiri wrote:
> >> Seems like it not has a dependency on pax-web 6.0.2-SNAPSHOT which is
> >> not available from any repo:
> >>
> >> [ERROR] Failed to execute goal on project container: Could not resolve
> >> dependencies for project
> >> com.trusphere.auth:container:karaf-assembly:2.0.1-SNAPSHOT: Could not
> >> find artifact
> >> org.ops4j.pax.web:pax-web-features:xml:features:6.0.2-SNAPSHOT in
> >> apache.snapshots
> >> (https://repository.apache.org/content/repositories/snapshots) ->
> >> [Help 1]
> >>
> >> BTW wany update on a release?
> >>
> >> D
> >>
> >>
> >>
> >>
> >>
> >
>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Levels of Containerization - focus on Docker and Karaf

2017-01-12 Thread Achim Nierbeck
So in the end it looks like Karaf-Boot with profiles, as I tried some long
time ago :)
would be the best match to what I've seen so far in this thread.

The idea I had at the time would be to actually merge those static profiles
with a maven plugin generating the static Karaf assembly via the maven
plugin.
All of the idea-scratch-start stuff can be found at JBs github project.
Haven't had the time to get going on it any further, just been an idea in a
seperate branch at the time:

https://github.com/jbonofre/karaf-boot/tree/profiles/karaf-boot-starters/karaf-boot-starter-web/src/main/resources/META-INF/profiles

regards, Achim

2017-01-12 16:18 GMT+00:00 Nick Baker :

> I do agree that an "opinionated" or "prescriptive" stack would help. It
> shouldn't prohibit the usage of any Karaf feature of course.
>
>
> New users gravitate to full-stack solutions. Agnostic platforms with lots
> of options and no predefined stack, while obviously having many merits and
> longer legs (don't be Wicket), just haven't been winning out in adoption.
> This applies across the spectrum of computing.
>
> --
> *From:* Brad Johnson 
> *Sent:* Thursday, January 12, 2017 10:46:55 AM
> *To:* user@karaf.apache.org
> *Subject:* RE: Levels of Containerization - focus on Docker and Karaf
>
>
> Guillaume,
>
>
>
> I’d mentioned that in an early post as my preferred way to do
> microservices and perhaps a good way of doing a Karaf Boot. I’ve worked
> with the Karaf 4 profiles and they are great.  Also used your CDI OSGi
> service.  If we could use the Karaf 4 profiles with the CDI implementation
> with OSGi services and the Camel Java DSL as a standard stack, it would
> permit focused development and standardized bundle configurations.
>
>
>
> When I created a zip with Karaf, CXF and Camel the footprint was 30MB.
>
>
>
> While having Karaf Boot support DS, Blueprint, CDI, etc. I’m not sure
> that’s the healthiest move to encourage adoption.  We need less
> fragmentation in the OSGi world and not more.  Obviously even if Karaf Boot
> adopts one as the recommended standard it doesn’t mean that the others
> can’t be used.  When reading through Camel documentation on-line, for
> example, the confusion such fragmentation brings is obvious.  One becomes
> adept at converting Java DSL to blueprint or from blueprint to the Java DSL
> in one’s mind.
>
>
>
> The static profiles work great and will let us create a number of
> standardized appliances for a wide variety of topology concerns and not
> just for microservices.  A “switchboard” appliance, for example, might be
> used for orchestrating microservices and managing the APIs.  A “gateway”
> appliance might have standard JAAS, web service configuration and a routing
> mechanism for calling microservices.  An “AB” appliance could be used for
> 80/20 testing.  And so on.  Take the idea of enterprise integration
> patterns and bring it up to enterprise integration patterns using Karaf
> appliances.
>
>
>
> Many appliances might be “sealed”.  An appliance for AB testing, for
> example, would have configuration for two addresses in the configuration
> file and a percentage of traffic going to each.  Non need to actually
> program or re-program the internals any more than we’d usually re-program a
> Camel component.  But the source would be there if one wanted to create a
> new component or modify how an existing one functioned.
>
>
>
> I’d vote for using CDI along with the Camel Java DSL for a couple of
> reasons.  The first would be the standardization and portability of both
> code and skills.  Using CDI would mean that any Glassfish, JBoss, etc.
> developer would feel comfortable using the code.  Using Java Camel DSL
> would be for the same reason.  It would also give a programmer a sense that
> if they give Karaf Boot with the static profiles a shot, they aren’t locked
> in but can easily move to a different stack if necessary.  In a sense this
> is the same reason that Google chose Java language to run on the DVM. It
> tapped into a large existing skillbase instead of trying to get the world
> to adopt and learn a new language.  CDI with OSGi extensions also allows
> developers to use one paradigm for everything from lashing up internal
> dependency injections to working with OSGi services. I believe when you put
> that CDI extension out there you used blueprint style proxies under the
> cover.  As a developer using the CDI OSGi extension it was transparent to
> me.  If you later decided to rework that as a DS service, it would remain
> transparent and very much in the whole spirit of OSGi and its mechanisms
> for allowing refactoring and even rewriting without breaking the world.  It
> also makes unit testing a snap.  Any of us who have wrestled with Camel
> Blueprint Test Support can appreciate that.
>
>
>
> This would also permit for standardization of documentation and of Karaf
> Boot appliance project structures and Maven 

Re: Aw: Re: Shell commands are unavailable #1

2017-01-05 Thread Achim Nierbeck
@Guillaume
look here: https://issues.apache.org/jira/browse/KARAF-4926

:)

regards, Achim

2017-01-06 8:33 GMT+01:00 Guillaume Nodet :

> I found the problem and I have a fix locally.
> Has a jira been raised already ?
>
> 2017-01-06 7:39 GMT+01:00 Jean-Baptiste Onofré :
>
>> That's a good point and actually, it's the real end-user usage of shell
>> (to install the wrapper without starting a Karaf instance).
>>
>> Let me take a look.
>>
>> Thanks,
>> Regards
>> JB
>>
>>
>> On 01/06/2017 07:37 AM, Jens Offenbach wrote:
>>
>>> Ok, I can live with that, but the command "shell wrapper:install
>>> --start-type DEMAND_START" should work or has something been changed?
>>>
>>> Give it a try:
>>> $ shell wrapper:install --start-type DEMAND_START
>>> [org.apache.karaf.shell.impl.console.ConsoleSessionImpl] :
>>> completionMode property is not defined in etc/org.apache.karaf.shell.cfg
>>> file. Using default completion mode.
>>> [org.apache.karaf.shell.support.ShellUtil] : Unknown command entered
>>> org.apache.felix.gogo.runtime.CommandNotFoundException: Command not
>>> found: wrapper:install
>>> at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.jav
>>> a:549)
>>> at org.apache.felix.gogo.runtime.Closure.executeStatement(Closu
>>> re.java:478)
>>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:3
>>> 67)
>>> at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417)
>>> at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229)
>>> at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>> Executor.java:1142)
>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>> lExecutor.java:617)
>>> at java.lang.Thread.run(Thread.java:745)
>>> Command not found: wrapper:install
>>>
>>> Thanks!
>>>
>>>
>>> Gesendet: Freitag, 06. Januar 2017 um 07:32 Uhr
>>> Von: "Jean-Baptiste Onofré" 
>>> An: user@karaf.apache.org
>>> Betreff: Re: Aw: Shell commands are unavailable #1
>>> Hi Jens,
>>>
>>> shell doesn't really start a full Karaf instance, so, it's an expected
>>> behavior IMHO.
>>>
>>> Regards
>>> JB
>>>
>>> On 01/06/2017 06:50 AM, Jens Offenbach wrote:
>>>
 The problem seems to occur only when using the "shell" script from the
 "bin" folder. Using "./start", followed by "./client", the commands
 "system:shutdown" and "logout" are working properly.

 Jens


 Gesendet: Freitag, 06. Januar 2017 um 06:43 Uhr
 Von: "Jens Offenbach" 
 An: user@karaf.apache.org
 Betreff: Shell commands are unavailable
 Hi,
 I am using Apache Karaf 4.1.0-Snapshot and in the current snapshot
 release, there seems to be a problem regarding shell commands. I have
 opened the following issue: https://issues.apache.org/jira
 /browse/KARAF-4926. But things seem to be much more problematic. Even
 the "logout" command is reported as unavailable.

 I am using the last snapshot (apache-karaf-4.1.0-20170105
 <0201%2070105>.165025-279.tar.gz") from the Apache snapshot repository.

 Give it a try:
 $ ./shell
 [org.apache.karaf.shell.impl.console.ConsoleSessionImpl] :
 completionMode property is not defined in etc/org.apache.karaf.shell.cfg
 file. Using default completion mode.
 __ __ 
 / //_/ __ _/ __/
 / ,< / __ `/ ___/ __ `/ /_
 / /| |/ /_/ / / / /_/ / __/
 /_/ |_|\__,_/_/ \__,_/_/

 Apache Karaf (4.1.0-SNAPSHOT)

 Hit '' for a list of available commands
 and '[cmd] --help' for help on a specific command.
 Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.

 karaf@root()> logout
 [org.apache.karaf.shell.support.ShellUtil] : Unknown command entered
 org.apache.felix.gogo.runtime.CommandNotFoundException: Command not
 found: logout
 at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:549)
 at org.apache.felix.gogo.runtime.Closure.executeStatement(Closu
 re.java:478)
 at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:367)
 at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417)
 at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229)
 at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
 Executor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
 lExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)
 Command not found: logout
 karaf@root()> system:shutdown
 [org.apache.karaf.shell.support.ShellUtil] : Unknown command entered
 org.apache.felix.gogo.runtime.CommandNotFoundException: Command 

Re: SCP and SFTP not working

2017-01-05 Thread Achim Nierbeck
oh ... cool :)

2017-01-05 18:03 GMT+01:00 Guillaume Nodet <gno...@apache.org>:

> No, sftp and scp are fully supported by SSHD.
> In 2.2.x, scp seems enabled, but not ftp:
>   https://github.com/apache/karaf/blob/karaf-2.2.x/shell/
> ssh/src/main/resources/OSGI-INF/blueprint/shell-ssh.xml#L86-L92
>
> 3.x has both scp and ftp enabled:
>   https://github.com/apache/karaf/blob/karaf-3.0.x/shell/
> ssh/src/main/resources/OSGI-INF/blueprint/shell-ssh.xml#L103-L120
>
> 2017-01-05 17:37 GMT+01:00 Achim Nierbeck <bcanh...@googlemail.com>:
>
>> Hi,
>>
>> as Karaf uses Apache Mina, for it's SSH server you'll most likely need to
>> take a look if it's even possible.
>> AFAIK it's only a simple SSH server, so no extra functionality like sftp
>> or scp are supported.
>> If you want to have a full-blown SSH server you need to use the operating
>> system supported ones.
>>
>> regards, Achim
>>
>>
>> 2017-01-05 17:25 GMT+01:00 Charles <quadrupolic-...@yahoo.com>:
>>
>>> Hi
>>> I’m trying to verify if I’ve found an issue with the SFTP/SCP server
>>> within Karaf, and in the inherited project Servicemix.  I use Camel to
>>> perform many integrations, storing properties files within the /etc folder.
>>> Ideally I’d like access to the /etc folder within Karaf to allow updates
>>> to the configuration files by my build tooling.
>>> Sadly I’ve not managed to get the SFTP / SCP faciility to work.  I’m
>>> running Servicemix 4.5.3 (Karaf 2.2) on Java 1.6_45, on Windows primarily.
>>> Any attempts to use SFTP via FTP client results in an error, or results in
>>> a folder presented to the client, with a  name that’s actually a date,
>>> which can’t be navigated.
>>> Thinking this may be a platform issue I’ve tried it on later vanilla
>>> Servicemix versions 6.0, 7.0 m2, and Karaf 4.  I’ve tried on those versions
>>> on Linux, and using Java 7 & 8.  No combination results in filesystem
>>> access.
>>> Can anyone confirm this facility works under other Karaf versions or
>>> environments?  Or am I doing something really dumb?
>>> Thanks
>>>
>>
>>
>>
>> --
>>
>> 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
>>
>>
>
>
> --
> 
> Guillaume Nodet
> 
> Red Hat, Open Source Integration
>
> Email: gno...@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.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/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master


Re: SCP and SFTP not working

2017-01-05 Thread Achim Nierbeck
Hi,

as Karaf uses Apache Mina, for it's SSH server you'll most likely need to
take a look if it's even possible.
AFAIK it's only a simple SSH server, so no extra functionality like sftp or
scp are supported.
If you want to have a full-blown SSH server you need to use the operating
system supported ones.

regards, Achim


2017-01-05 17:25 GMT+01:00 Charles :

> Hi
> I’m trying to verify if I’ve found an issue with the SFTP/SCP server
> within Karaf, and in the inherited project Servicemix.  I use Camel to
> perform many integrations, storing properties files within the /etc folder.
> Ideally I’d like access to the /etc folder within Karaf to allow updates
> to the configuration files by my build tooling.
> Sadly I’ve not managed to get the SFTP / SCP faciility to work.  I’m
> running Servicemix 4.5.3 (Karaf 2.2) on Java 1.6_45, on Windows primarily.
> Any attempts to use SFTP via FTP client results in an error, or results in
> a folder presented to the client, with a  name that’s actually a date,
> which can’t be navigated.
> Thinking this may be a platform issue I’ve tried it on later vanilla
> Servicemix versions 6.0, 7.0 m2, and Karaf 4.  I’ve tried on those versions
> on Linux, and using Java 7 & 8.  No combination results in filesystem
> access.
> Can anyone confirm this facility works under other Karaf versions or
> environments?  Or am I doing something really dumb?
> Thanks
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: karaf decanter kibana not start

2016-12-16 Thread Achim Nierbeck
Hi,

yeah, or change the realm name in the jetty.xml used by Pax-Web.

regards, Achim

2016-12-16 11:53 GMT+01:00 Jean-Baptiste Onofré :

> Hi,
>
> For JNA, as I said, it should not be a blocker.
>
> Kibana Decanter expect a Karaf realm. If your realm uses a different name,
> than:
> 1. you have to provide a karaf realm
> or
> 2. you have to update the realm name in web.xml
>
> Regards
> JB
>
>
> On 12/16/2016 11:35 AM, conejo wrote:
>
>> Hi, I've made some progress.
>>
>> For elasticsearch JNA ClassNotFoundException:
>> It's solved adding bundle:install -s mvn:net.java.dev.jna/jna/4.1.0
>>
>> For Kibana security issue: I have modified
>> org.apache.karaf.decanter.kibana-4.x-1.2.0.jar/WEB-INF/web.xml to use my
>> realm (instead of karaf realm) and it works.
>>
>> But I would not like to change the web.xml
>> Any ideas?
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.
>> com/karaf-decanter-kibana-not-start-tp4049028p4049036.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
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Re: Exit a child instance without stopping it

2016-12-12 Thread Achim Nierbeck
Usually the child instances spawn their own process. So you connect to it
via SSH, therefore just disconnect via Ctrl-D as from any other remote
shell.

Regards, Achim

sent from mobile device

Am 13.12.2016 2:59 vorm. schrieb "CodeCola" :

> I am in
>
> karaf@Container2>
>
> How do I exit the Container to return to the
>
> karaf@root>
>
> without stopping the Container2 ?
>
> I don't see an *instance:exit* command ?
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Exit-a-child-instance-without-stopping-it-tp4048991.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>


  1   2   3   4   5   6   7   8   9   10   >