CAMEL-6921 Find another way to fix the NPE issue