Spring / Mule / CheckExclusiveAttributesException: The attributes of Element … do not match the exclusive groups …
Case
I have the following block in my Mule config file:
<servlet:inbound-endpoint path="authenticationService" address="http://localhost:1234">
. Even though this block matches XSD constraints, it is illegal from a functionnal point of view.
I get the following stacktrace:
Offending resource: mule-config.xml; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [lalou/jonathan/mule-config.xml]; nested exception is org.mule.config.spring.parsers.processors.CheckExclusiveAttributes$CheckExclusiveAttributesException: The attributes of Element servlet:inbound-endpoint{address=http://localhost:1234, name=.authenticationService:inbound.157:inbound-endpoint.158, path=authenticationService} do not match the exclusive groups [address] [ref] [path]
Explanation and Fix
The exception is meaningful: for the tag <servlet:inbound-endpoint
>, only one among the three following attributes is needed: path, ref and address.
To fix the issue, keep only the relevant attribute.