[ https://issues.apache.org/jira/browse/CXF-3376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006641#comment-13006641 ]
Daniel Kulp commented on CXF-3376: ---------------------------------- byte[] wasn't mapped. If you look in AbstractTypeCreator.createTypeForClass(TypeClassInfo info), the if statements there didn't cover it at all. isArray(javaClass) returned false as it excludes byte[]. The default "else" just looked at the java.lang.reflect.Type which, for byte[] is a GenericArrayType with component type byte. That isn't in the defaultTypeMap. Thus, byte[] was being mapped to a complexType named "B]" which was an empty sequence. > Exception while sending array of byte (byte[]) > ----------------------------------------------- > > Key: CXF-3376 > URL: https://issues.apache.org/jira/browse/CXF-3376 > Project: CXF > Issue Type: Bug > Components: Aegis Databinding > Affects Versions: 2.3.2 > Reporter: Jara Cesnek > Assignee: Daniel Kulp > Priority: Critical > Fix For: 2.4, 2.3.4 > > > Caused by: org.apache.cxf.aegis.DatabindingException: Couldn't instantiate > class. [B. Nested exception is java.lang.InstantiationException: [B > at > org.apache.cxf.aegis.type.basic.BeanType.readObject(BeanType.java:194) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.aegis.AegisXMLStreamDataReader.read(AegisXMLStreamDataReader.java:83) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:51) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:36) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) > ~[cxf-bundle-2.3.2.jar:2.3.2] > at > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) > ~[cxf-bundle-2.3.2.jar:2.3.2] > ... 69 common frames omitted > Caused by: java.lang.InstantiationException: [B > at java.lang.Class.newInstance0(Class.java:340) ~[na:1.6.0_05] > at java.lang.Class.newInstance(Class.java:308) ~[na:1.6.0_05] > at > org.apache.cxf.aegis.type.basic.BeanType.readObject(BeanType.java:136) > ~[cxf-bundle-2.3.2.jar:2.3.2] > ... 88 common frames omitted -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira