I have finally found a solution. I changed the import statement from
import com.fasterxml.jackson.annotate.JsonIgnore; // com. instead of org.
to
import org.codehaus.jackson.annotate.JsonIgnore;
Basically you have to make sure you are using the same class everywhere.