FreeMarker template error (DEBUG mode; use RETHROW in production!): The following has evaluated to null or missing: ==> consult.profileImage [in template "consult_detail_new.ftl" at line 38, column 22] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #if consult.profileImage?contains("fi... [in template "consult_detail_new.ftl" at line 38, column 17] ---- Java stack trace (for programmers): ---- freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...] at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134) at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:467) at freemarker.core.EvalUtil.coerceModelToStringOrUnsupportedMarkup(EvalUtil.java:422) at freemarker.core.Expression.evalAndCoerceToStringOrUnsupportedMarkup(Expression.java:130) at freemarker.core.BuiltInsForStringsBasic$containsBI._eval(BuiltInsForStringsBasic.java:92) at freemarker.core.Expression.eval(Expression.java:83) at freemarker.core.MethodCall._eval(MethodCall.java:58) at freemarker.core.Expression.eval(Expression.java:83) at freemarker.core.Expression.evalToBoolean(Expression.java:161) at freemarker.core.Expression.evalToBoolean(Expression.java:147) at freemarker.core.IfBlock.accept(IfBlock.java:49) at freemarker.core.Environment.visit(Environment.java:330) at freemarker.core.Environment.visit(Environment.java:336) at freemarker.core.Environment.visit(Environment.java:372) at freemarker.core.Environment.visitAndTransform(Environment.java:495) at freemarker.core.CompressedBlock.accept(CompressedBlock.java:42) at freemarker.core.Environment.visit(Environment.java:330) at freemarker.core.Environment.process(Environment.java:309) at freemarker.template.Template.process(Template.java:384) at com.ibsonet.util.TemplateUtils.createHtml(TemplateUtils.java:66) at com.ibsonet.service.impl.ConsultMaterializerServiceImpl.doMaterialize(ConsultMaterializerServiceImpl.java:123) at com.ibsonet.service.impl.ConsultMaterializerServiceImpl.lambda$materializeConsult$0(ConsultMaterializerServiceImpl.java:66) at java.lang.Thread.run(Thread.java:745)