Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring xml config: boolean type validation #5528

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

Comments

Projects
None yet
4 participants
@asidyakin
Copy link

commented Jun 17, 2015

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

This comment has been minimized.

Copy link
Contributor

commented Jun 17, 2015

the same issue is mentioned here: #4700

@mesutcelik

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2015

@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

This comment has been minimized.

Copy link
Collaborator

commented Jun 24, 2015

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

@mesutcelik

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2015

not in the xsd but programatically.

@mesutcelik

This comment has been minimized.

Copy link
Contributor

commented Jul 21, 2015

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
You can’t perform that action at this time.