You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by shomeier <sa...@gmail.com> on 2015/04/29 13:00:31 UTC

META-INF/mime.types is not recognized in ServiceMix

Hello together,

I have a problem to add additional MimeTypes (next to the default ones which
are in org.apache.servicemix.specs.activation-api-1.1-2.4.0.jar).

I put the mime.types file into the folder META-INF/ of my OSGi bundle and
from inside the bundle I try to recognize the MimeType via new
MimetypesFileTypeMap().getContentType(file).

When I run this bundle inside a pure OSGi Equinox environment (without
Karaf/ServiceMix) it recognizes *.png files as image/png (as I added this
into my mime.types).
But when I run this bundle inside the ServiceMix 5.3.0 (framework=equinox)
it recognizes *.png files as application/octet-stream (I guess because
image/png is not specified in default.mimtypes in
org.apache.servicemix.specs.activation-api-1.1-2.4.0.jar).

ServiceMix environment: OpenJDK 1.7 on RHEL 6
Pure OSGi environment: Java 7 on Mac OS X 10.10.3

Does anyone has a hint for me what could be wrong?

tia

Cheers
Sascha



--
View this message in context: http://servicemix.396122.n5.nabble.com/META-INF-mime-types-is-not-recognized-in-ServiceMix-tp5722562.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.