Hi,
I think that this issue may be caused because the custom policy you've created is being used by Virtual DataPort while you're trying to remove it.
What I would do is to remove all the occurrences of the custom policy before removing the jar using the jar management.
On the other hand, I'd also take into account that the user configuration to whom the custom policy is applied is correct before removing it.
Hope this helps!