karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabian Lange <fabian.la...@codecentric.de>
Subject Re: Exceptions with reference to overrides.properties
Date Tue, 06 Sep 2016 14:23:17 GMT
Created a JIRA https://issues.apache.org/jira/browse/KARAF-4700 - and added
empty files to our distribution to avoid the error in debug logging.

Fabian

On Tue, Sep 6, 2016 at 3:34 PM, Guillaume Nodet <gnodet@apache.org> wrote:

> Right, the obvious easiest workaround would be to create two empty files
>   etc/overrides.properties
>   etc/blacklisted.properties
>
> But please raise a JIRA, i'll have a look at disabling the exception at
> debug level and simply printing the message.
>
> 2016-09-06 15:23 GMT+02:00 Fabian Lange <fabian.lange@codecentric.de>:
>
> > Addition:
> > this problem seems to affect the blacklisting feature similarly
> >
> > String blacklisted = getString("blacklisted", new
> File(System.getProperty("
> > karaf.etc"), "blacklisted.properties").toURI().toString());
> >
> > Fabian
> >
> > On Tue, Sep 6, 2016 at 3:16 PM, Fabian Lange <
> fabian.lange@codecentric.de>
> > wrote:
> >
> > > Hi Guys,
> > > it seems to me the overrides.properties mechanism could be slightly
> > > improved.
> > >
> > > I am getting a lot of these:
> > >
> > > 2016-09-06T15:00:27.258+0200 | DEBUG | pool-22-thread-1
>  |
> > > Overrides        | org.apache.karaf.features.core - 4.0.6 | Unable to
> > load
> > > overrides bundles list
> > > java.io.FileNotFoundException: /Users/fabian/work/karaf/etc/
> > overrides.properties
> > > (No such file or directory)
> > > at java.io.FileInputStream.open0(Native Method)[:1.8.0_71]
> > > at java.io.FileInputStream.open(FileInputStream.java:195)[:1.8.0_71]
> > > at java.io.FileInputStream.<init>(FileInputStream.java:138)[:1.8.0_71]
> > > at java.io.FileInputStream.<init>(FileInputStream.java:93)[:1.8.0_71]
> > > at sun.net.www.protocol.file.FileURLConnection.connect(
> > > FileURLConnection.java:90)[:1.8.0_71]
> > > at sun.net.www.protocol.file.FileURLConnection.getInputStream(
> > > FileURLConnection.java:188)[:1.8.0_71]
> > > at java.net.URL.openStream(URL.java:1045)[:1.8.0_71]
> > > at org.apache.karaf.features.internal.service.Overrides.
> > > loadOverrides(Overrides.java:108)[6:org.apache.karaf.
> > features.core:4.0.6]
> > > at org.apache.karaf.features.internal.service.FeaturesServiceImpl.
> > > getDeploymentRequest(FeaturesServiceImpl.java:1148)
> > > [6:org.apache.karaf.features.core:4.0.6]
> > > at org.apache.karaf.features.internal.service.FeaturesServiceImpl.
> > > doProvision(FeaturesServiceImpl.java:1175)
> [6:org.apache.karaf.features.
> > > core:4.0.6]
> > > at org.apache.karaf.features.internal.service.
> > FeaturesServiceImpl$1.call(
> > > FeaturesServiceImpl.java:1074)[6:org.apache.karaf.features.core:4.0.6]
> > > at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_71]
> > > at java.util.concurrent.ThreadPoolExecutor.runWorker(
> > > ThreadPoolExecutor.java:1142)[:1.8.0_71]
> > > at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> > > ThreadPoolExecutor.java:617)[:1.8.0_71]
> > > at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
> > >
> > >
> > > The logic in Overrides.java is:
> > >
> > >             if (overridesUrl != null) {
> > >
> > >                 try (
> > >
> > >                         InputStream is = new URL(overridesUrl
> > > ).openStream()
> > >
> > >                 ) {
> > >
> > >
> > > so apparently the overridesUrl is not null.
> > >
> > > This is because https://github.com/apache/karaf/blob/
> > > 791ebb5f908e27fa389616c8bba456cf85807f4d/features/core/src/
> > > main/java/org/apache/karaf/features/internal/osgi/Activator.java#L175
> > > String overrides = getString("overrides", new File(System.getProperty("
> > > karaf.etc"), "overrides.properties").toURI().toString());
> > >
> > > so I do not have overrides, there is a default in place, which refers
> to
> > a
> > > nonexistant file.
> > > I might not need this feature and i would like to turn it "off" -
> > therefor
> > > I would need to supply overrides == null, which does not seem possible
> > > right now.
> > >
> > > Suggestions?
> > >
> > > Fabian
> > >
> > > --
> > > Fabian Lange | Performance Expert
> > > mobil: +49 (0) 160.3673393
> > >
> > > codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
> > >
> > > Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
> > > Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
> > > Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen
> > Schütz
> > >
> >
>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.com/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message