Error processing resource file '/system-interceptors.xml'

22 views
Skip to first unread message

Shantanu Ghosh

unread,
Jul 6, 2025, 10:31:10 PMJul 6
to Smooks Users
Hi,

We have been using Smooks 1.5.2 on JBoss and want to upgrade to latest - 2.2.1. All necessary changes have been done following the migration guide for smooks - https://www.smooks.org/documentation/#migrating_from_smooks_1_7_to_v2

However, getting this error at runtime while initializing smooks.
Caused by: org.smooks.api.SmooksException: Error processing resource file '/system-interceptors.xml'. at org.smooks.engine.resource.config.SystemResourceConfigSeqFactory.create(SystemResourceConfigSeqFactory.java:90) at org.smooks.engine.DefaultApplicationContextBuilder.registerSystemResources(DefaultApplicationContextBuilder.java:215) at org.smooks.engine.DefaultApplicationContextBuilder.initRegistry(DefaultApplicationContextBuilder.java:199) at org.smooks.engine.DefaultApplicationContextBuilder.build(DefaultApplicationContextBuilder.java:168) at ... ... 74 more Caused by: java.util.NoSuchElementException at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:365) at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) at java.util.ServiceLoader$1.next(ServiceLoader.java:480) at org.smooks.engine.resource.config.loader.xml.XmlResourceConfigLoader.getExtendedResourceConfigLoader(XmlResourceConfigLoader.java:448) at org.smooks.engine.resource.config.loader.xml.XmlResourceConfigLoader.loadExtendedResourceConfig(XmlResourceConfigLoader.java:403) at org.smooks.engine.resource.config.loader.xml.XmlResourceConfigLoader.loadV20XSDValidatedConfig(XmlResourceConfigLoader.java:214) at org.smooks.engine.resource.config.loader.xml.XmlResourceConfigLoader.loadConfigRecursively(XmlResourceConfigLoader.java:171) at org.smooks.engine.resource.config.loader.xml.XmlResourceConfigLoader.load(XmlResourceConfigLoader.java:142) at org.smooks.engine.resource.config.SystemResourceConfigSeqFactory.create(SystemResourceConfigSeqFactory.java:82) ... 78 more

Any pointers that might help identify resolving this issue.
Thanks in advance.

Claude

unread,
Jul 20, 2025, 2:41:36 PMJul 20
to Smooks Users
I've realised that no one responded to this. Usually this happens when resources like system-interceptors.xml are not visible to the class loader. I'm assuming you're running Smooks from an app container. Are you setting the right class loader when building the Smooks application context? 

Claude

Shantanu Ghosh

unread,
Jul 23, 2025, 2:38:23 AMJul 23
to Smooks Users
Hi, yes, this is being run from an app container, Jboss server to be specific. 
Earlier, the code was like  Smooks smooks = new Smooks(); with older version, which started throwing this error with the upgrade.
So, switched to  code below as suggested at few places:
Smooks smooks = new Smooks(new DefaultApplicationContextBuilder().withClassLoader(getClass().getClassLoader()).build()); or  
Smooks smooks = new Smooks(new DefaultApplicationContextBuilder().withSystemResources(true).build());
However, the same error appears.

Maybe this can help you to suggest something.
Thanks for your reply.

Shantanu

Sean Muir

unread,
Sep 10, 2025, 10:28:33 AMSep 10
to Smooks Users
Were you ever able to resolve your issue ? I am running into similar issue running inside of Camel using a shaded jar 
Tried your examples still no luck
What would be considered the "right class loader" ?  i have tried the exchange class loader among others
snippet i am trying

smooks = new Smooks(new DefaultApplicationContextBuilder()

.withClassLoader(classLoader).build());

Sean Muir

unread,
Sep 15, 2025, 1:52:55 PM (14 days ago) Sep 15
to Smooks Users
This is the line that the error is being thrown

final ContentHandlerFactory<?> contentHandlerFactory = registry.lookup(new ContentHandlerFactoryLookup("class"));

if (contentHandlerFactory == null) {

throw new SmooksConfigException(String.format("%s not found for content of type [class]. Hint: ensure the Smooks application context has the correct class loader set", ContentHandlerFactory.class.getName()));

}


so it appears the registry is not being set for "class" when running in camel



Shantanu Ghosh

unread,
Sep 16, 2025, 2:53:52 AM (13 days ago) Sep 16
to Smooks Users
Hi, No we were not able to fix this, waiting for some pointer to help.
Thanks for adding more to the issue. 
Reply all
Reply to author
Forward
0 new messages