A class of exactly solvable potentials related to the Jacobi polynomials