-1

I am trying to enable the retainDays option in my pax-web config like this:

org.ops4j.pax.web.config.file=etc/jetty.xml
org.osgi.service.http.port=80
javax.servlet.context.tempdir=data/pax-web-jsp
org.ops4j.pax.web.log.ncsa.format = /yyyy_mm_dd.request.log
org.ops4j.pax.web.log.ncsa.directory = ${karaf.data}/ncsa-log/
org.ops4j.pax.web.log.ncsa.retainDays = 3
org.ops4j.pax.web.log.ncsa.enabled = true

I am using pax-web version 1.1.17 (org.ops4j.pax.web.pax-web-jetty (1.1.17)) embedded in my ServiceMix 5.1.4.

However the jetty seems not starting when I restart my service.

As the official documentation mentions some other options, I also tried to add org.ops4j.pax.web.log.ncsa.extended = true but it does make no effect.

In fact in the documentation, there's no explanation of how to use the retainDays (I read sometime retaindays and tried also in lowercase) and what is the purpose of the option org.ops4j.pax.web.log.ncsa.extended.

Any idea on how to enable retainDays option?

UPDATE:

What's totally confused me is this new feature request in JIRA which mention a fixVersion: 1.1.0 which is inferior to my 'even old' version 1.1.17.

рüффп
  • 5,172
  • 34
  • 67
  • 113
  • 1
    Downvoters: please say why you down vote and how this question can be improved. I think I search everywhere and finally the documentation of the lib seems not correct. – рüффп Apr 06 '17 at 20:14

1 Answers1

-1

That is a very very old version of Pax-Web you got there, so it might very well be that there had been an issue with the ncsa.extended setting with that version. The documentation you've linked is for the current snapshot version which is Pax-Web 6.1.0-SNAPSHOT. So you see that there have been quite a lot of major releases between those version.

The org.ops4j.pax.web.log.ncsa.retaindays setting needs to be set as integer. The documentation is wrong concerning the camel case, will fix that.

The org.ops4j.pax.web.log.ncsa.extende setting is just a paththrough to the Jetty NCSA configuration:

http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/AbstractNCSARequestLog.html#setExtended-boolean-

Achim Nierbeck
  • 5,265
  • 2
  • 14
  • 22
  • Very old? apparently the version 1.1.18 has been released in November 2016... I am wondering if it's better to give it a try or to try to increase to version 6 immediately. Do you think pax-web-version 6 can be compatible with ServiceMix 5.1.4 (this one we cannot easily upgrade for the moment)? – рüффп Jan 13 '17 at 09:53
  • that's kind of hard to exchange, try with a newer version of ServiceMix, it should have a better version of Pax-Web available. – Achim Nierbeck Jan 13 '17 at 09:59
  • well 1.1.17 is from March 2014 ;) – Achim Nierbeck Jan 13 '17 at 15:29
  • Yes, exactly when we start to use ServiceMix 5... it took us 3 month of testing to pass from SMX 4 to SMX 5.... I don't know how long it will take to migrate to SMX 6 (latest stable...) but SMX 7 is already on the track... – рüффп Jan 13 '17 at 19:21
  • ...and I asked the question because this [JIRA ticket](https://ops4j1.jira.com/browse/PAXWEB-269) mentions a fix version: 1.1.0 – рüффп Jan 16 '17 at 11:43