freemarker.core.InvalidReferenceException

tip

One of your fields was evaluated with NULL. If it's supposed to be NULL, follow the recommendations on the first line of the stack trace, otherwise, check why your code is setting this field to NULL.

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

  • h3. Summary Linked repository usages page generates an error in the logs h3. Environment N/A h3. Steps to Reproduce # Create Linked Repository # Create Deployment Project and use "Source Checkout" task # Go to Linked Repositories and click Usages # Observe logs h3. Expected Results List of environments should contain deployment project name. h3. Actual Results List of environment doesn't contain deployment project name, the below exception is thrown in the atlassian-bamboo.log file: {noformat} 2016-07-04 15:54:50,626 ERROR [http-nio-6990-exec-9] [runtime] Error executing FreeMarker template FreeMarker template error: The following has evaluated to null or missing: ==> action.getDeploymentProject [in template "freemarker-lib/ui.ftl" at line 392, 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 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[/#if]. (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: #assign project = action.getDeploymen... [in template "freemarker-lib/ui.ftl" in macro "renderEnvironmentNameLink" at line 392, column 5] - Reached through: @ui.renderEnvironmentNameLink environ... [in template "build/common/repositoryCommon.ftl" in macro "viewGlobalRepositoryUsages" at line 176, column 17] - Reached through: @rc.viewGlobalRepositoryUsages planUs... [in template "admin/repository/viewGlobalRepositoryUsages.ftl" at line 16, column 5] - Reached through: @ww.form id="viewRepositoryUsagesForm... [in template "admin/repository/viewGlobalRepositoryUsages.ftl" at line 11, column 1] ---- 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.UnexpectedTypeException.newDesciptionBuilder(UnexpectedTypeException.java:80) at freemarker.core.UnexpectedTypeException.<init>(UnexpectedTypeException.java:43) at freemarker.core.NonMethodException.<init>(NonMethodException.java:49) at freemarker.core.MethodCall._eval(MethodCall.java:97) at freemarker.core.Expression.eval(Expression.java:81) at freemarker.core.Assignment.accept(Assignment.java:134) at freemarker.core.Environment.visit(Environment.java:362) at freemarker.core.Environment.invoke(Environment.java:714) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:86) at freemarker.core.Environment.visit(Environment.java:362) at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:239) at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:200) at freemarker.core.Environment.visitIteratorBlock(Environment.java:595) at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:81) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:67) at freemarker.core.Environment.visit(Environment.java:326) at freemarker.core.Environment.visit(Environment.java:368) at freemarker.core.Environment.invoke(Environment.java:714) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:86) at freemarker.core.Environment.visit(Environment.java:362) at freemarker.core.Environment.visitAndTransform(Environment.java:460) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:129) at freemarker.core.Environment.visit(Environment.java:326) at freemarker.core.Environment.visit(Environment.java:332) at freemarker.core.Environment.process(Environment.java:305) at freemarker.template.Template.process(Template.java:384) at org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:233) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:366) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:270) {noformat} h3. Notes h3.Workaround None.
    via by Krystian Brazulewicz [Atlassian],
  • Custom TemplateExceptionHandler
    via Stack Overflow by Pavel Ferdan
    ,
  • GitHub comment 159#152118884
    via GitHub by ns162002
    ,
  • Alexander McQueen - Haus of Gaga
    via by Unknown author,
    • freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...] at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134) at freemarker.core.UnexpectedTypeException.newDesciptionBuilder(UnexpectedTypeException.java:80) at freemarker.core.UnexpectedTypeException.<init>(UnexpectedTypeException.java:43) at freemarker.core.NonMethodException.<init>(NonMethodException.java:49) at freemarker.core.MethodCall._eval(MethodCall.java:97) at freemarker.core.Expression.eval(Expression.java:81) at freemarker.core.Assignment.accept(Assignment.java:134) at freemarker.core.Environment.visit(Environment.java:362) at freemarker.core.Environment.invoke(Environment.java:714) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:86) at freemarker.core.Environment.visit(Environment.java:362) at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:239) at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:200) at freemarker.core.Environment.visitIteratorBlock(Environment.java:595) at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:81) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:67) at freemarker.core.Environment.visit(Environment.java:326) at freemarker.core.Environment.visit(Environment.java:368) at freemarker.core.Environment.invoke(Environment.java:714) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:86) at freemarker.core.Environment.visit(Environment.java:362) at freemarker.core.Environment.visitAndTransform(Environment.java:460) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:129) at freemarker.core.Environment.visit(Environment.java:326) at freemarker.core.Environment.visit(Environment.java:332) at freemarker.core.Environment.process(Environment.java:305) at freemarker.template.Template.process(Template.java:384) at org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:233) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:366) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:270)

    Users with the same issue

    asdasd
    485 times, last one,
    Unknown visitor1 times, last one,
    Adarro
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor2 times, last one,
    12 more bugmates