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
  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
  3. 0

    [WW-3609] Struts problem report not working properly (Freemarker template error in error.ftl at line 68 in conjunction with special exception types) - ASF JIRA

    apache.org | 1 year ago
    freemarker.template.TemplateModelException: Method public java.lang.String org.hibernate.exception.NestableRuntimeException.getMessage(int) threw an exception when invoked on org.hibernate.exception.GenericJDBCException: could not execute query
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When setting up crowd, if you don't do an import from bamboo but follow the instructions on the web page, you will end up with two bamboo-admin groups (the default one in bamboo and the one you created in crowd). Whilst this causes no functional problems you end up with every user being a member of two admin groups and a big stack trace on the view groups page whilst it is trying to count how many users belong to it. Method public int com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction.getUsersCountForGroup(com.atlassian.user.Group) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction@90a702 The problematic instruction: ---------- ==> ${action.getUsersCountForGroup(group)} [on line 13, column 13 in admin/group/viewPaginatedGroups.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Method public int com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction.getUsersCountForGroup(com.atlassian.user.Group) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction@90a702 at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136) at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160) at freemarker.core.Environment.visit(Environment.java:351) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:232) at . . . With the following error message in the logs 2008-04-01 14:54:53,536 INFO [btpool0-1] [AccessLogFilter] admin http://localhost:8085/admin/group/viewGroups.action 21772kb 2008-04-01 14:54:53,698 ERROR [btpool0-1] [runtime] Method public int com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction.getUsersCountForGroup(com.atlassian.user.Group) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction@90a702 The problematic instruction: ---------- ==> ${action.getUsersCountForGroup(group)} [on line 13, column 13 in admin/group/viewPaginatedGroups.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Method public int com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction.getUsersCountForGroup(com.atlassian.user.Group) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction@90a702 at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136) at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160) at freemarker.core.Environment.visit(Environment.java:351) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:232) at com.opensymphony.webwork.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:153) at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:143) . . . at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:227) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) Caused by: java.lang.IllegalArgumentException: Group passed to HibernateGroupManager must be of type 'DefaultHibernateGroup' at com.atlassian.user.impl.hibernate.HibernateGroupManager.getMemberNames(HibernateGroupManager.java:173) at com.atlassian.user.impl.cache.CachingGroupManager.getMemberNames(CachingGroupManager.java:193) at com.atlassian.user.impl.delegation.DelegatingGroupManagerTemplate.getMemberNames(DelegatingGroupManagerTemplate.java:81) at bucket.user.DefaultUserAccessor.getMemberNames(DefaultUserAccessor.java:580) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy6.getMemberNames(Unknown Source) at com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction.getUsersCountForGroup(BrowseGroupsAction.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:825) at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:113) ... 171 more To reproduce, setup bamboo, then setup crowd and create the bamboo-admin group in crowd as specified in the docs. Restart bamboo with crowd, view uses page.

    Atlassian JIRA | 9 years ago | Brydie McCoy [Atlassian]
    freemarker.template.TemplateModelException: Method public int com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction.getUsersCountForGroup(com.atlassian.user.Group) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction@90a702
  6. 0

    When setting up crowd, if you don't do an import from bamboo but follow the instructions on the web page, you will end up with two bamboo-admin groups (the default one in bamboo and the one you created in crowd). Whilst this causes no functional problems you end up with every user being a member of two admin groups and a big stack trace on the view groups page whilst it is trying to count how many users belong to it. Method public int com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction.getUsersCountForGroup(com.atlassian.user.Group) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction@90a702 The problematic instruction: ---------- ==> ${action.getUsersCountForGroup(group)} [on line 13, column 13 in admin/group/viewPaginatedGroups.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Method public int com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction.getUsersCountForGroup(com.atlassian.user.Group) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction@90a702 at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136) at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160) at freemarker.core.Environment.visit(Environment.java:351) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:232) at . . . With the following error message in the logs 2008-04-01 14:54:53,536 INFO [btpool0-1] [AccessLogFilter] admin http://localhost:8085/admin/group/viewGroups.action 21772kb 2008-04-01 14:54:53,698 ERROR [btpool0-1] [runtime] Method public int com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction.getUsersCountForGroup(com.atlassian.user.Group) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction@90a702 The problematic instruction: ---------- ==> ${action.getUsersCountForGroup(group)} [on line 13, column 13 in admin/group/viewPaginatedGroups.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Method public int com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction.getUsersCountForGroup(com.atlassian.user.Group) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction@90a702 at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136) at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160) at freemarker.core.Environment.visit(Environment.java:351) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:232) at com.opensymphony.webwork.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:153) at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:143) . . . at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:227) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) Caused by: java.lang.IllegalArgumentException: Group passed to HibernateGroupManager must be of type 'DefaultHibernateGroup' at com.atlassian.user.impl.hibernate.HibernateGroupManager.getMemberNames(HibernateGroupManager.java:173) at com.atlassian.user.impl.cache.CachingGroupManager.getMemberNames(CachingGroupManager.java:193) at com.atlassian.user.impl.delegation.DelegatingGroupManagerTemplate.getMemberNames(DelegatingGroupManagerTemplate.java:81) at bucket.user.DefaultUserAccessor.getMemberNames(DefaultUserAccessor.java:580) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy6.getMemberNames(Unknown Source) at com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction.getUsersCountForGroup(BrowseGroupsAction.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:825) at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:113) ... 171 more To reproduce, setup bamboo, then setup crowd and create the bamboo-admin group in crowd as specified in the docs. Restart bamboo with crowd, view uses page.

    Atlassian JIRA | 9 years ago | Brydie McCoy [Atlassian]
    freemarker.template.TemplateModelException: Method public int com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction.getUsersCountForGroup(com.atlassian.user.Group) threw an exception when invoked on com.atlassian.bamboo.ww2.actions.admin.group.BrowseGroupsAction@90a702

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    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