Hi,
I am experiencing one issue wherein if I trigger a dispatcher flush from my custom preprocessor code on page replication, I get error null for path message. This seems to be happening after SP upgrade to 17 but not sure this may be the only reason. This was a long existing logic and was working earlier.
In code we are invoking flush by using DispatcherFlusher provided by ACS-commons.
Note:- We have checked the permission setup and don't find any issue with that.
Error message:
![TarunKumar_0-1699614972719.png TarunKumar_0-1699614972719.png](https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/65920i7B96FC7C90EFD36A/image-size/medium?v=v2&px=400)
Log trace:
POST /bin/replicate HTTP/1.1] com.day.cq.replication.impl.servlets.CommandServlet Error during replication: null
java.lang.StackOverflowError: null
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.getSubject(Subject.java:296)
at org.apache.jackrabbit.oak.security.authentication.LoginContextProviderImpl.getSubject(LoginContextProviderImpl.java:97) [org.apache.jackrabbit.oak-core:1.22.15]
at org.apache.jackrabbit.oak.security.authentication.LoginContextProviderImpl.getLoginContext(LoginContextProviderImpl.java:79) [org.apache.jackrabbit.oak-core:1.22.15]
at org.apache.jackrabbit.oak.core.ContentRepositoryImpl.login(ContentRepositoryImpl.java:162) [org.apache.jackrabbit.oak-core:1.22.15]
at org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule$1.run(AbstractLoginModule.java:478) [org.apache.jackrabbit.oak-security-spi:1.22.15]
at org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule$1.run(AbstractLoginModule.java:475) [org.apache.jackrabbit.oak-security-spi:1.22.15]
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
at org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule.getRoot(AbstractLoginModule.java:475) [org.apache.jackrabbit.oak-security-spi:1.22.15]
at org.apache.jackrabbit.oak.security.authentication.token.TokenLoginModule.getTokenProvider(TokenLoginModule.java:232) [org.apache.jackrabbit.oak-core:1.22.15]
at org.apache.jackrabbit.oak.security.authentication.token.TokenLoginModule.login(TokenLoginModule.java:133) [org.apache.jackrabbit.oak-core:1.22.15]
at org.apache.felix.jaas.boot.ProxyLoginModule.login(ProxyLoginModule.java:52) [org.apache.felix.jaas:1.0.2]
at java.base/javax.security.auth.login.LoginContext.invoke(LoginContext.java:726)
at java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:665)
at java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:663)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:663)
public final void preProcess(final ResourceResolver resourceResolver,final ReplicationAction replicationAction,final ReplicationActionType replicationActionType, Map<Pattern, String> hierarchicalFlushRules) {
// all the variables are initialized and this is just sample logic
dispatcherFlusher.flush(resourceResolver, flushActionType, false, HIERARCHICAL_FILTER, flushPath);
}
}