-
1. Re: internal-model-validation failure - <some attribute> is required
ctomc Nov 11, 2015 5:18 AM (in response to igarashitm)1 of 1 people found this helpfulHey,
in 10(could be already 9 not sure) we properly implemented alternatives & requires settings on attributes.
so take a look at your resource definition (xsd/xml has noting to do with it) and look at how you have attributes defined.
Looking at the code of your subsystem, I think you had the same problem all along as you weren't properly validating the model in "populateModel()" of your add handlers.
Now that default validation is added by server itself you see the problem exposed.
to use Attributes.<name-of-attribute>.validateAndSet(operation, model)
and you will see the problem exposed right away.
you can also remove switchyard/SwitchYardModuleAdd.java at master · jboss-switchyard/switchyard · GitHub all together as it is not needed. the second one takes care of everything.
The original sin comes from https://github.com/jboss-switchyard/switchyard/blob/master/release/jboss-as7/extension/src/main/java/org/switchyard/as7/extension/Attributes.java#L28
where you have attribute identifier defined as not allowing null, aka making it required, which makes validation fail.
-
2. Re: internal-model-validation failure - <some attribute> is required
igarashitm Nov 11, 2015 10:51 AM (in response to ctomc)Hi Tomaz,
Thanks for your reply, I thought the validation is performed against xsd. I'll dig into those handler and subsystem writer.
-
3. Re: internal-model-validation failure - <some attribute> is required
igarashitm Nov 11, 2015 10:13 PM (in response to igarashitm)OK, the problem is in a way we build the ModelNode - it actually put the identifier attribute into operation address but not as a top level attribute, therefore the validator never can find it. Adding it as a top level attribute as well made validator happy.