2024-05-29 10:02:24,537 ERROR [org.jboss.as.ejb3.invocation] (default task-182) WFLYEJB0034: EJB Invocation failed on component cmp.JobManagerEJB for method public abstract net.juniper.jmp.PagingResult net.juniper.jmp.cmp.jobManager.JobManager.getAllJobInstances(net.juniper.jmp.cmp.jobManager.TimeZoneLocaleHelper,net.juniper.jmp.PagingContext) throws java.lang.Exception: javax.ejb.EJBException: javax.persistence.EntityNotFoundException: Unable to find net.juniper.jmp.cmp.jobManager.jpa.Schedule with id 21812240
To fix the issue, we need to delete the stale entries from the Job table with respect to the schedule table.Here are the steps to achieve this:
mysql -ujboss -p$(grep mysql.jboss /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') build_db SET FOREIGN_KEY_CHECKS=0; delete from Job where schedule_id not in (select id from Schedule); SET FOREIGN_KEY_CHECKS=1;