When you get an exception using a method, you need to go into the API doc and read the description of why the method throws the exception. Have you done that? Do you have any questions about what the doc says?