Java: saving List<List<String>> to disk gives IOException

I have a List<List<String>> that I am trying to save on my disk.

This is what I do:

// Create a file name
String fileName = createFileName(waypoints);

// Save a file
File file = new File(directory,fileName);

try
{
    // Option 1
    FileOutputStream fos = new FileOutputStream(file);
    ObjectOutput s = new ObjectOutputStream(fos);
    s.writeObject(myArray);
    s.flush();
    s.close();

    // Option 2       
    //FileOutputStream fos = new FileOutputStream(file);
    //ObjectOutputStream oos = new ObjectOutputStream(fos);
    //oos.writeObject(myArray);
    //oos.close();

    // This test works fine
    //FileWriter fw = new FileWriter(file.getAbsoluteFile());
    //BufferedWriter bw = new BufferedWriter(fw);
    //bw.write("THIS IS TEXT");
    //bw.close();
 }
 catch (IOException e)
 {
            String message = "An error has occurred.";
            JOptionPane.showMessageDialog(new JFrame(), message, "Error Saving the File",
            JOptionPane.ERROR_MESSAGE);
 }

I always get the IOException error. Is there a different way to save the two-way String List?

EDIT: Saving a copy of the array as a new array and saving that to the disk solved the problem. Thanks to everyone!

Thank you!