freemarker.core.InvalidReferenceException

The following has evaluated to null or missing: ==> bean[colName] [in template "front.ftl" at line 46, column 35] Tip: It's the final [] step that caused this error, not those before it. Tip: If the failing expression is known to be 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: ${bean[colName]} [in template "front.ftl" at line 46, column 33] at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)

Samebug tips0

There are no available Samebug tips.

Don't give up yet. Paste your full stack trace to get a solution.

Stack trace

  • freemarker.core.InvalidReferenceException: The following has evaluated to null or missing: ==> bean[colName] [in template "front.ftl" at line 46, column 35] Tip: It's the final [] step that caused this error, not those before it. Tip: If the failing expression is known to be 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: ${bean[colName]} [in template "front.ftl" at line 46, column 33] at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134) at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:451) at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:374) at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:96) at freemarker.core.DollarVariable.accept(DollarVariable.java:59)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

No Bugmate found.