This article explains how to fix the firewall policy import issue if it fails due to the predefined application's deletion from the backend.
This issue can happen if someone deletes the predefined application from the MySQL Database, the issue will occur.
For example, you will find the below error in SD.log during the import operation when a policy contains the object vnc in it at the device level:
net.juniper.jnap.sm.exceptionframework.smexceptions.ConcurrentEditException: Service Object vnc does not exist. It could have been deleted by some other user
To fix the issue for service junos-vnc, you need to recreate the object and save it in SD as a pre-defined object.
To do so, please follow the below steps:
mysql -ujboss -p$(grep mysql.jboss /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') sm_db -e "update ApplicationEntity set definitionType='1' where name='vnc'"
Once this is done, it should show up as a predefined object under Shared Objects >> Services and you should be able to import the policy in SD.