Dispatcher flush not working when done from custom code. | Community
Skip to main content
TarunKumar
Community Advisor
Community Advisor
November 10, 2023

Dispatcher flush not working when done from custom code.

  • November 10, 2023
  • 1 reply
  • 676 views

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:

 

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);

}
}

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Shashi_Mulugu
Community Advisor
Community Advisor
November 10, 2023

@tarunkumar whats the ACS version you are using? Have you tried upgrading it? I believe I saw some issue with SP16 where some incompatible code with ACS flush thing.. Have to either upgrade ACS version or go with SP18.. so try either if not already..

TarunKumar
Community Advisor
Community Advisor
November 13, 2023

Hi @shashi_mulugu ,

ACS version that we are using is "4.11.2" and SP17. Would that be a problem or incompatible?. Let me know so that I can try upgrading them?

Thanks
Tarun