[ 
https://issues.apache.org/jira/browse/FELIX-6109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet resolved FELIX-6109.
------------------------------------
    Resolution: Fixed

> NPE from null listener in DirectoryWatcher.findListener
> -------------------------------------------------------
>
>                 Key: FELIX-6109
>                 URL: https://issues.apache.org/jira/browse/FELIX-6109
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-3.6.4
>            Reporter: Stephen Marquard
>            Assignee: Guillaume Nodet
>            Priority: Major
>             Fix For: fileinstall-3.6.6
>
>
> This error shows up intermittently in an OSGI application:
>  
> {code}
> *ERROR* [org.osgi.service.cm.ManagedServiceFactory, id=13, 
> bundle=6/file:/opt/ls/bundles/system/org.apache.felix.fileinstall-3.6.4.jar]: 
> Unexpected problem updating configuration 
> org.apache.felix.fileinstall.06a753e4-56fc-42fa-8a5b-c2b0b374581f
> java.lang.NullPointerException
>  at 
> org.apache.felix.fileinstall.internal.DirectoryWatcher.findListener(DirectoryWatcher.java:533)
>  at 
> org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:460)
>  at 
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365)
>  at 
> org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:247)
>  at 
> org.apache.felix.fileinstall.internal.FileInstall.updated(FileInstall.java:254)
>  at 
> org.apache.felix.fileinstall.internal.FileInstall$ConfigAdminSupport$Tracker.updated(FileInstall.java:378)
>  at 
> org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159)
>  at 
> org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93)
>  at 
> org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1400)
>  at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138)
>  at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105)
>  at java.lang.Thread.run(Thread.java:748)
> {code}
>  
>  The NPE seems to imply that there is a null listener in the list of 
> listeners here:
>  
> {code:java}
>   ArtifactListener findListener(File artifact, List<ArtifactListener> 
> listeners)
>     {
>         for (ArtifactListener listener : listeners) {
>             if (listener.canHandle(artifact)) {
>                 return listener;
>             }
>         }
>         return null;
> {code}
>  
> I don't know how that situation arises (some type of race condition, given 
> that it's unpredictable), but seems like it should be easy enough to check 
> for and ignore.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to