Spring xml config: boolean type validation #5528

Closed
asidyakin opened this Issue Jun 17, 2015 · 5 comments

Projects

None yet

4 participants

@asidyakin

In spring config, when trying inject boolean property in hazelcast bean(<hz:hazelcast:....</hz:hazelcast)
throw exception
Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '${statistics.enabled}' is not a valid value for 'boolean'.

solutions:

  1. Custom XMLBeanDefinitionReader with disabled schema validation
  2. Not XML configuration (java)

Such approachs aren't applicable in our project.

Need all boolean properties change from xs:boolean to xs:string in hazelcast-spring.xsd

@dsukhoroslov
Contributor

the same issue is mentioned here: #4700

@mesutcelik
Contributor

@bilalyasar ,

is it possible fail fast here by checking the value is either spring placeholder like ${statistics.enabled} or in a type of it should be i.e. boolean?

@mesutcelik mesutcelik added this to the 3.6 milestone Jun 24, 2015
@bilalyasar
Collaborator

@mesutcelik , no it is not possible, in xsd we couldn't define multiple types.

@mesutcelik
Contributor

not in the xsd but programatically.

@mesutcelik
Contributor

fixed by #5590

@mesutcelik mesutcelik closed this Jul 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment