You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicemix.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2016/04/11 14:46:25 UTC

[jira] [Resolved] (SM-2938) activation-api - MailcapCommandMap cannot find content_handler for image/jpeg

     [ https://issues.apache.org/jira/browse/SM-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang resolved SM-2938.
------------------------------
       Resolution: Fixed
    Fix Version/s: specs-2.7.0

patch applied on behalf of Tomohisa Igarashi with thanks
http://git-wip-us.apache.org/repos/asf/servicemix-specs/commit/9ebaf3b5

> activation-api - MailcapCommandMap cannot find content_handler for image/jpeg
> -----------------------------------------------------------------------------
>
>                 Key: SM-2938
>                 URL: https://issues.apache.org/jira/browse/SM-2938
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: specs
>            Reporter: Tomohisa Igarashi
>            Assignee: Freeman Fang
>             Fix For: specs-2.7.0
>
>
> The MailcapCommandMap.getCommand() returns a map without checking if it actually contains a desired command, which causes following exception against content type 'image/jpeg' with Java8, as Java8 has a mailcap entry for 'image/jpeg' which doesn't define a content handler.
> {code}
> Caused by: javax.activation.UnsupportedDataTypeException: image/jpeg
> 	at javax.activation.DataHandler$ObjectDataSource.getInputStream(DataHandler.java:184)
> 	at org.switchyard.common.camel.HandlerDataSource.getInputStream(HandlerDataSource.java:45)
> 	at org.switchyard.common.camel.HandlerDataSource.getInputStream(HandlerDataSource.java:45)
> 	at javax.activation.DataHandler.getInputStream(DataHandler.java:67)
> 	at javax.activation.DataHandler.writeTo(DataHandler.java:80)
> 	at org.apache.cxf.attachment.AttachmentSerializer.writeAttachments(AttachmentSerializer.java:264)
> 	at org.apache.cxf.interceptor.AttachmentOutInterceptor$AttachmentOutEndingInterceptor.handleMessage(AttachmentOutInterceptor.java:103)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)[172:org.apache.cxf.cxf-core:3.0.4]
> 	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:425)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279)
> 	at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:314)
> 	at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:327)
> 	... 142 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)