Added a try/catch block for HibernateOptimisticLockingFailureException and StaleObjectStateException that loops when a student tries to add a project.