« Return to Thread: expressions conflict with property-placeholder
Steve A. wrote:
>
> Regardless, that worked! Thanks!
>
Apparently, I spoke too soon. :-( It worked for all cases except for any
port attribute substitution which would lead me to believe that it must be
trying to validate the attribute type before the substitution occurs.
Check out excerpts from my configuration and resulting errors below.
Thoughts?
Steve
...
<spring:bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<spring:property name="location" value="mule.properties" />
<spring:property name="placeholderPrefix" value="$${" />
</spring:bean>
...
<smtp:outbound-endpoint transformer-refs = "ObjectToString
StringToEmailMessage"
from = "$${smtp.from}"
host = "$${smtp.host}"
password = "$${smtp.password}"
port = "$${smtp.port}"
replyTo="$${smtp.replyTo}"
subject = "$${smtp.subject}"
to = "$${smtp.to}"
user = "$${smtp.user}"
/>
...
INFO 2008-09-25 09:06:33,565 [main]
org.springframework.beans.factory.xml.XmlBeanDefinitionReader: Loading XML
bean definitions from URL
[file:/C:/Dev/Workspaces/sanderson/IDP/conf/idp-mule-config.xml]
ERROR 2008-09-25 09:06:34,049 [main]
org.mule.config.builders.AbstractConfigurationBuilder: Configuration with
"org.mule.config.spring.SpringXmlConfigurationBuilder" failed.
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
88 in XML document from URL
[file:/C:/Dev/Workspaces/sanderson/IDP/conf/idp-mule-config.xml] is invalid;
nested exception is org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.3:
'$${smtp.port}' is not a valid value of union type
'substitutablePortNumber'.
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at
org.mule.config.spring.MuleApplicationContext.loadBeanDefinitions(MuleApplicationContext.java:216)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
at
org.mule.config.spring.MuleApplicationContext.<init>(MuleApplicationContext.java:102)
at
org.mule.config.spring.MuleApplicationContext.<init>(MuleApplicationContext.java:56)
at
org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringParentRegistry(SpringXmlConfigurationBuilder.java:95)
at
org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:71)
at
org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:38)
at
org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at
org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:107)
at
org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57)
at
org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:38)
at
org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at
org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:178)
at org.mule.MuleServer.initialize(MuleServer.java:351)
at org.mule.MuleServer.run(MuleServer.java:257)
at org.mule.MuleServer.start(MuleServer.java:244)
at org.mule.MuleServer.main(MuleServer.java:121)
Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.3:
'$${smtp.port}' is not a valid value of union type
'substitutablePortNumber'.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:410)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3165)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processOneAttribute(XMLSchemaValidator.java:2748)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(XMLSchemaValidator.java:2685)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2037)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:705)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2740)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
... 22 more
--
View this message in context: http://www.nabble.com/expressions-conflict-with-property-placeholder-tp19637042p19669315.html
Sent from the Mule - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
« Return to Thread: expressions conflict with property-placeholder
| Free embeddable forum powered by Nabble | Forum Help |