Re: static content apparently not working in Karaf 4.0.4 via jetty config

2016-03-19 Thread Benson Margulies
This is only a problem for errors.


On Wed, Mar 16, 2016 at 8:11 AM, Benson Margulies 
wrote:

> 
>   
> 
>   
> /doc
> 
>class="org.eclipse.jetty.server.handler.ResourceHandler">
> ../../doc
> true
>   
> 
>   
> 
>   
> 
>
> jvm 1| 2016-03-16 08:08:39,183 | WARN  | tp1085327538-940 | Response
>   | 217 - org.eclipse.jetty.util - 9.2.14.v20151106 |
> Committed before 404 null
> jvm 1| 2016-03-16 08:08:39,184 | WARN  | tp1085327538-940 |
> ServletHandler   | 217 - org.eclipse.jetty.util -
> 9.2.14.v20151106 | /doc/index.html
> jvm 1| java.lang.IllegalStateException: Committed
> jvm 1| at
> org.eclipse.jetty.server.Response.resetBuffer(Response.java:1243)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.server.Response.sendError(Response.java:567)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.server.Response.sendError(Response.java:544)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.servlet.ServletHandler$Default404Servlet.doGet(ServletHandler.java:1805)[215:org.eclipse.jetty.servlet:9.2.14.v20151106]
> jvm 1| at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[93:javax.servlet-api:3.1.0]
> jvm 1| at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[93:javax.servlet-api:3.1.0]
> jvm 1| at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[215:org.eclipse.jetty.servlet:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[215:org.eclipse.jetty.servlet:9.2.14.v20151106]
> jvm 1| at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[234:org.ops4j.pax.web.pax-web-jetty:4.2.4]
> jvm 1| at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[213:org.eclipse.jetty.security:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[234:org.ops4j.pax.web.pax-web-jetty:4.2.4]
> jvm 1| at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[215:org.eclipse.jetty.servlet:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:99)[234:org.ops4j.pax.web.pax-web-jetty:4.2.4]
> jvm 1| at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.server.Server.handle(Server.java:499)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[214:org.eclipse.jetty.server:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[206:org.eclipse.jetty.io:9
> .2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[217:org.eclipse.jetty.util:9.2.14.v20151106]
> jvm 1| at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[217:org.eclipse.jetty.util:9.2.14.v20151106]
> jvm 1| at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
> jvm 1| 2016-03
>


Re: Blueprint or DS or what to use?

2016-03-19 Thread Guillaume Nodet
No, there aren't any docs at the moment, and it has not been much used yet.
I haven't had any time to write a karaf feature for it yet ...

The blueprint-spring bundle allows you to use the standard spring namespace
along with spring custom namespaces from blueprint applications.
The blueprint-spring-extender bundle will act as the Spring-DM extender and
create a blueprint application for a spring-dm bundle.

Let me know if you hit any problem, I'd be happy to help you.

2016-03-18 18:17 GMT+01:00 Nick Baker :

> Can you point me to any documentation on this? I found a thread on the
> aries-dev but that's about it. When we abandoned Gemini we lost some of the
> functionality and would be interested in trying this out.
>
>
> http://mail-archives.apache.org/mod_mbox/aries-dev/201511.mbox/%3ccaa66tppfyb33d7m234ddeugxa6dj5jv24m09vv7u77dbjlo...@mail.gmail.com%3E
>
> Thanks!
>
> From: Guillaume Nodet 
> Reply-To: "user@karaf.apache.org" 
> Date: Friday, March 18, 2016 at 8:40 AM
> To: user 
> Subject: Re: Blueprint or DS or what to use?
>
> Fwiw, Aries Blueprint now has almost full support for Spring namespaces
> and Spring-DM bundles, you simply need to deploy blueprint, spring and the
> blueprint-spring + blueprint-spring-extender bundles.
>
> 2016-03-18 11:24 GMT+01:00 akuhtz :
>
>> Hello,
>>
>> I've an application running with spring-dm and because spring-dm is no
>> longer developed I'm looking for a replacement.
>>
>> Now I'm confused because there was a shift in karaf (core) from blueprint
>> to
>> DS and today I saw a post on the dev list, saying that DS does not support
>> as much as blueprint does.
>> As an end-user I would like to know what the proposed way to go is: DS or
>> blueprint, both or what else?
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Blueprint-or-DS-or-what-to-use-tp4045845.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
>
>
> --
> 
> Guillaume Nodet
> 
> Red Hat, Open Source Integration
>
> Email: gno...@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.com/
>
>


-- 

Guillaume Nodet

Red Hat, Open Source Integration

Email: gno...@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/


Re: Karaf 4.0.3 + pax-cdi

2016-03-19 Thread conejo
Good afternoon.
For if this can interest someone.
The problem is in the assembly. If pom.xml is added to the appropriate
libraries, everything works fine.

The libraries to be added can be viewed at:
http://karaf.922171.n3.nabble.com/Karaf-assembly-td4045816.html



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-4-0-3-pax-cdi-tp4045056p4045859.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: static content apparently not working in Karaf 4.0.4 via jetty config

2016-03-19 Thread Achim Nierbeck
ahh it's a closed connection ... which version of Pax-Web are you using?
And did you check if that bug is already been fixed with Pax-Web?

regards, Achim


2016-03-18 11:54 GMT+01:00 Benson Margulies :

>
> On Fri, Mar 18, 2016 at 6:46 AM, Achim Nierbeck 
> wrote:
>
>>
>> http://ops4j.github.io/pax/web/4.2.x/index.html#_advanced_jetty_configuration
>
>
> For my particular application, zero java code is actually preferable.
> Anyhow, why would configuring it that way prevent Jetty from try to write
> to closed connections?
>
>


-- 

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: static content apparently not working in Karaf 4.0.4 via jetty config

2016-03-19 Thread Benson Margulies
Karaf 4.0.4 brought me 4.2.4 of pax-web.

Is it safe to stick 4.2.5 in there?

I'm making assumptions about the meaning of the following, but, in general,
it seems wrong to get this much traffic for a simple 404 on static content.


jvm 1| 2016-03-16 08:08:39,183 | WARN  | tp1085327538-940 | Response
  | 217 - org.eclipse.jetty.util - 9.2.14.v20151106 |
Committed before 404 null
jvm 1| 2016-03-16 08:08:39,184 | WARN  | tp1085327538-940 |
ServletHandler   | 217 - org.eclipse.jetty.util -
9.2.14.v20151106 | /doc/index.html
jvm 1| java.lang.IllegalStateException: Committed
jvm 1|  at
org.eclipse.jetty.server.Response.resetBuffer(Response.java:1243)[214:org.eclipse.jetty.server:9.2.14.v20151106]



On Fri, Mar 18, 2016 at 7:08 AM, Achim Nierbeck 
wrote:

> ahh it's a closed connection ... which version of Pax-Web are you using?
> And did you check if that bug is already been fixed with Pax-Web?
>
> regards, Achim
>
>
> 2016-03-18 11:54 GMT+01:00 Benson Margulies :
>
>>
>> On Fri, Mar 18, 2016 at 6:46 AM, Achim Nierbeck 
>> wrote:
>>
>>>
>>> http://ops4j.github.io/pax/web/4.2.x/index.html#_advanced_jetty_configuration
>>
>>
>> For my particular application, zero java code is actually preferable.
>> Anyhow, why would configuring it that way prevent Jetty from try to write
>> to closed connections?
>>
>>
>
>
> --
>
> 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
>
>


Defining dispatcher types for filter mapping via pax web whiteboard extender

2016-03-19 Thread kuvalda
Is there a way to define dispatcher types for filter mapping via pax web
whiteboard extender, like in web.xml?

  Filter
  /example/*
  REQUEST
  FORWARD





-
Pavel
--
View this message in context: 
http://karaf.922171.n3.nabble.com/Defining-dispatcher-types-for-filter-mapping-via-pax-web-whiteboard-extender-tp4045841.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Substitutions in jetty.xml

2016-03-19 Thread Philipp Marx
You can do something like this:

/keystore

Cheers,

Philipp

Benson Margulies  schrieb am Di., 15. März 2016 um
22:46 Uhr:

> Can I use any ${...} in there to pass in the pathname of static content?
> ${karaf.etc} etc would work fine.
>
>


Re: Substitutions in jetty.xml

2016-03-19 Thread Benson Margulies
Thanks.

On Wed, Mar 16, 2016 at 8:48 AM, Philipp Marx  wrote:

> You can do something like this:
>
> /keystore
>
> Cheers,
>
> Philipp
>
> Benson Margulies  schrieb am Di., 15. März 2016 um
> 22:46 Uhr:
>
>> Can I use any ${...} in there to pass in the pathname of static content?
>> ${karaf.etc} etc would work fine.
>>
>>


Re: Blueprint or DS or what to use?

2016-03-19 Thread ellirael
I personally use Blueprint cause of:
1. common spring-like xml style of DI
2. prototype scopes
3. creating and describing internal skeleton of bundle in one file
4. CXF integration




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Blueprint-or-DS-or-what-to-use-tp4045845p4045852.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Consider adding GELF Log4J 2 appender in Karaf 4.1.x by default

2016-03-19 Thread Владимир Коньков
Hi there!

Lukasz, Jean-Baptiste, thanx for reply. Actually your opinion is expected and 
reasonable. 

Lukasz, couple of comments:

Proposed solution is not specific for any tool - GELF is very common format for 
app log streaming and it’s popularity is growing. 

About custom distribution: 
Usually, ops team is orthogonal to dev team. Infrastructure services like 
logging provided by ops team, deployment platform stated by dev team. It’s not 
comfortable to require custom version of Karaf from dev team. Moreover it is 
not always possible. In our projects we support many Karaf versions and 
distribution from Apache Servicemix 4.4 (Karaf 2.2.x) to TalendESB 5.x to 
modern Karaf 4.0.x - it is far from always possible to build custom distr. But 
on all of this distrs we use one set of custom appenders (!) for 4+ years. One 
of that appenders finally die (compression, file rotation etc), but not other.

Lukasz is absolutely right - logging is part of foundation functionalities and 
because of that it is hard to extend in comparison to other parts. I’ve first 
voted for removing blueprint from base distribution but ask you for common 
streaming log appender.

Anyway, thanx for Karaf - it is very good platform for any server solutions on 
JVM. Of cause if you want and can adapt it.

Regards,
Vladimir Konkov

Re: Spring 4 Bundle spring-data-neo4j Contains Wrong Import-Package version restrictions for neo4j

2016-03-19 Thread jacob.nort...@itiviti.com
Thanks JB.  I'll take a look at the Jira first.

Jake



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Spring-4-Bundle-spring-data-neo4j-Contains-Wrong-Import-Package-version-restrictions-for-neo4j-tp4045782p4045840.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Blueprint or DS or what to use?

2016-03-19 Thread Guillaume Nodet
Fwiw, you need to use the following bundles (blueprint-core,
blueprint-spring, blueprint-spring-extender) which are being released:
  https://repository.apache.org/content/repositories/orgapachearies-1061


2016-03-18 17:08 GMT+01:00 akuhtz :

> Hello,
>
> Thank you for all the helpful answers and pointers!
>
> I'll try to go first with the solution proposed by Guillaume and see if I
> get it working.
>
> Regards,
> Andreas
>
> 2016-03-18 14:10 GMT+01:00 CLEMENT Jean-Philippe [via Karaf] <
> ml-node+s922171n4045858...@n3.nabble.com>:
>
> > We use Blueprint mainly to have a code which makes use of services but
> > without dealing with OSGi or annotations (as far as possible => few
> > wappers). As long with the maven-bundle-plugin it is a kind of magic. I
> > would say Blueprint+Maven+Karaf makes things really easy.
> >
> > I would suggest to make a simple but representative example using CDI,
> DS,
> > and Blueprint. Take time to have a full picture with you editor, plugins
> > and compilation / assembly. See what is means in terms of effort to make,
> > and think about what it would cost to enhance and maintain.
> >
> > JP
> >
> > -Message d'origine-
> > De : akuhtz [mailto:[hidden email]
> > ]
> > Envoyé : vendredi 18 mars 2016 11:24
> > À : [hidden email]  /user/SendEmail.jtp?type=node=4045858=1>
> > Objet : Blueprint or DS or what to use?
> >
> > Hello,
> >
> > I've an application running with spring-dm and because spring-dm is no
> > longer developed I'm looking for a replacement.
> >
> > Now I'm confused because there was a shift in karaf (core) from blueprint
> > to DS and today I saw a post on the dev list, saying that DS does not
> > support as much as blueprint does.
> > As an end-user I would like to know what the proposed way to go is: DS or
> > blueprint, both or what else?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://karaf.922171.n3.nabble.com/Blueprint-or-DS-or-what-to-use-tp4045845.html
> > Sent from the Karaf - User mailing list archive at Nabble.com.
> >
> >
> > --
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://karaf.922171.n3.nabble.com/Blueprint-or-DS-or-what-to-use-tp4045845p4045858.html
> > To unsubscribe from Blueprint or DS or what to use?, click here
> > <
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4045845=YW5kcmVhcy5rdWh0ekBnbWFpbC5jb218NDA0NTg0NXwtNjQyODAyMjE1
> >
> > .
> > NAML
> > <
> http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_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/Blueprint-or-DS-or-what-to-use-tp4045845p4045860.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Guillaume Nodet

Red Hat, Open Source Integration

Email: gno...@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/


Karaf assembly

2016-03-19 Thread conejo
Hello

When I use the maven archetype, distribution generated does not include the
jar files that you can find in lib in a downloaded karaf (especially
lib/endorsed jar files).

Is there any way to include libraries of karaf.home/lib folder in a
distribution that is built using maven?

Thanx.



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-assembly-tp4045816.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Declarative service / serviceTracker

2016-03-19 Thread Christian Schneider
I am not sure what your code intends to do. What does the annotation @JPA
mean?
If you want to use a DataSource in DS then simply inject it.

@Reference(osgi.jndi.service.name=jpatest)
DataSource myDataSource;

Btw. I just recently learned that you can use a config admin property to
change the filter above at runtime.

Christian


2016-03-19 14:31 GMT+01:00 Morgan :

> Hi guys,
>
> For karaf-boot I'm working on the JPA annotations and it's close to be
> done but atm I'm working on a example to show how it works but I'm stuck at
> the "service tracking" part using DS.
>
> The purpose is to start the bundle when a datasource  "jdbc/test" is found.
>
> When I drop my datasource in the deploy folder the logs seems to find the
> datasource and his jndi reference like shown :
>
> 2016-03-15 18:32:07,965 | DEBUG | f-4.0.4.2/deploy | ServiceRecipe
> | 13 - org.apache.aries.blueprint.core - 1.5.0 | Registering
> service .component-1 with interfaces [javax.sql.DataSource] and properties
> {osgi.service.blueprint.compname=dataSource, osgi.jndi.service.name=jdbc/test}
>
>
> This is my class and my datasource:
>
> https://gist.github.com/mhautman/f58afa1151f6d5d59f2f
>
> I guess I did something wrong somewhere but I don't know where to search
> anymore... I already read the specs too..
>
> Regards,
> Morgan
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de


Open Source Architect
http://www.talend.com



Blueprint or DS or what to use?

2016-03-19 Thread akuhtz
Hello,

I've an application running with spring-dm and because spring-dm is no
longer developed I'm looking for a replacement.

Now I'm confused because there was a shift in karaf (core) from blueprint to
DS and today I saw a post on the dev list, saying that DS does not support
as much as blueprint does. 
As an end-user I would like to know what the proposed way to go is: DS or
blueprint, both or what else?



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Blueprint-or-DS-or-what-to-use-tp4045845.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Defining dispatcher types for filter mapping via pax web whiteboard extender

2016-03-19 Thread Achim Nierbeck
Hi,

yes should be possible, just add those params as properties to your filter
servlet.
Take also a look at the documentation:
http://ops4j.github.io/pax/web/SNAPSHOT/User-Guide.html#WhiteboardExtender-Howdoesithelponfilterregistration

regards, Achim


2016-03-18 9:35 GMT+01:00 kuvalda :

> Is there a way to define dispatcher types for filter mapping via pax web
> whiteboard extender, like in web.xml?
> 
>   Filter
>   /example/*
>   REQUEST
>   FORWARD
> 
>
>
>
>
> -
> Pavel
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Defining-dispatcher-types-for-filter-mapping-via-pax-web-whiteboard-extender-tp4045841.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: Consider adding GELF Log4J 2 appender in Karaf 4.1.x by default

2016-03-19 Thread Владимир Коньков
Hi Jean-Baptiste!

We actively use GELF for streaming logs from Karaf based platforms for years. 
But we stop building custom distributions at beginning of adoption because of 
we use use different distrs from different vendors (FuseSource, Talend, stock 
Servicemix, plain Karaf etc). Not all distrs can be modified. It all needs to 
be upgradable. 
Custom distribution is not practical way for us. Now we install appender at 
deployment time by help of deployment automation tools like Ansible, Puppet.

Current appender we use is GELFJ. Not so robust as I want but with some 
infrastructure support it works:

https://github.com/t0xa/gelfj 

It is already has OSGI headers to be fragment bundle for Pax-Logging.

For log4j2 I currently testing this 2 implementations:

1. https://github.com/Graylog2/log4j2-gelf

2. https://github.com/mp911de/logstash-gelf 


For fist I’ve made couple of changes + OSGI headers for both. If someone is 
interested in I can share results after decision to be made with small 
configuration example. As before, we not plan build custom distrs.

I think Karaf feature is not to be needed because there is only one proper way 
to package appender - one superbundle, fragment for Pax-Logging without any 
exports and imports. Because of that - installation of appender it is simple 
bundle installation and Karaf restart. Or startup.properties modification, etc…

Regards,
Vladimir Konkov
CIT Consulting LLC

> 17 марта 2016 г., в 22:17, Jean-Baptiste Onofré  
> написал(а):
> 
> Hi Vladimir
> 
> anyway, do you already have GELF in your custom distribution ?
> If so, I would love to document it for other potential users, or even propose 
> an optional feature to add this.
> 
> WDYT ?
> 
> Regards
> JB
> 
> On 03/17/2016 06:33 AM, Владимир Коньков wrote:
>> Hi there!
>> 
>> Lukasz, Jean-Baptiste, thanx for reply. Actually your opinion is expected 
>> and reasonable.
>> 
>> Lukasz, couple of comments:
>> 
>> Proposed solution is not specific for any tool - GELF is very common format 
>> for app log streaming and it’s popularity is growing.
>> 
>> About custom distribution:
>> Usually, ops team is orthogonal to dev team. Infrastructure services like 
>> logging provided by ops team, deployment platform stated by dev team. It’s 
>> not comfortable to require custom version of Karaf from dev team. Moreover 
>> it is not always possible. In our projects we support many Karaf versions 
>> and distribution from Apache Servicemix 4.4 (Karaf 2.2.x) to TalendESB 5.x 
>> to modern Karaf 4.0.x - it is far from always possible to build custom 
>> distr. But on all of this distrs we use one set of custom appenders (!) for 
>> 4+ years. One of that appenders finally die (compression, file rotation 
>> etc), but not other.
>> 
>> Lukasz is absolutely right - logging is part of foundation functionalities 
>> and because of that it is hard to extend in comparison to other parts. I’ve 
>> first voted for removing blueprint from base distribution but ask you for 
>> common streaming log appender.
>> 
>> Anyway, thanx for Karaf - it is very good platform for any server solutions 
>> on JVM. Of cause if you want and can adapt it.
>> 
>> Regards,
>> Vladimir Konkov
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com



Re: Spring 4 Bundle spring-data-neo4j Contains Wrong Import-Package version restrictions for neo4j

2016-03-19 Thread Jean-Baptiste Onofré

Hi Jake,

it should be addressed on the ServiceMix mailing list as the third-party 
bundles are done there.


It's also the Jira to use to refer such issue.

Thanks,
Regards
JB

On 03/17/2016 06:16 PM, jacob.nort...@itiviti.com wrote:

Is there a better mailing list for questions about the thirdparty OSGi
bundles created for Karaf/ServiceMix?

Thanks,
Jake



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Spring-4-Bundle-spring-data-neo4j-Contains-Wrong-Import-Package-version-restrictions-for-neo4j-tp4045782p4045836.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


ECF 3.13 released

2016-03-19 Thread Scott Lewis

ECF 3.13 has just been released [1].

ECF provides a modular and CT-tested implementation of OSGi R6 Remote 
Services and Remote Service Admin (1.1) specifications.


The important additions in 3.13 [2]

i) New API (and tutorial) to simplify the creation of custom remote 
services distribution providers.   The distribution provider API makes 
it easy to introduce alternative/new/private protocols, serialization 
formats, or communication patterns (e.g. client/server or pub-sub 
groups) *without* modifying the service API or implementation
ii) Distribution provider implementations based upon MQTT, CXF, Jersey, 
Hazelcast and associated technical documentation [3]
iii) Eclipse tooling to aid in the development, debugging, testing, and 
deployment of remote services [2]


Scott

[1] https://www.eclipse.org/ecf/downloads.php
[2] https://www.eclipse.org/ecf/NewAndNoteworthy.html
[3] https://wiki.eclipse.org/Distribution_Providers


Declarative service / serviceTracker

2016-03-19 Thread Morgan

Hi guys,

For karaf-boot I'm working on the JPA annotations and it's close to be 
done but atm I'm working on a example to show how it works but I'm stuck 
at the "service tracking" part using DS.


The purpose is to start the bundle when a datasource "jdbc/test" is found.

When I drop my datasource in the deploy folder the logs seems to find 
the datasource and his jndi reference like shown :


2016-03-15 18:32:07,965 | DEBUG | f-4.0.4.2/deploy | ServiceRecipe   
| 13 - org.apache.aries.blueprint.core - 1.5.0 | 
Registering service .component-1 with interfaces [javax.sql.DataSource] 
and properties {osgi.service.blueprint.compname=dataSource, 
osgi.jndi.service.name =jdbc/test}


This is my class and my datasource:

https://gist.github.com/mhautman/f58afa1151f6d5d59f2f

I guess I did something wrong somewhere but I don't know where to search 
anymore... I already read the specs too..


Regards,
Morgan


Re: Blueprint or DS or what to use?

2016-03-19 Thread Christian Schneider

I have a comparison in my DS tutorial.

http://www.liquid-reality.de/display/liquid/2015/06/30/Apache+Karaf+Tutorial+part+10+-+Declarative+services

The main two things missing in DS are the namespaces and the 
interceptors. In karaf internally we would not need those.

In a typical user application blueprint is probably still better.

Christian

On 18.03.2016 11:24, akuhtz wrote:

Hello,

I've an application running with spring-dm and because spring-dm is no
longer developed I'm looking for a replacement.

Now I'm confused because there was a shift in karaf (core) from blueprint to
DS and today I saw a post on the dev list, saying that DS does not support
as much as blueprint does.
As an end-user I would like to know what the proposed way to go is: DS or
blueprint, both or what else?



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Blueprint-or-DS-or-what-to-use-tp4045845.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



Re: Blueprint or DS or what to use?

2016-03-19 Thread Christian Schneider

On 18.03.2016 13:07, Charlie Mordant wrote:

Let introduce an other player: Pax-CDI!

It is fully annotation based and a well known JavaEE standard with 
some additional annotations to deal with OSGi services.

I really prefer this way for development.

I'm used to deal with these 3 technologies and here are the case where 
I use one or another:


* I'm using blueprint when:
* * I would do spring xml binding to third parties classes: e.g. 
declaring ciphers or crypto algorthms binding... In this case 
Annotation-based configurations comes with some boilerplate code.
* * When dealing with JPA/JTA: Aries Jpa and Aries transactions are 
really nice OSGi integration stacks and they're blueprint based.

* * When I dealing with some init/destroy-methods in a bundle fragment.

* I'm using Declarative service when I have to code some low-level 
modules (all modules where the stack shouldn't need BP or CDI): DS is 
lighter than its concurrent.


* I'm using Pax-CDI everywhere else: its really a pleasure to just add 
@Inject @OsgiService on a bean attribute.


You can also mix CDI and blueprint using the blueprint-maven-plugin. It 
allows to use the cdi annotations even when you also need to specify 
parts of the blueprint by hand.
Of course the annotations are then parsed at build time only and you 
only have a subset of CDI but it is better than hand coding xml.


Christian


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com



Re: Consider adding GELF Log4J 2 appender in Karaf 4.1.x by default

2016-03-19 Thread Łukasz Dywicki
Hey Vladimir,
While I see reasoning to have this feature, I must say it is not a core 
requirement to all users. If we would decide to have such appender we easily 
can run into situation that everyone will want to have it’s own appender and 
it’s dependencies installed/available by default in Karaf. Sadly (in my 
perception) we can’t agree for that. If you would like to push this forward 
please answer to this mail and send reply to d...@karaf.apache.org 
 so we could continue there. We need to keep in 
mind, that logging is part of foundation functionalities offered in Karaf 
available in same shape under minimal distribution. 

What I can recommend you is custom (re)packaging of Karaf. This will avoid 
troubles with manual modifications in configuration files and can be fully 
automated with maven tooling we offer. All you need to do is proper feature 
definition which will cause generation of startup.properties. You can also 
override default configuration files (ie. org.ops4j.pax.logging.cfg). In this 
way you will be able to produce Karaf assembly right for you, your clients and 
colleagues. 

Kind regards,
Lukasz
—
Apache Karaf Committer & PMC
Twitter: ldywicki
Blog: http://dywicki.pl
Code-House - http://code-house.org


> Wiadomość napisana przez Владимир Коньков  w dniu 16 mar 
> 2016, o godz. 11:32:
> 
> Hi
> 
> As of version 4.1 Karaf will use Log4J 2 as logging backend (thanx, 
> Guillaume). It’s very good news, because it greatly simplify configuration of 
> robust production logging - compression, flexible rotation rules, async, 
> fallback logging. All this features comes out of the box with Log4J 2. No 
> more custom appenders needs to be installed at first start time to achieve 
> basic production quality configuration.
> 
> But for advanced production logging one option is missing out of the box - 
> logging analysis tools integration, line ELK, Fluentd, Graylog, Splunk. To 
> achieve this capability in robust way we should again install custom appender 
> ( like https://github.com/Graylog2/log4j2-gelf 
>  ) at first start time.
> 
> I know, it can be installed as regular bundle fragment after first startup. 
> But installing appender this way has some drawbacks that make it unacceptable 
> for production usage:
> 1. First startup logs not coming in appender installed after start. (stopper 
> for automated deployments)
> 2. If appender configured before bundle cache initialization - there is 
> errors in file logs about missing appender class. Cache clean up is not so 
> rare on production deployment, usually it is simpler to clean cache before 
> some major software update that dealing with deps conflicts on upgrade.
> 3. After installation of custom appender bundle host bundle should be 
> refreshed (some log entries may be lost).
> 
> If custom appender is MAIN logging channel restriction above not acceptable 
> for us. Workaround is simple but very inconvenient to support for different 
> versions of Karaf:
>  - add appender jar to system lib
>  - modify startup.properties to incude appender bundle
> 
> My proposal: include GELF Log4J 2 appender in standart distribution. In such 
> way we provide log streaming capability to all major logging analysis tools. 
> Because of growing adoption of log analysis tools it may be good addition to 
> Karaf feature portfolio in addition to own solution Decanter.
> 
> I can provide PR on Github with carefully repackaged appender lib that not 
> export anything to other bundles.
> 
> What do you think?
> 
> Thanx,
> Vladimir Konkov
> 



Re: static content apparently not working in Karaf 4.0.4 via jetty config

2016-03-19 Thread Achim Nierbeck
Hi,

maybe the service approach suits you better?
http://ops4j.github.io/pax/web/4.2.x/index.html#_advanced_jetty_configuration
go to section Using Handler and Connectors as Services

regards, Achim


2016-03-16 13:26 GMT+01:00 Benson Margulies :

> This is only a problem for errors.
>
>
> On Wed, Mar 16, 2016 at 8:11 AM, Benson Margulies 
> wrote:
>
>> 
>>   
>> 
>>   
>> /doc
>> 
>>   > class="org.eclipse.jetty.server.handler.ResourceHandler">
>> ../../doc
>> true
>>   
>> 
>>   
>> 
>>   
>> 
>>
>> jvm 1| 2016-03-16 08:08:39,183 | WARN  | tp1085327538-940 | Response
>> | 217 - org.eclipse.jetty.util - 9.2.14.v20151106 |
>> Committed before 404 null
>> jvm 1| 2016-03-16 08:08:39,184 | WARN  | tp1085327538-940 |
>> ServletHandler   | 217 - org.eclipse.jetty.util -
>> 9.2.14.v20151106 | /doc/index.html
>> jvm 1| java.lang.IllegalStateException: Committed
>> jvm 1| at
>> org.eclipse.jetty.server.Response.resetBuffer(Response.java:1243)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.server.Response.sendError(Response.java:567)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.server.Response.sendError(Response.java:544)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.servlet.ServletHandler$Default404Servlet.doGet(ServletHandler.java:1805)[215:org.eclipse.jetty.servlet:9.2.14.v20151106]
>> jvm 1| at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[93:javax.servlet-api:3.1.0]
>> jvm 1| at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[93:javax.servlet-api:3.1.0]
>> jvm 1| at
>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[215:org.eclipse.jetty.servlet:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[215:org.eclipse.jetty.servlet:9.2.14.v20151106]
>> jvm 1| at
>> org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[234:org.ops4j.pax.web.pax-web-jetty:4.2.4]
>> jvm 1| at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[213:org.eclipse.jetty.security:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[234:org.ops4j.pax.web.pax-web-jetty:4.2.4]
>> jvm 1| at
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[215:org.eclipse.jetty.servlet:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:99)[234:org.ops4j.pax.web.pax-web-jetty:4.2.4]
>> jvm 1| at
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.server.Server.handle(Server.java:499)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[214:org.eclipse.jetty.server:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[206:org.eclipse.jetty.io:9
>> .2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[217:org.eclipse.jetty.util:9.2.14.v20151106]
>> jvm 1| at
>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[217:org.eclipse.jetty.util:9.2.14.v20151106]
>> jvm 1| at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
>> jvm 1| 2016-03
>>
>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax 

Re: Blueprint or DS or what to use?

2016-03-19 Thread Nick Baker
Can you point me to any documentation on this? I found a thread on the 
aries-dev but that's about it. When we abandoned Gemini we lost some of the 
functionality and would be interested in trying this out.

http://mail-archives.apache.org/mod_mbox/aries-dev/201511.mbox/%3ccaa66tppfyb33d7m234ddeugxa6dj5jv24m09vv7u77dbjlo...@mail.gmail.com%3E

Thanks!

From: Guillaume Nodet >
Reply-To: "user@karaf.apache.org" 
>
Date: Friday, March 18, 2016 at 8:40 AM
To: user >
Subject: Re: Blueprint or DS or what to use?

Fwiw, Aries Blueprint now has almost full support for Spring namespaces and 
Spring-DM bundles, you simply need to deploy blueprint, spring and the 
blueprint-spring + blueprint-spring-extender bundles.

2016-03-18 11:24 GMT+01:00 akuhtz 
>:
Hello,

I've an application running with spring-dm and because spring-dm is no
longer developed I'm looking for a replacement.

Now I'm confused because there was a shift in karaf (core) from blueprint to
DS and today I saw a post on the dev list, saying that DS does not support
as much as blueprint does.
As an end-user I would like to know what the proposed way to go is: DS or
blueprint, both or what else?



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Blueprint-or-DS-or-what-to-use-tp4045845.html
Sent from the Karaf - User mailing list archive at Nabble.com.



--

Guillaume Nodet

Red Hat, Open Source Integration

Email: gno...@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/



Re: Consider adding GELF Log4J 2 appender in Karaf 4.1.x by default

2016-03-19 Thread Jean-Baptiste Onofré

Hi Vladimir

anyway, do you already have GELF in your custom distribution ?
If so, I would love to document it for other potential users, or even 
propose an optional feature to add this.


WDYT ?

Regards
JB

On 03/17/2016 06:33 AM, Владимир Коньков wrote:

Hi there!

Lukasz, Jean-Baptiste, thanx for reply. Actually your opinion is expected and 
reasonable.

Lukasz, couple of comments:

Proposed solution is not specific for any tool - GELF is very common format for 
app log streaming and it’s popularity is growing.

About custom distribution:
Usually, ops team is orthogonal to dev team. Infrastructure services like 
logging provided by ops team, deployment platform stated by dev team. It’s not 
comfortable to require custom version of Karaf from dev team. Moreover it is 
not always possible. In our projects we support many Karaf versions and 
distribution from Apache Servicemix 4.4 (Karaf 2.2.x) to TalendESB 5.x to 
modern Karaf 4.0.x - it is far from always possible to build custom distr. But 
on all of this distrs we use one set of custom appenders (!) for 4+ years. One 
of that appenders finally die (compression, file rotation etc), but not other.

Lukasz is absolutely right - logging is part of foundation functionalities and 
because of that it is hard to extend in comparison to other parts. I’ve first 
voted for removing blueprint from base distribution but ask you for common 
streaming log appender.

Anyway, thanx for Karaf - it is very good platform for any server solutions on 
JVM. Of cause if you want and can adapt it.

Regards,
Vladimir Konkov



--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: Blueprint or DS or what to use?

2016-03-19 Thread Jamie G.
Depends upon your application, and what you want to do.

Each has their benefits, and detractions.

Personally I tend to use Blueprint for small wiring setups (say an AMQ
connection factory, and a Camel Context).

On Fri, Mar 18, 2016 at 7:54 AM, akuhtz  wrote:
> Hello,
>
> I've an application running with spring-dm and because spring-dm is no
> longer developed I'm looking for a replacement.
>
> Now I'm confused because there was a shift in karaf (core) from blueprint to
> DS and today I saw a post on the dev list, saying that DS does not support
> as much as blueprint does.
> As an end-user I would like to know what the proposed way to go is: DS or
> blueprint, both or what else?
>
>
>
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/Blueprint-or-DS-or-what-to-use-tp4045845.html
> Sent from the Karaf - User mailing list archive at Nabble.com.