"Thorns," those sometimes pesky sometimes debilitating events in life which crate opportunity to really trust our Father in heaven. Sometimes thorns are placed in our path by the Father. They would neither be sinful nor tempting since James tells us He will do neither. However, thorns are sometimes created by the sinful acts of ourselves or others. Jesus felt the thorn of betrayal by both Judas and Peter. Read 2 Corinthians 11:25-29 and take note of the things others did which caused suffering for Paul. Sin can result in hardship and trial for us. Our sin can also create thorns in our life.
It is faith, trusting in God which enables us to overcome our sin and the sin of others which affects us. Believing enough to obey means we avoid the pitfalls of sin the the thorns which accompany them.