Details
-
Bug
-
Resolution: Not a bug
-
Low
-
None
-
2.0 beta 8
-
None
Description
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.