intermittent NPE in Felix resolver

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

intermittent NPE in Felix resolver

Jesse White
Hi,

We're using a custom distribution of Karaf 4.2.6 and are intermittently
running into the following exception on startup:

java.lang.NullPointerException
        at
org.apache.felix.resolver.ResolverImpl.mergeCandidatePackages(ResolverImpl.java:898)
        at
org.apache.felix.resolver.ResolverImpl.getPackages(ResolverImpl.java:776)
        at org.apache.felix.resolver.ResolverImpl.access$300(ResolverImpl.java:35)
        at org.apache.felix.resolver.ResolverImpl$4.run(ResolverImpl.java:1168)
        at
org.apache.felix.resolver.ResolverImpl$EnhancedExecutor$1.run(ResolverImpl.java:2489)
        at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

karaf.log is available here:
   https://gist.github.com/j-white/ba4f5d22a4d0ed7da3bc3d7a4029a3f4


During startup, we have a bundle that is loaded after all the core
bundles that assembles a list of features to install, and installs these
using the FeaturesService:

https://github.com/OpenNMS/opennms/blob/opennms-24.1.3-1/container/extender/src/main/java/org/opennms/karaf/extender/KarafExtender.java#L192

Any ideas what could be causing this? Bug in Felix?

Thanks,
Jesse
Reply | Threaded
Open this post in threaded view
|

Re: intermittent NPE in Felix resolver

jbonofre
Hi,

That's probably because you have several features providing the same
capability (package).

What feature are you installing ?

Regards
JB

On 21/08/2019 03:15, Jesse White wrote:

> Hi,
>
> We're using a custom distribution of Karaf 4.2.6 and are intermittently
> running into the following exception on startup:
>
> java.lang.NullPointerException
> at
> org.apache.felix.resolver.ResolverImpl.mergeCandidatePackages(ResolverImpl.java:898)
> at
> org.apache.felix.resolver.ResolverImpl.getPackages(ResolverImpl.java:776)
> at org.apache.felix.resolver.ResolverImpl.access$300(ResolverImpl.java:35)
> at org.apache.felix.resolver.ResolverImpl$4.run(ResolverImpl.java:1168)
> at
> org.apache.felix.resolver.ResolverImpl$EnhancedExecutor$1.run(ResolverImpl.java:2489)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:834)
>
> karaf.log is available here:
>    https://gist.github.com/j-white/ba4f5d22a4d0ed7da3bc3d7a4029a3f4
>
>
> During startup, we have a bundle that is loaded after all the core
> bundles that assembles a list of features to install, and installs these
> using the FeaturesService:
>
> https://github.com/OpenNMS/opennms/blob/opennms-24.1.3-1/container/extender/src/main/java/org/opennms/karaf/extender/KarafExtender.java#L192
>
> Any ideas what could be causing this? Bug in Felix?
>
> Thanks,
> Jesse
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: intermittent NPE in Felix resolver

Jesse White
Hi JB,

On 2019-08-21 1:01 a.m., Jean-Baptiste Onofré wrote:
> That's probably because you have several features providing the same
> capability (package).
>
> What feature are you installing ?

Thanks for the tip. I'll audit the features and see if that's the case.

We're mostly installing some of our own custom features.

Best,
Jesse