Try adding @ManyToMany(cascade = CascadeType.ALL) to your Cat object, to cascade your read operations.
With cascading set up properly you can change your saving code to;
Entitymanager em = emf.createEntityManager();
em.getTransaction().begin();
Student s = new Student();
Student s2 = new Student();
Cat c = new Cat();
// this should be c.setStudents(s2)
c.getStudents().add(s2);
em.persist(c);
em.getTransaction().commit();
Honestly don't fully understand why you are trying to assign two student sets into cats, you should join both sets into one and then add them to cats.
You also may want to look into explicitly setting your fetch type, @ManyToMany(fetch = FetchType.LAZY) or FetchType.EAGER.