Peter Szanto created CXF-4502:
---------------------------------

             Summary: An Exception cannot contain sets
                 Key: CXF-4502
                 URL: https://issues.apache.org/jira/browse/CXF-4502
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime, JAXB Databinding
    Affects Versions: 2.6.1
            Reporter: Peter Szanto
            Priority: Critical


If I have an Exception that has a Set field like this :

        private Set<Integer> references; 

        public Set<Integer> getReferences() {
                return references;
        }

        public void setReferences(Set<Integer> references) {
                this.references = references;
        }


then when I throw it I get the below exception :

Caused by: java.lang.IllegalArgumentException: Argument is not an array
        at java.lang.reflect.Array.getLength(Native Method)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.writeArrayObject(JAXBEncoderDecoder.java:423)
        at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshallException(JAXBEncoderDecoder.java:389)



Looking at the source of JAXBEncoderDecoder.writeArrayObject it is quite 
obvious that List is explicitly handled, but handling a Set is missing.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to