Contradiction with Proverbs 24:17
Proverbs 24:17 advises not to rejoice when your enemy falls, in contrast to Psalms 40:16 which encourages rejoicing in the Lord's deliverance.
Proverbs 24:17: Rejoice not when thine enemy falleth, and let not thine heart be glad when he stumbleth:
Contradiction with Matthew 5:44
Matthew 5:44 instructs to love your enemies, which contradicts the idea of rejoicing over others’ adversity that may arise from divine judgment implied in Psalms 40:16.
Matthew 5:44: But I say unto you, Love your enemies, bless them that curse you, do good to them that hate you, and pray for them which despitefully use you, and persecute you;