camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Riseley (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-9289) loggingFeatureEnabled in Spring configured cxfEndpoint does not support Spring Property Placeholders
Date Fri, 18 Dec 2015 19:21:46 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-9289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15064544#comment-15064544
] 

Dave Riseley commented on CAMEL-9289:
-------------------------------------

Thanks for the suggestion, but that didn't work - it failed with the same schema validation
error.

My use case is that that {{cxf:cxfEndpoint}} is defined as a simple spring bean outside of
a camel context - so I'm not sure the camel syntax would work in that instance.

Looking at the cxfEndpoint xsd it's defined as:

{{<xsd:attribute name="loggingFeatureEnabled" type="xsd:boolean"/>}}

so I think it just fails schema validation when the spring context is starting up...

> 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)

Mime
View raw message