nosuchmethoderror to nullpointerexception