I have this method to loop midi music forever (until midiAlive=false to kill thread).

//Loop MIDI music (loops)
public void loopMusic(int index) {
final int index2 = index; //so it can be accessed from within inner thread class
midiAlive=true; //set midiAlive to true, allow thread to run
Thread loopThread = new Thread (new Runnable() { //create inner thread class
public void run() { //thread run method
try {
stopMusic(); //stop all currently playing music first
String relPath = "Sounds/Music/" + music[index2]; //find file path
File file = new File(GameFrame.getFilePath(relPath)); //get file
midiSequence = MidiSystem.getSequence(file); //put file into sequence
midiSequencer.open(); //open sequencer
midiSequencer.setSequence(midiSequence); //set sequencer with our sequence
while (midiAlive) { //while our thread is still alive
midiSequencer.start(); //replay the sequence
while (midiSequencer.isRunning() && (midiAlive)) { //while or thread is alive and is still playing
Thread.sleep(1000); //sleep 1 second then check thread and isRunning status
}
}
midiSequencer.close(); //we are done looping, close sequencer
} catch (Exception e) {
midiAlive=false;
playSound(FX_ERROR);
System.out.println("ERROR LOOPING MUSIC (INDEX " + index2 + "): " + e.getMessage());
}
}
});
loopThread.start();
}

It works great .... but with only certain midi files. I have six relative file paths (stored in music[] array), all of which are valid, playable MIDI files, yet I can only get 2 of them to actually play, the rest give a runtime exception "could not get sequence from file". And believe me, the file path holds the CORRECT filepath to the file, but Java doesn't seem to like my midi files ... any suggestions?