sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Pauls (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SLING-7456) FlushCache in SlingServletResolver can throw an NPE
Date Wed, 31 Jan 2018 15:07:00 GMT

    [ https://issues.apache.org/jira/browse/SLING-7456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16346973#comment-16346973
] 

Karl Pauls commented on SLING-7456:
-----------------------------------

[~cziegeler], not sure - it looks like we might not have a cache if the cachesize is configured
to be > 5. Again, I'm not sure why this happend but it was in a messed up instance so maybe
that had something going wrong in the configs and ended-up with a cachesize too small?

> FlushCache in SlingServletResolver can throw an NPE
> ---------------------------------------------------
>
>                 Key: SLING-7456
>                 URL: https://issues.apache.org/jira/browse/SLING-7456
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Resolver 2.4.22
>            Reporter: Karl Pauls
>            Priority: Minor
>             Fix For: Servlets Resolver 2.4.24
>
>
> Given that we check for the this.cache being null everytime we reference the cache we
should probably do the same in flushCache. I can't reproduce it but the NPE looked like this:
> {noformat}
> java.lang.NullPointerException: null
> 	at org.apache.sling.servlets.resolver.internal.SlingServletResolver.flushCache(SlingServletResolver.java:1122)
[org.apache.sling.servlets.resolver:2.4.22]
> 	at org.apache.sling.servlets.resolver.internal.SlingServletResolver.onChange(SlingServletResolver.java:1464)
[org.apache.sling.servlets.resolver:2.4.22]
> 	at org.apache.sling.resourceresolver.impl.observation.BasicObservationReporter.reportChanges(BasicObservationReporter.java:211)
[org.apache.sling.resourceresolver:1.5.34]
> 	at org.apache.sling.jcr.resource.internal.JcrResourceListener.onEvent(JcrResourceListener.java:155)
[org.apache.sling.jcr.resource:3.0.8]
> 	at org.apache.jackrabbit.commons.observation.ListenerTracker$1.onEvent(ListenerTracker.java:190)
[org.apache.jackrabbit.jackrabbit-jcr-commons:2.16.0]
> 	at org.apache.jackrabbit.oak.jcr.observation.ChangeProcessor.contentChanged(ChangeProcessor.java:508)
[org.apache.jackrabbit.oak-jcr:1.8.1]
> 	at org.apache.jackrabbit.oak.plugins.observation.FilteringDispatcher.contentChanged(FilteringDispatcher.java:53)
[org.apache.jackrabbit.oak-core:1.8.1]
> 	at org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$1$1.call(BackgroundObserver.java:128)
[org.apache.jackrabbit.oak-store-spi:1.8.1]
> 	at org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$1$1.call(BackgroundObserver.java:122)
[org.apache.jackrabbit.oak-store-spi:1.8.1]
> 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
> 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
> 	at java.base/java.lang.Thread.run(Thread.java:844)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message