You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by sparkles <we...@yahoo.com> on 2015/05/05 20:52:58 UTC

ImageDataContentHandler correct DCH to write image/jpeg attachment?

When invoking a JAX-WS service that is supposed to send a multipart/related
message with an attachment whose Content-Type is "image/jpeg", the following
occurs:

Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for
MIME type image/jpeg
	at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:909)
	at javax.activation.DataHandler.writeTo(DataHandler.java:330)
	at
org.apache.cxf.attachment.AttachmentSerializer.writeAttachments(AttachmentSerializer.java:265)
	at
org.apache.cxf.interceptor.AttachmentOutInterceptor$AttachmentOutEndingInterceptor.handleMessage(AttachmentOutInterceptor.java:103)

Looking at the AttachmentUtil static initializer, it looks like the
org.apache.cxf.attachment.ImageDataContentHandler class should be the
DataContentHandler that should write the output for an attachment with MIME
type "image/jpeg". However, obviously, that's not happening, as evidenced by
the UnsupportedDataTypeException. Or maybe I'm just not understanding how
Javamail and the Java Activation Framework works.

Any ideas why this is happening?



--
View this message in context: http://cxf.547215.n5.nabble.com/ImageDataContentHandler-correct-DCH-to-write-image-jpeg-attachment-tp5757026.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: ImageDataContentHandler correct DCH to write image/jpeg attachment?

Posted by sparkles <we...@yahoo.com>.
This was due to an issue in the classloader where CXF is running. Thanks for
the...uh....attention. Heheh. :)







--
View this message in context: http://cxf.547215.n5.nabble.com/ImageDataContentHandler-correct-DCH-to-write-image-jpeg-attachment-tp5757026p5757210.html
Sent from the cxf-user mailing list archive at Nabble.com.