You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Irina Merkulovich (JIRA)" <ji...@apache.org> on 2016/01/12 17:12:39 UTC
[jira] [Commented] (CAMEL-9289) loggingFeatureEnabled in Spring
configured cxfEndpoint does not support Spring Property Placeholders
[ https://issues.apache.org/jira/browse/CAMEL-9289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15094161#comment-15094161 ]
Irina Merkulovich commented on CAMEL-9289:
------------------------------------------
Try to use this:
<cxf:properties>
<entry key="dataFormat" value="CXF_MESSAGE"/>
<entry key="loggingFeatureEnabled" value="${cxf.messagelogging}" />
</cxf:properties>
> loggingFeatureEnabled in Spring configured cxfEndpoint does not support Spring Property Placeholders
> ----------------------------------------------------------------------------------------------------
>
> Key: CAMEL-9289
> URL: https://issues.apache.org/jira/browse/CAMEL-9289
> Project: Camel
> Issue Type: Improvement
> Components: camel-cxf
> Affects Versions: 2.16.0
> Reporter: Dave Riseley
> Priority: Minor
>
> When trying to define a cxfEndpoint in Spring xml as follows:
> {code:xml}
> <cxf:cxfEndpoint id="AbstractEndpoint" abstract="true" loggingFeatureEnabled="${cxf.messagelogging}">
> <cxf:properties>
> <entry key="dataFormat" value="CXF_MESSAGE"/>
> </cxf:properties>
> </cxf:cxfEndpoint>
> {code}
> This fails with the following error:
> {noformat}
> 2015-11-04 11:01:29,216 [WrapperSimpleAppMain] WARN o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 98 in XML document from URL [jar:file:/apps/local/il/lib/il-camel-ws-3.0.0-SNAPSHOT.jar!/META-INF/il-camel-ws/core-camel-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 98; columnNumber: 105; cvc-datatype-valid.1.2.1: '${cxf.messagelogging}' is not a valid value for 'boolean'.
> at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399) ~[spring-beans-4.1.8.RELEASE.jar!/:4.1.8.RELEASE]
> at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) ~[spring-beans-4.1.8.RELEASE.jar!/:4.1.8.RELEASE]
> at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304) ~[spring-beans-4.1.8.RELEASE.jar!/:4.1.8.RELEASE]
> ....
> at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53) [il-camel-ws-3.0.0-SNAPSHOT.jar!/:3.0.0-SNAPSHOT]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
> Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '${cxf.messagelogging}' is not a valid value for 'boolean'.
> at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) ~[na:1.8.0_60]
> at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134) ~[na:1.8.0_60]
> ...
> {noformat}
> We would like to be able to enable logging in development and turn it off in production, so being able configure it using spring properties would be very useful ( maybe along with loggingSizeLimit and skipFaultLogging ).
> Note: Our configuration works as expected using a hardcoded "true" or "false"
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)