|
Hello,
I got
such an exception when I try to marshall an array which is created, but
whose elements are null. I of course have the validation property of the my
marshaller set to true.
I
tried similar thing by marshalling with an object whose reference was null. This
object was not of type collection. I thought I would get validation exception
also here, but I did not.
So, my
question is, why do I get exception in the first case, but not in the second?
Actually what I want is that even if I want the marshalling validated, I don't
really want to get an exception because the array elements are null. Is it
possible?
Regards,
Sunay
The
exception given is:
ValidationException: Cannot validate a null Object.;
- location of error: XPATH: test at org.exolab.castor.xml.Validator.validate(Validator.java:97) at org.exolab.castor.xml.FieldValidator.validate(FieldValidator.java:233) at org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate(XMLClassDescriptorImpl.java:885) at org.exolab.castor.xml.Validator.validate(Validator.java:122) at org.exolab.castor.xml.Marshaller.validate(Marshaller.java:1890) at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:763) .... ...
This e-mail contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended recipients such as copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this e-mail. GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc. |
Title: Nachricht
- Re: [castor-dev] ValidationException when the elements... Yaldiz, Sunay
- Re: [castor-dev] ValidationException when the ele... Stein M. Hugubakken
