Hello,
I am working with wildfly 36.0.1.
I need to add a rule that when a file is not found, I redirect to the index page and adding expire cache header. But when I try to chain , deployment break with that stack.
2025-08-06 18:51:15,033 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."frontend.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."frontend.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "frontend.war"
at org.jboss...@28.0.1.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
at org.jb...@1.5.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1617)
at org.jb...@1.5.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1580)
at org.jb...@1.5.5.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1438)
at org.jbos...@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: UT000045: Error parsing predicated handler string unexpected node io.undertow.server.handlers.builder.PredicatedHandlersParser$PredicateOperatorNode@635c790f:
not file(%R) -> set(attribute='%{o,Cache-Control}', value='max-age=1800, public') -> rewrite('/index.html')
^
at io.under...@2.3.18.Final//io.undertow.server.handlers.builder.PredicatedHandlersParser.error(PredicatedHandlersParser.java:755)
at io.under...@2.3.18.Final//io.undertow.server.handlers.builder.PredicatedHandlersParser.handlePredicateNode(PredicatedHandlersParser.java:217)
at io.under...@2.3.18.Final//io.undertow.server.handlers.builder.PredicatedHandlersParser.handlePredicateOperatorNode(PredicatedHandlersParser.java:126)
at io.under...@2.3.18.Final//io.undertow.server.handlers.builder.PredicatedHandlersParser.handleNode(PredicatedHandlersParser.java:119)
at io.under...@2.3.18.Final//io.undertow.server.handlers.builder.PredicatedHandlersParser.parse(PredicatedHandlersParser.java:93)
at io.under...@2.3.18.Final//io.undertow.server.handlers.builder.PredicatedHandlersParser.parse(PredicatedHandlersParser.java:82)
at org.wildfly.ext...@36.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowHandlersDeploymentProcessor.handleInfoFile(UndertowHandlersDeploymentProcessor.java:100)
at org.wildfly.ext...@36.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowHandlersDeploymentProcessor.deploy(UndertowHandlersDeploymentProcessor.java:52)
at org.jboss...@28.0.1.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
... 8 more
If I chain only with the set attribute or the rewrite, it works.
Can you help me to make it works ?
Thank you
Thomas Franconville