felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elliot Huntington <elliot.hunting...@gmail.com>
Subject How to play an mp3 in felix
Date Wed, 19 Aug 2015 05:18:03 GMT
I am experimenting with an OSGi application using Felix. I wrote a very
simple application that plays an MP3 file (using
com.googlecode.soundlibs:mp3spi). This application works fine in standalone
mode in the JVM.

I used bnd to wrap the mp3spi jar and then tested the application in Felix
and got this error:

javax.sound.sampled.UnsupportedAudioFileException: could not get audio
input stream from input stream
    at
javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1121)

After some googling I found the reason for this is because the JVM's SPI
mechanism does not play well in an OSGi environment. This makes sense. I
found the Apache Aries SPI Fly project (
http://aries.apache.org/modules/spi-fly.html#releases) but I have not been
able to get this working successfully for my simple test application.

I'm just curious if anybody has a simple example, hopefully on github, of
how to play an MP3 file in Felix, or any OSGi container for that matter.

Thanks,
Elliot

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message