freemarker.template.TemplateModelException: Method public int com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getFailureBarWidth(int) threw an exception when invoked on com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan@7e731c29

Atlassian JIRA | Martin Meinhold | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Seen on JBAC {noformat} 2015-03-22 22:46:23,911 ERROR [http-bio-8085-exec-723] [runtime] Method public int com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getFailureBarWidth(int) threw an exception when invoked on com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan@7e731c29 Method public int com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getFailureBarWidth(int) threw an exception when invoked on com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan@7e731c29 The problematic instruction: ---------- ==> ${action.getFailureBarWidth(testCasePair.second)} [on line 45, column 86 in chain/view/viewTestsSummary.ftl] in user-directive ui.barGraph [on line 45, column 25 in chain/view/viewTestsSummary.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Method public int com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getFailureBarWidth(int) threw an exception when invoked on com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan@7e731c29 at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:130) at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:104) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Expression.getStringValue(Expression.java:93) ... at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getMaxFailures(ViewTestsSummaryForPlan.java:80) at com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getFailureBarWidth(ViewTestsSummaryForPlan.java:61) at sun.reflect.GeneratedMethodAccessor8147.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:805) at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:106) ... 283 more {noformat}

    Atlassian JIRA | 2 years ago | Martin Meinhold
    freemarker.template.TemplateModelException: Method public int com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getFailureBarWidth(int) threw an exception when invoked on com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan@7e731c29
  2. 0

    Seen on JBAC {noformat} 2015-03-22 22:46:23,911 ERROR [http-bio-8085-exec-723] [runtime] Method public int com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getFailureBarWidth(int) threw an exception when invoked on com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan@7e731c29 Method public int com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getFailureBarWidth(int) threw an exception when invoked on com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan@7e731c29 The problematic instruction: ---------- ==> ${action.getFailureBarWidth(testCasePair.second)} [on line 45, column 86 in chain/view/viewTestsSummary.ftl] in user-directive ui.barGraph [on line 45, column 25 in chain/view/viewTestsSummary.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Method public int com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getFailureBarWidth(int) threw an exception when invoked on com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan@7e731c29 at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:130) at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:104) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Expression.getStringValue(Expression.java:93) ... at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getMaxFailures(ViewTestsSummaryForPlan.java:80) at com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getFailureBarWidth(ViewTestsSummaryForPlan.java:61) at sun.reflect.GeneratedMethodAccessor8147.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:805) at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:106) ... 283 more {noformat}

    Atlassian JIRA | 2 years ago | Martin Meinhold
    freemarker.template.TemplateModelException: Method public int com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getFailureBarWidth(int) threw an exception when invoked on com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan@7e731c29

    Root Cause Analysis

    1. freemarker.template.TemplateModelException

      Method public int com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan.getFailureBarWidth(int) threw an exception when invoked on com.atlassian.bamboo.build.tests.ViewTestsSummaryForPlan@7e731c29

      at freemarker.ext.beans.SimpleMethodModel.exec()
    2. FreeMarker
      Expression.getStringValue
      1. freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:130)
      2. freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:104)
      3. freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
      4. freemarker.core.Expression.getStringValue(Expression.java:93)
      4 frames