Re: [osgi-dev] Jetty configuration questions

2016-11-18 Thread David Daniel
I want to go back to my previous email and reiterate that it is easiest to
pick a framework and work with the tools that are supported by the
developers of that framework.  Enroute is great with bndtools and gradle
but it is really just getting started with maven and has not been around as
long as karaf has.  Karaf has many maven plugins built around it but it's
developers have not solidified around Eclipse so it is not as tightly
integrated as bndtools is.  I think mixing karaf and bndtools is very
difficult at this time and especially so for those just getting started.
What Achim is suggesting is running karaf from the command line and
installing the features you need.  When you launch karaf you can add the
-debug option and attach to the process as you would other remote java
applications.  You will not get all the goodies you get out of bndtools but
there are a number of nice things in karaf like the shell, prebuilt
features and the ability to add bundles on the fly like he showed with
adding a bundle from maven or dropping one in the deploy folder.  Enroute
is much more building your own custom project that contains exactly the
bundles you want and you can debug within Eclipse.  My advise earlier was
that if you were looking to get involved with karaf then starting in the
karaf users list and using their tools may be easier.  If you are looking
to start with enroute you will get a great solid base but when moving
forward you will really need to understand the bundles you are including.
Just today you saw an email from Benson discussing plusses and minus' for 5
different httpservice implementations.  You will want to pick an
implementation and look at the code or documentation of it to figure out
which parts of jetty you can take advantage of and how.  Don't get
discouraged as the begging part of OSGI is the hardest.

David

On Fri, Nov 18, 2016 at 2:09 PM, Achim Nierbeck 
wrote:

