I can't find the mistake `java.lang.NullPointerException` in the line '`e = servidor.listarTrinos();`' `listaTrinosSistema` is empty. Skip `ServicioDatosInterface` and `Trino`.

```
package Basededatos;

import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import Common.Gui;
import Common.ServicioDatosInterface;
import Common.Trino;
import Common.Utils;

public class Basededatos {

    private static ServicioDatosImpl servidor;

    public static void main(String[] args) throws Exception {
        Utils.setCodeBase(ServicioDatosInterface.class);    
        ServicioDatosImpl servidor = new ServicioDatosImpl();
        ServicioDatosInterface remote = (ServicioDatosInterface)UnicastRemoteObject.exportObject(servidor, 8888);

        Registry registry = LocateRegistry.createRegistry(Registry.REGISTRY_PORT);

        registry.rebind("Pepito", remote);

        menu();
    }
    public static void menu() throws RemoteException{
        int opt = 0;
        do {
            opt = Gui.menu("Menu Base de Datos", new String[]{ "listarTrinos" });

            switch (opt) {
                case 0: listarTrinos(); break;
            }
        }
        while (opt != 1);
    }

    public static void listarTrinos() throws RemoteException{
        List<Trino> e;
        e = servidor.listarTrinos();
        System.out.print("Trinos enviados");
        Iterator<Trino> nombreIterator = e.iterator();
        while(nombreIterator.hasNext()){
            String elemento = nombreIterator.next().toString();
            System.out.print(elemento+" / ");
        }
    }
}

```

package Basededatos;

```
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import Common.ServicioDatosInterface;
import Common.Trino;

    public class ServicioDatosImpl implements ServicioDatosInterface{

        private List<Trino> listaTrinosSistema = new ArrayList<Trino>();

        public List<Trino> listarTrinos() throws RemoteException{
            //if (listaTrinosSistema.isEmpty() == true || listaTrinosSistema.size()==0) return null;
            //else return listaTrinosSistema;
            return listaTrinosSistema;
        }

```