Tux Guitar


Subject Fedora 9 error -- Java sound api cannot be loaded

Author Message
Post: Nov 5th 2008 at 2:47 AM

Hello there, as my topic description says I am having an error in Fedora 9, I installed Tuxguitar through Yum, and while it opens and seems to be working okay I get a popup with this error: "Java sound api cannot be loaded" and tuxguitar will no play any sounds. I am a bit of a Linux newbie so any help is greatly appreciated.

Back to Top
Post: Nov 8th 2008 at 11:36 AM

Hello, try run tuxguitar under a terminal
and paste here the error log

Back to Top
Post: Nov 10th 2008 at 10:45 PM

Hello there, thank you for the reply. My terminal output is as follows:

[Kae@localhost ~]$ tuxguitar
fluidsynth: ALSA driver: Using format s16, rw, interleaved
org.herac.tuxguitar.gui.system.plugins.TGPluginException: Java sound api cannot be loaded
at org.herac.tuxguitar.gui.system.plugins.base.TGMidiPortProviderPlugin.addPlugin(Unknown Source)
at org.herac.tuxguitar.gui.system.plugins.base.TGMidiPortProviderPlugin.setEnabled(Unknown Source)
at org.herac.tuxguitar.gui.system.plugins.base.TGPluginList.setEnabled(Unknown Source)
at org.herac.tuxguitar.gui.system.plugins.TGPluginManager.openPlugins(Unknown Source)
at org.herac.tuxguitar.gui.TuxGuitar.displayGUI(Unknown Source)
at org.herac.tuxguitar.gui.TGMain.main(Unknown Source)
Caused by: org.herac.tuxguitar.player.base.MidiPlayerException: Java sound api cannot be loaded
at org.herac.tuxguitar.player.impl.jsa.midiport.MidiPortProviderImpl.listPorts(Unknown Source)
at org.herac.tuxguitar.player.base.MidiPlayer.addPortProvider(Unknown Source)
at org.herac.tuxguitar.gui.system.plugins.base.TGMidiPortProviderPlugin.addPlugin(Unknown Source)
...5 more
Caused by: java.lang.UnsatisfiedLinkError: init_
at gnu.javax.sound.midi.alsa.AlsaMidiDeviceProvider.init_(libgcj.so.9)
at gnu.javax.sound.midi.alsa.AlsaMidiDeviceProvider.(libgcj.so.9)
at java.lang.Class.initializeClass(libgcj.so.9)
at java.lang.Class.newInstance(libgcj.so.9)
at gnu.classpath.ServiceProviderLoadingAction.run(libgcj.so.9)
at java.security.AccessController.doPrivileged(libgcj.so.9)
at gnu.classpath.ServiceFactory$ServiceIterator.loadNextServiceProvider(libgcj.so.9)
at gnu.classpath.ServiceFactory$ServiceIterator.(libgcj.so.9)
at gnu.classpath.ServiceFactory.lookupProviders(libgcj.so.9)
at gnu.classpath.ServiceFactory.lookupProviders(libgcj.so.9)
at gnu.classpath.ServiceFactory.lookupProviders(libgcj.so.9)
at javax.sound.midi.MidiSystem.getMidiDeviceInfo(libgcj.so.9)
at org.herac.tuxguitar.player.impl.jsa.midiport.MidiPortProviderImpl.listPorts(Unknown Source)
...7 more
[Kae@localhost ~]$

=) Thanks again.

Back to Top
Post: Nov 11th 2008 at 8:51 PM

The reason is because you are running tuxguitar with "GCJ", it don't have "Java Sound Api" support at all.

Java Sound Api is loaded by "tuxguitar-jsa" plugin.
you can run tuxguitar without this plugin,
So if you want to use GCJ, you'll need to use "tuxguitar-alsa" to play sounds.
you can go to "Tools -> Plugins" and disable "Java Sound Api plugin" first to don't see this error anymore.

Then check if Alsa plugin is installed. (i don't know if it's a new package or not on yum repositories )
If it's on the list, so it's installed.
try install an external sound synthesizer "timidity".
once installed, run on a terminal:
timidity -iA -Os
And on tuxguitar, go to Tools -> Settings and on Sound Section, select Timidity as a MIDI Port.

The second option, is to install (or configure as default) a "Sun" java instead of GCJ.

Back to Top
Post: Nov 13th 2008 at 6:38 PM

Thank you so very much, that works absolutely beautifully!

Great job on the program it's absolutely awesome!

Back to Top