When taking damage from a Cactus or a Magma Block, calling the damage function (Damageable (Spigot-API 1.17.1-R0.1-SNAPSHOT API) (spigotmc.org)) during the EntityDamageEvent will print an error.
I have attached a blockdamagetest plugin that provides this, to replicate, load this up on a server, place down a magma block or a cactus, and take damage from it. I have also attached the output of the error for convenience.
Update: I have attached a slightly modified version of the plugin that is less buggy and prone to murdering you a bunch because I forgot an if statement. This still produces the same error.