> Hi,
>
> doesn't look like the http feature did get installed correctly, as the
> JavaServlet requirement isn't met.
> If I'm not wrong you're using DS with your servlets, therefore it's best
> to install the http-whiteboard feature.
> Apache Karaf in combination with Pax-Web gives you three different
> "flavors"
> 1) plain http service
> 2) http service plus Pax-Web whiteboard extender
> yeah I know it's not completely R6 compliant, but well, it's been there
> for a while and already supports a wide range of extras.
> 3) war, complete web application support
>
> Regarding this error message:
>
> osgi.extender=osgi.enroute.webserver
>
> I'm not sure it'll ever work this way as Pax-Web, doesn't export this
> "extender"
>
> regards, Achim
>
>
>
> 2016-11-18 17:47 GMT+01:00 Tim Ward :
>
>> So if I
>>
>> (1) feature:install http
>>
>> (2) comment out the @RequireConfigurerExtender (guessing that whatever
>> this is (it's a line that was in the tutorial I hacked) it ain't ever going
>> to work on Karaf)
>>
>> (3) manually delete from the debug.bndrun everything except the ones I'm
>> deliberately installing (which is OK for an experiment, but it's not a
>> solution as they'll come back when I next press the Resolve button again)
>>
>> I get
>>
>> 
>> ===
>> karaf@root()> list
>> START LEVEL 100 , List Threshold: 50
>>  ID | State | Lvl | Version| Name
>> 
>> ---
>>  56 | Active|  80 | 3.2.0.201605172008 | biz.aQute.remote.agent
>> 952 | Active|  80 | 1.0.0.201611181055 |
>> com.telensa.apps.planet.pc.provider
>> 953 | Installed |  80 | 1.0.0.201611181643 | com.telensa.apps.planet.ws
>> .application
>> 954 | Active|  80 | 9.3.8.v20160314| Jetty :: Utilities
>> 955 | Active|  80 | 9.3.8.v20160314| Jetty :: Utilities ::
>> Ajax(JSON)
>> karaf@root()> diag
>> com.telensa.apps.planet.ws.application (953)
>> 
>> Status: Installed
>> Unsatisfied Requirements:
>> [com.telensa.apps.planet.ws.application [953](R 953.2)] osgi.extender;
>> (&(osgi.extender=osgi.enroute.webserver)(&(version>=1.0.0)(!
>> (version>=2.0.0
>> [com.telensa.apps.planet.ws.application [953](R 953.2)] osgi.contract;
>> (&(osgi.contract=JavaServlet)(version=3.1.0))
>>
>>
>> karaf@root()>
>> 
>> ===
>>
>> which is, at least, I suppose, a shorter list of error messages ...
>>
>>
>> On 18/11/2016 16:35, Achim Nierbeck wrote:
>>
>> So prior installing your own bundles make sure the HttpService is already
>> installed.
>> For example you're able to install this via
>>
>> feature:install http
>>
>> or maybe better as you might want to use more then http service alone, use
>>
>> feature:install war
>>
>> This will install everything needed to run Apache Karaf together with
>> OPS4j Pax-Web.
>> And in this case all the 

Re: [osgi-dev] Jetty configuration questions

2016-11-18 Thread Achim Nierbeck
Hi,

doesn't look like the http feature did get installed correctly, as the
JavaServlet requirement isn't met.
If I'm not wrong you're using DS with your servlets, therefore it's best to
install the http-whiteboard feature.
Apache Karaf in combination with Pax-Web gives you three different
"flavors"
1) plain http service
2) http service plus Pax-Web whiteboard extender
yeah I know it's not completely R6 compliant, but well, it's been there for
a while and already supports a wide range of extras.
3) war, complete web application support

Regarding this error message:

osgi.extender=osgi.enroute.webserver

I'm not sure it'll ever work this way as Pax-Web, doesn't export this
"extender"

regards, Achim



2016-11-18 17:47 GMT+01:00 Tim Ward :

> So if I
>
> (1) feature:install http
>
> (2) comment out the @RequireConfigurerExtender (guessing that whatever
> this is (it's a line that was in the tutorial I hacked) it ain't ever going
> to work on Karaf)
>
> (3) manually delete from the debug.bndrun everything except the ones I'm
> deliberately installing (which is OK for an experiment, but it's not a
> solution as they'll come back when I next press the Resolve button again)
>
> I get
>
> 
> ===
> karaf@root()> list
> START LEVEL 100 , List Threshold: 50
>  ID | State | Lvl | Version| Name
> 
> ---
>  56 | Active|  80 | 3.2.0.201605172008 | biz.aQute.remote.agent
> 952 | Active|  80 | 1.0.0.201611181055 | com.telensa.apps.planet.pc.
> provider
> 953 | Installed |  80 | 1.0.0.201611181643 | com.telensa.apps.planet.ws.
> application
> 954 | Active|  80 | 9.3.8.v20160314| Jetty :: Utilities
> 955 | Active|  80 | 9.3.8.v20160314| Jetty :: Utilities ::
> Ajax(JSON)
> karaf@root()> diag
> com.telensa.apps.planet.ws.application (953)
> 
> Status: Installed
> Unsatisfied Requirements:
> [com.telensa.apps.planet.ws.application [953](R 953.2)] osgi.extender;
> (&(osgi.extender=osgi.enroute.webserver)(&(version>=1.0.0)(!
> (version>=2.0.0
> [com.telensa.apps.planet.ws.application [953](R 953.2)] osgi.contract;
> (&(osgi.contract=JavaServlet)(version=3.1.0))
>
>
> karaf@root()>
> 
> ===
>
> which is, at least, I suppose, a shorter list of error messages ...
>
>
> On 18/11/2016 16:35, Achim Nierbeck wrote:
>
> So prior installing your own bundles make sure the HttpService is already
> installed.
> For example you're able to install this via
>
> feature:install http
>
> or maybe better as you might want to use more then http service alone, use
>
> feature:install war
>
> This will install everything needed to run Apache Karaf together with
> OPS4j Pax-Web.
> And in this case all the configurational stuff we "talked" about will work.
>
> regards, Achim
>
> [1] - https://lists.apache.org/thread.html/900e65035f5a983fd3887a553cd309
> bc9519130fa28cfeb7d9f057bc@%3Cuser.karaf.apache.org%3E
>
>
> 2016-11-18 17:26 GMT+01:00 Tim Ward :
>
>> Sorry, by "didn't get an answer" I meant "didn't get an answer to my
>> problem that solved it".
>>
>> Leaving out the minimal set that you suggests not surprisingly results in
>> things not resolving
>>
>> START LEVEL 100 , List Threshold: 50
>>  ID | State | Lvl | Version| Name
>> 
>> 
>>  56 | Active|  80 | 3.2.0.201605172008 | biz.aQute.remote.agent
>> 895 | Active|  80 | 1.0.0.201611181055 |
>> com.telensa.apps.planet.pc.provider
>> 896 | Installed |  80 | 1.0.0.201611181622 |
>> com.telensa.apps.planet.ws.application
>> 898 | Installed |  80 | 9.3.8.v20160314| Jetty :: Utilities
>> 899 | Installed |  80 | 9.3.8.v20160314| Jetty :: Utilities ::
>> Ajax(JSON)
>> 900 | Active|  80 | 2.0.0.201610141744 |
>> osgi.enroute.executor.simple.provider
>> 901 | Active|  80 | 2.0.0.201610141744 |
>> osgi.enroute.logger.simple.provider
>> 902 | Installed |  80 | 2.0.0.201610141745 |
>> osgi.enroute.web.simple.provider
>> 903 | Installed |  80 | 1.3.100.v20150410-1453 | Coordinator
>> 904 | Installed |  80 | 2.0.0.201610141744 |
>> osgi.enroute.configurer.simple.provider
>>
>> which is no doubt why the resolver included them in the first place.
>>
>> karaf@root()> diag
>> com.telensa.apps.planet.ws.application (896)
>> 
>> Status: Installed
>> Unsatisfied Requirements:
>> [com.telensa.apps.planet.ws.application [896](R 896.0)]
>> osgi.wiring.package; (osgi.wiring.package=javax.servlet)
>> [com.telensa.apps.planet.ws.application [896](R 896.0)]
>> osgi.wiring.package; (osgi.wiring.package=javax.servlet.http)
>> 

Re: [osgi-dev] Jetty configuration questions

2016-11-18 Thread Tim Ward

So if I

(1) feature:install http

(2) comment out the @RequireConfigurerExtender (guessing that whatever 
this is (it's a line that was in the tutorial I hacked) it ain't ever 
going to work on Karaf)


(3) manually delete from the debug.bndrun everything except the ones I'm 
deliberately installing (which is OK for an experiment, but it's not a 
solution as they'll come back when I next press the Resolve button again)


I get

===
karaf@root()> list
START LEVEL 100 , List Threshold: 50
 ID | State | Lvl | Version| Name
---
 56 | Active|  80 | 3.2.0.201605172008 | biz.aQute.remote.agent
952 | Active|  80 | 1.0.0.201611181055 | 
com.telensa.apps.planet.pc.provider
953 | Installed |  80 | 1.0.0.201611181643 | 
com.telensa.apps.planet.ws.application

954 | Active|  80 | 9.3.8.v20160314| Jetty :: Utilities
955 | Active|  80 | 9.3.8.v20160314| Jetty :: Utilities :: 
Ajax(JSON)

karaf@root()> diag
com.telensa.apps.planet.ws.application (953)

Status: Installed
Unsatisfied Requirements:
[com.telensa.apps.planet.ws.application [953](R 953.2)] osgi.extender; 
(&(osgi.extender=osgi.enroute.webserver)(&(version>=1.0.0)(!(version>=2.0.0
[com.telensa.apps.planet.ws.application [953](R 953.2)] osgi.contract; 
(&(osgi.contract=JavaServlet)(version=3.1.0))



karaf@root()>
===

which is, at least, I suppose, a shorter list of error messages ...

On 18/11/2016 16:35, Achim Nierbeck wrote:
So prior installing your own bundles make sure the HttpService is 
already installed.

For example you're able to install this via

feature:install http

or maybe better as you might want to use more then http service alone, use

feature:install war

This will install everything needed to run Apache Karaf together with 
OPS4j Pax-Web.
And in this case all the configurational stuff we "talked" about will 
work.


regards, Achim

[1] - 
https://lists.apache.org/thread.html/900e65035f5a983fd3887a553cd309bc9519130fa28cfeb7d9f057bc@%3Cuser.karaf.apache.org%3E



2016-11-18 17:26 GMT+01:00 Tim Ward >:


Sorry, by "didn't get an answer" I meant "didn't get an answer to
my problem that solved it".

Leaving out the minimal set that you suggests not surprisingly
results in things not resolving

START LEVEL 100 , List Threshold: 50
 ID | State | Lvl | Version| Name


 56 | Active|  80 | 3.2.0.201605172008 |
biz.aQute.remote.agent
895 | Active|  80 | 1.0.0.201611181055 |
com.telensa.apps.planet.pc.provider
896 | Installed |  80 | 1.0.0.201611181622 |
com.telensa.apps.planet.ws
.application
898 | Installed |  80 | 9.3.8.v20160314| Jetty :: Utilities
899 | Installed |  80 | 9.3.8.v20160314| Jetty ::
Utilities :: Ajax(JSON)
900 | Active|  80 | 2.0.0.201610141744 |
osgi.enroute.executor.simple.provider
901 | Active|  80 | 2.0.0.201610141744 |
osgi.enroute.logger.simple.provider
902 | Installed |  80 | 2.0.0.201610141745 |
osgi.enroute.web.simple.provider
903 | Installed |  80 | 1.3.100.v20150410-1453 | Coordinator
904 | Installed |  80 | 2.0.0.201610141744 |
osgi.enroute.configurer.simple.provider

which is no doubt why the resolver included them in the first place.

karaf@root()> diag
com.telensa.apps.planet.ws
.application (896)

Status: Installed
Unsatisfied Requirements:
[com.telensa.apps.planet.ws
.application [896](R 896.0)]
osgi.wiring.package; (osgi.wiring.package=javax.servlet)
[com.telensa.apps.planet.ws
.application [896](R 896.0)]
osgi.wiring.package; (osgi.wiring.package=javax.servlet.http)
[com.telensa.apps.planet.ws
.application [896](R 896.0)]
osgi.wiring.package;

(&(osgi.wiring.package=org.eclipse.jetty.util.ajax)(version>=9.3.0)(!(version>=10.0.0)))
[com.telensa.apps.planet.ws
.application [896](R 896.0)]
osgi.extender;

(&(osgi.extender=osgi.enroute.configurer)(&(version>=1.0.0)(!(version>=2.0.0
[com.telensa.apps.planet.ws
.application [896](R 896.0)]
osgi.extender;

(&(osgi.extender=osgi.enroute.webserver)(&(version>=1.0.0)(!(version>=2.0.0
[com.telensa.apps.planet.ws

Re: [osgi-dev] Jetty configuration questions

2016-11-18 Thread Tim Ward
Sorry, by "didn't get an answer" I meant "didn't get an answer to my 
problem that solved it".


Leaving out the minimal set that you suggests not surprisingly results 
in things not resolving


START LEVEL 100 , List Threshold: 50
 ID | State | Lvl | Version| Name

 56 | Active|  80 | 3.2.0.201605172008 | biz.aQute.remote.agent
895 | Active|  80 | 1.0.0.201611181055 | 
com.telensa.apps.planet.pc.provider
896 | Installed |  80 | 1.0.0.201611181622 | 
com.telensa.apps.planet.ws.application

898 | Installed |  80 | 9.3.8.v20160314| Jetty :: Utilities
899 | Installed |  80 | 9.3.8.v20160314| Jetty :: Utilities :: 
Ajax(JSON)
900 | Active|  80 | 2.0.0.201610141744 | 
osgi.enroute.executor.simple.provider
901 | Active|  80 | 2.0.0.201610141744 | 
osgi.enroute.logger.simple.provider
902 | Installed |  80 | 2.0.0.201610141745 | 
osgi.enroute.web.simple.provider

903 | Installed |  80 | 1.3.100.v20150410-1453 | Coordinator
904 | Installed |  80 | 2.0.0.201610141744 | 
osgi.enroute.configurer.simple.provider


which is no doubt why the resolver included them in the first place.

karaf@root()> diag
com.telensa.apps.planet.ws.application (896)

Status: Installed
Unsatisfied Requirements:
[com.telensa.apps.planet.ws.application [896](R 896.0)] 
osgi.wiring.package; (osgi.wiring.package=javax.servlet)
[com.telensa.apps.planet.ws.application [896](R 896.0)] 
osgi.wiring.package; (osgi.wiring.package=javax.servlet.http)
[com.telensa.apps.planet.ws.application [896](R 896.0)] 
osgi.wiring.package; 
(&(osgi.wiring.package=org.eclipse.jetty.util.ajax)(version>=9.3.0)(!(version>=10.0.0)))
[com.telensa.apps.planet.ws.application [896](R 896.0)] osgi.extender; 
(&(osgi.extender=osgi.enroute.configurer)(&(version>=1.0.0)(!(version>=2.0.0
[com.telensa.apps.planet.ws.application [896](R 896.0)] osgi.extender; 
(&(osgi.extender=osgi.enroute.webserver)(&(version>=1.0.0)(!(version>=2.0.0
[com.telensa.apps.planet.ws.application [896](R 896.0)] osgi.contract; 
(&(osgi.contract=JavaServlet)(version=3.1.0))



Jetty :: Utilities (898)

Status: Installed
Unsatisfied Requirements:
[org.eclipse.jetty.util [898](R 898.0)] osgi.wiring.package; 
(&(osgi.wiring.package=javax.servlet)(version>=2.6.0)(!(version>=3.2.0)))
[org.eclipse.jetty.util [898](R 898.0)] osgi.wiring.package; 
(&(osgi.wiring.package=javax.servlet.http)(version>=2.6.0)(!(version>=3.2.0)))



Jetty :: Utilities :: Ajax(JSON) (899)
--
Status: Installed
Unsatisfied Requirements:
[org.eclipse.jetty.util.ajax [899](R 899.0)] osgi.wiring.package; 
(&(osgi.wiring.package=org.eclipse.jetty.util)(version>=9.3.8)(!(version>=9.3.9)))
[org.eclipse.jetty.util.ajax [899](R 899.0)] osgi.wiring.package; 
(&(osgi.wiring.package=org.eclipse.jetty.util.log)(version>=9.3.8)(!(version>=9.3.9)))



osgi.enroute.web.simple.provider (902)
--
Status: Installed
Unsatisfied Requirements:
[osgi.enroute.web.simple.provider [902](R 902.0)] osgi.wiring.package; 
(&(osgi.wiring.package=aQute.service.reporter)(version>=1.0.0)(!(version>=2.0.0)))
[osgi.enroute.web.simple.provider [902](R 902.0)] osgi.wiring.package; 
(osgi.wiring.package=javax.servlet)
[osgi.enroute.web.simple.provider [902](R 902.0)] osgi.wiring.package; 
(osgi.wiring.package=javax.servlet.http)
[osgi.enroute.web.simple.provider [902](R 902.0)] osgi.wiring.package; 
(&(osgi.wiring.package=osgi.enroute.servlet.api)(version>=1.3.0)(!(version>=2.0.0)))
[osgi.enroute.web.simple.provider [902](R 902.0)] osgi.service; 
(objectClass=org.osgi.service.log.LogService)
[osgi.enroute.web.simple.provider [902](R 902.0)] osgi.service; 
(objectClass=osgi.enroute.servlet.api.ConditionalServlet)
[osgi.enroute.web.simple.provider [902](R 902.0)] osgi.service; 
(objectClass=osgi.enroute.web.server.cache.Cache)
[osgi.enroute.web.simple.provider [902](R 902.0)] osgi.implementation; 
(&(osgi.implementation=osgi.http)(&(version>=1.0.0)(!(version>=2.0.0
[osgi.enroute.web.simple.provider [902](R 902.0)] osgi.contract; 
(&(osgi.contract=JavaServlet)(version=3.1.0))



Coordinator (903)
-
Status: Installed
Unsatisfied Requirements:
[org.eclipse.equinox.coordinator [903](R 903.0)] osgi.wiring.package; 
(&(osgi.wiring.package=org.eclipse.osgi.util)(version>=1.1.0)(!(version>=2.0.0)))
[org.eclipse.equinox.coordinator [903](R 903.0)] osgi.wiring.package; 
(&(osgi.wiring.package=org.osgi.service.coordinator)(version>=1.0.0)(!(version>=1.1.0)))



osgi.enroute.configurer.simple.provider (904)
-
Status: Installed
Unsatisfied Requirements:
[osgi.enroute.configurer.simple.provider [904](R 904.0)] 
osgi.wiring.package; 

Re: [osgi-dev] Jetty configuration questions

2016-11-18 Thread Achim Nierbeck
Sorry, but saying this thread [1] is a "didn't get an answer" is not fair.

As already tried to point out on the karaf user mailinglist, try to deploy
your application without those extra Jetty Bundles!

regards, Achim

[1] -
https://lists.apache.org/thread.html/cf345ca50e82a2f0ce7b8d664427d89b3ecbf14acd1955645f3c6e07@%3Cuser.karaf.apache.org%3E



2016-11-18 17:18 GMT+01:00 Tim Ward :

> I didn't get an answer from the karaf mailing list, essentially I've been
> pointed back here.
>
> The most recent comment was:
>
> ===
> Ok,
>
> this explains the screw-up:
>
>>
>> 872 | Active   |  80 | 1.0.1  | Apache Felix Log Service
>> 873 | Active   |  80 | 1.0.0.201611181055 |
>> com.telensa.apps.planet.pc.provider
>> 874 | Active   |  80 | 1.0.0.201611181057 |
>> com.telensa.apps.planet.ws.application
>> 876 | Active   |  80 | 3.2.0  | Apache Felix Http Jetty
>> 877 | Active   |  80 | 1.1.2  | Apache Felix Servlet API
>> 878 | Active   |  80 | 2.0.2  | Apache Felix Declarative
>> Services
>> 879 | Active   |  80 | 9.3.8.v20160314| Jetty :: Utilities
>> 880 | Active   |  80 | 9.3.8.v20160314| Jetty :: Utilities ::
>> Ajax(JSON)
>> 881 | Active   |  80 | 2.0.0.201610141744 |
>> osgi.enroute.executor.simple.provider
>> 882 | Active   |  80 | 2.0.0.201610141744 |
>> osgi.enroute.logger.simple.provider
>> 883 | Active   |  80 | 2.0.0.201610141745 | osgi.enroute.web.simple.
>> provider
>> 884 | Active   |  80 | 1.3.100.v20150410-1453 | Coordinator
>> 885 | Active   |  80 | 2.0.0.201610141744 | osgi.enroute.configurer.
>> simple.provider
>> 887 | Active   |  80 | 1.5.100.v20140428-1446 | Supplemental Equinox
>> Functionality
>> 888 | Active   |  80 | 1.4.8  | Apache Felix EventAdmin
>
>
> all of those services besides 873 and 874 are not needed in the scope of
> Karaf ...
> ... well maybe 881 to 885
> ===
>
> So what do I do now?
>
> (Services 879 and 880 I put there deliberately because I want to do some
> JSON stuff, but any other JSON library would do.)
>
>
> On 15/11/2016 16:27, David Daniel wrote:
>
> If you are connecting to a running karaf instance as in the second example
> and you have enabled the http feature then you are likely using pax web
> https://ops4j1.jira.com/wiki/display/paxweb/Advanced+Jetty+Configuration.
> But if that is the case then you may get better help on the karaf users
> mailing list.
>
> If you are using enroute locally you are likely running the apache http
> service http://felix.apache.org/documentation/subprojects/
> apache-felix-http-service.html  You will be able to get better help on
> that in the felix users group.
>
> It is generally the same people on all the lists but I know some people
> like to filter so you are more likely to get a response on the appropriate
> list.
>
> On Tue, Nov 15, 2016 at 11:16 AM, Tim Ward  wrote:
>
>> On 15/11/2016 16:10, David Daniel wrote:
>>
>>> It is really going to be determined by your httpservice implementation.
>>> If you are using Pax-Web like in karaf then there is a jetty.xml file that
>>> you can change.  If you are using felix http service then many things are
>>> configured via the config admin but you will have to look at their
>>> documentation and code.  If you are just including the jetty bundles then I
>>> am not sure.
>>>
>>
>> How do I find out which of those I'm doing? - I'm not knowingly doing any
>> of them.
>>
>> I am running the application in two ways:
>>
>> (1) From the "Run OSGi" button on the Run page of the bnd.bnd file in
>> Eclipse
>> (2) From Debug As / Bnd Native Launcher on debug.bndrun, where
>> debug.bndrun is created in accordance with
>>
>> http://enroute.osgi.org/appnotes/bndtools-and-karaf.html
>>
>> I think I'm more interested in something that works with (2) than I am in
>> something that works in (1), if it's going to be different in each case.
>>
>>
>> --
>> Tim Ward
>>
>> ___
>> OSGi Developer Mail List
>> osgi-dev@mail.osgi.org
>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>
>
>
>
> ___
> OSGi Developer Mail 
> listosgi-...@mail.osgi.orghttps://mail.osgi.org/mailman/listinfo/osgi-dev
>
>
>
> --
> Tim Ward
>
>
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>



-- 

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
___
OSGi Developer Mail List

Re: [osgi-dev] Jetty configuration questions

2016-11-18 Thread Tim Ward
I didn't get an answer from the karaf mailing list, essentially I've 
been pointed back here.


The most recent comment was:

===
Ok,

this explains the screw-up:


   872 | Active   |  80 | 1.0.1  | Apache Felix Log Service
   873 | Active   |  80 | 1.0.0.201611181055 |
   com.telensa.apps.planet.pc.provider
   874 | Active   |  80 | 1.0.0.201611181057 |
   com.telensa.apps.planet.ws
   .application
   876 | Active   |  80 | 3.2.0  | Apache Felix Http Jetty
   877 | Active   |  80 | 1.1.2  | Apache Felix Servlet API
   878 | Active   |  80 | 2.0.2  | Apache Felix
   Declarative Services
   879 | Active   |  80 | 9.3.8.v20160314| Jetty :: Utilities
   880 | Active   |  80 | 9.3.8.v20160314| Jetty :: Utilities
   :: Ajax(JSON)
   881 | Active   |  80 | 2.0.0.201610141744 |
   osgi.enroute.executor.simple.provider
   882 | Active   |  80 | 2.0.0.201610141744 |
   osgi.enroute.logger.simple.provider
   883 | Active   |  80 | 2.0.0.201610141745 |
   osgi.enroute.web.simple.provider
   884 | Active   |  80 | 1.3.100.v20150410-1453 | Coordinator
   885 | Active   |  80 | 2.0.0.201610141744 |
   osgi.enroute.configurer.simple.provider
   887 | Active   |  80 | 1.5.100.v20140428-1446 | Supplemental Equinox
   Functionality
   888 | Active   |  80 | 1.4.8  | Apache Felix EventAdmin


all of those services besides 873 and 874 are not needed in the scope of 
Karaf ...

... well maybe 881 to 885
===

So what do I do now?

(Services 879 and 880 I put there deliberately because I want to do some 
JSON stuff, but any other JSON library would do.)


On 15/11/2016 16:27, David Daniel wrote:
If you are connecting to a running karaf instance as in the second 
example and you have enabled the http feature then you are likely 
using pax web 
https://ops4j1.jira.com/wiki/display/paxweb/Advanced+Jetty+Configuration. 
But if that is the case then you may get better help on the karaf 
users mailing list.


If you are using enroute locally you are likely running the apache 
http service 
http://felix.apache.org/documentation/subprojects/apache-felix-http-service.html 
You will be able to get better help on that in the felix users group.


It is generally the same people on all the lists but I know some 
people like to filter so you are more likely to get a response on the 
appropriate list.


On Tue, Nov 15, 2016 at 11:16 AM, Tim Ward > wrote:


On 15/11/2016 16:10, David Daniel wrote:

It is really going to be determined by your httpservice
implementation.  If you are using Pax-Web like in karaf then
there is a jetty.xml file that you can change.  If you are
using felix http service then many things are configured via
the config admin but you will have to look at their
documentation and code.  If you are just including the jetty
bundles then I am not sure.


How do I find out which of those I'm doing? - I'm not knowingly
doing any of them.

I am running the application in two ways:

(1) From the "Run OSGi" button on the Run page of the bnd.bnd file
in Eclipse
(2) From Debug As / Bnd Native Launcher on debug.bndrun, where
debug.bndrun is created in accordance with

http://enroute.osgi.org/appnotes/bndtools-and-karaf.html


I think I'm more interested in something that works with (2) than
I am in something that works in (1), if it's going to be different
in each case.


-- 
Tim Ward


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org 
https://mail.osgi.org/mailman/listinfo/osgi-dev





___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev



--
Tim Ward

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Jetty configuration questions

2016-11-15 Thread David Daniel
If you are connecting to a running karaf instance as in the second example
and you have enabled the http feature then you are likely using pax web
https://ops4j1.jira.com/wiki/display/paxweb/Advanced+Jetty+Configuration.
But if that is the case then you may get better help on the karaf users
mailing list.

If you are using enroute locally you are likely running the apache http
service
http://felix.apache.org/documentation/subprojects/apache-felix-http-service.html
You will be able to get better help on that in the felix users group.

It is generally the same people on all the lists but I know some people
like to filter so you are more likely to get a response on the appropriate
list.

On Tue, Nov 15, 2016 at 11:16 AM, Tim Ward  wrote:

> On 15/11/2016 16:10, David Daniel wrote:
>
>> It is really going to be determined by your httpservice implementation.
>> If you are using Pax-Web like in karaf then there is a jetty.xml file that
>> you can change.  If you are using felix http service then many things are
>> configured via the config admin but you will have to look at their
>> documentation and code.  If you are just including the jetty bundles then I
>> am not sure.
>>
>
> How do I find out which of those I'm doing? - I'm not knowingly doing any
> of them.
>
> I am running the application in two ways:
>
> (1) From the "Run OSGi" button on the Run page of the bnd.bnd file in
> Eclipse
> (2) From Debug As / Bnd Native Launcher on debug.bndrun, where
> debug.bndrun is created in accordance with
>
> http://enroute.osgi.org/appnotes/bndtools-and-karaf.html
>
> I think I'm more interested in something that works with (2) than I am in
> something that works in (1), if it's going to be different in each case.
>
>
> --
> Tim Ward
>
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Jetty configuration questions

2016-11-15 Thread David Daniel
It is really going to be determined by your httpservice implementation.  If
you are using Pax-Web like in karaf then there is a jetty.xml file that you
can change.  If you are using felix http service then many things are
configured via the config admin but you will have to look at their
documentation and code.  If you are just including the jetty bundles then I
am not sure.

On Tue, Nov 15, 2016 at 10:55 AM, Tim Ward  wrote:

> Anybody? - someone must have wanted to do at least some of this? - I'm not
> looking for someone to do it all for me, I'm just asking for a clue as to
> where to start looking.
>
>
> On 14/11/2016 14:50, Tim Ward wrote:
>
> As you can tell I'm quite new to all of this (and therefore I'm not the
> other Tim Ward).
>
> So, I've got some servlets and filters and stuff running, and I've found
> out how to use configuration/configuration.json to configure the tiny
> number of parameters that are exposed that way (including changing the port
> number).
>
> But how do I tell Jetty other things I want it to do, which aren't exposed
> via configuration.json so far as I've been able to find documentation? - I
> can work out how to do this if I'm hand-coding an embedded Jetty server,
> but I can't work out how to do it when Jetty is running solely by virtue of
> my having declared some servlet and filter @Components.
>
> Some examples of the things I'd like to do:
>
> (1) Stop it serving some default index.html, which it seems to do unasked.
> (2) Turn on request logging.
> (3) Include the X-Ray stuff, but have it served from a different port to
> the one used for my servlets.
> (4) Include some security (eg basic authentication, set differently for
> different URLs)
> (5) Get it to dump out its configuration so that I do actually know
> whether my configuration changes are being recognised!
> (6) Allow install-time and run-time configuration changes (a
> configuration.json embedded in a JAR doesn't do that)
> (7) Get it to serve static HTML pages (and other resources) (I've read
> http://enroute.osgi.org/services/osgi.enroute.webserver.capabilities.html
> several times but don't, I'm afraid, understand a word of it - the first
> two paragraphs of the the When to Use? section are OK but then I get
> completely lost)
>
> --
> Tim Ward
>
>
>
> --
> Tim Ward
>
>
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Jetty configuration questions

2016-11-15 Thread Tim Ward
Anybody? - someone must have wanted to do at least some of this? - I'm 
not looking for someone to do it all for me, I'm just asking for a clue 
as to where to start looking.


On 14/11/2016 14:50, Tim Ward wrote:
As you can tell I'm quite new to all of this (and therefore I'm not 
the other Tim Ward).


So, I've got some servlets and filters and stuff running, and I've 
found out how to use configuration/configuration.json to configure the 
tiny number of parameters that are exposed that way (including 
changing the port number).


But how do I tell Jetty other things I want it to do, which aren't 
exposed via configuration.json so far as I've been able to find 
documentation? - I can work out how to do this if I'm hand-coding an 
embedded Jetty server, but I can't work out how to do it when Jetty is 
running solely by virtue of my having declared some servlet and filter 
@Components.


Some examples of the things I'd like to do:

(1) Stop it serving some default index.html, which it seems to do unasked.
(2) Turn on request logging.
(3) Include the X-Ray stuff, but have it served from a different port 
to the one used for my servlets.
(4) Include some security (eg basic authentication, set differently 
for different URLs)
(5) Get it to dump out its configuration so that I do actually know 
whether my configuration changes are being recognised!
(6) Allow install-time and run-time configuration changes (a 
configuration.json embedded in a JAR doesn't do that)
(7) Get it to serve static HTML pages (and other resources) (I've read 
http://enroute.osgi.org/services/osgi.enroute.webserver.capabilities.html 
 
several times but don't, I'm afraid, understand a word of it - the 
first two paragraphs of the the When to Use? section are OK but then I 
get completely lost)

--
Tim Ward



--
Tim Ward

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

[osgi-dev] Jetty configuration questions

2016-11-14 Thread Tim Ward
As you can tell I'm quite new to all of this (and therefore I'm not the 
other Tim Ward).


So, I've got some servlets and filters and stuff running, and I've found 
out how to use configuration/configuration.json to configure the tiny 
number of parameters that are exposed that way (including changing the 
port number).


But how do I tell Jetty other things I want it to do, which aren't 
exposed via configuration.json so far as I've been able to find 
documentation? - I can work out how to do this if I'm hand-coding an 
embedded Jetty server, but I can't work out how to do it when Jetty is 
running solely by virtue of my having declared some servlet and filter 
@Components.


Some examples of the things I'd like to do:

(1) Stop it serving some default index.html, which it seems to do unasked.
(2) Turn on request logging.
(3) Include the X-Ray stuff, but have it served from a different port to 
the one used for my servlets.
(4) Include some security (eg basic authentication, set differently for 
different URLs)
(5) Get it to dump out its configuration so that I do actually know 
whether my configuration changes are being recognised!
(6) Allow install-time and run-time configuration changes (a 
configuration.json embedded in a JAR doesn't do that)
(7) Get it to serve static HTML pages (and other resources) (I've read 
http://enroute.osgi.org/services/osgi.enroute.webserver.capabilities.html 
 
several times but don't, I'm afraid, understand a word of it - the first 
two paragraphs of the the When to Use? section are OK but then I get 
completely lost)


--
Tim Ward

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev