RM upgrade to version 5.0.1 is failing from 4.0.7

Hello,
I am upgrading CLM from 4.0.7 to CLM 5.0.1 in windwos 2008 server and db is SQL Server 2012. RM upgrading is failing in step 2 # Finalize RM application.
I am getting the following error:
"com.ibm.team.repository.common.TeamRepositoryException: CRJAZ2642E The migration cannot continue because the application being migrated is not registered with the Jazz Team Server that is being converted for use as the application database."
Looks like, I am missing some steps. Jts, ccm and qm upgrade had no issues. Any idea?
Thanks,