I get this exception when i try to cast an Object array to a Long array.
Exception in thread \"main\" java.lang.ClassCastException: [Ljava.lang.O
change
returnValues = (Long[]) hotelRooms.keySet().toArray();
to
returnValues = hotelRooms.keySet().toArray(new Long[hotelRooms.size()]);
and let me know if it works :-)