1 Reply Latest reply: Jun 22, 2012 10:32 AM by 898586 RSS

    Problem with installing of a service provider

    Rafal Z
      Hallo,
      I'm trying to install a service provider for speex conversion. I've created META-INF/services directory and placed there a file: javax.sound.sampled.spi.FormatConversionProvider with content: SpeexFormatConvertionProvider

      But after invoking AudioSystem.getAudioInputStream(targetFormat, audioInputStream); I get following exception:
      sun.misc.ServiceConfigurationError: javax.sound.sampled.spi.FormatConversionProvider: file:/C:/Projects/netbeans-projects/soundcheck/build/classes/META-INF/services/javax.sound.sampled.spi.FormatConversionProvider:1: Illegal provider-class name: org.xiph.speex.spi.SpeexFormatConvertionProvider
           at sun.misc.Service.fail(Service.java:129)
           at sun.misc.Service.fail(Service.java:135)
           at sun.misc.Service.parseLine(Service.java:160)
           at sun.misc.Service.parse(Service.java:207)
           at sun.misc.Service.access$100(Service.java:111)
           at sun.misc.Service$LazyIterator.hasNext(Service.java:258)
           at com.sun.media.sound.JSSecurityManager$7.run(JSSecurityManager.java:315)
           at com.sun.media.sound.JSSecurityManager$7.run(JSSecurityManager.java:313)
           at java.security.AccessController.doPrivileged(Native Method)
           at com.sun.media.sound.JSSecurityManager.getProviders(JSSecurityManager.java:319)
           at com.sun.media.sound.JDK13Services.getProviders(JDK13Services.java:117)

      I've tried to place in the file org.xiph.speex.spi.SpeexFormatConvertionProvider and org.xiph.speex.spi.SpeexFormatConvertionProvider.class but with the same result. The class exists. What am I doing wrong. The file is saved in UTF-8 format.

      with regards

      Rafal Ziolkowski