I had this error and fixed it by removing a thrown exception from beside the method to a try/catch block
For example: FROM:
public static HashMap<String, String> getMap() throws SQLException
{
}
TO:
public static Hashmap<String,String> getMap()
{
try{
}catch(SQLException)
{
}
}