Dashboard is empty with NPE thrown in the logs
Symptoms
You have integrated Bamboo to use LDAP for user management but after that, the dashboard becomes empty and in some other tabs clumsy. The following appears in the log files:
2012-11-15 19:03:49,851 ERROR [qtp1729932060-145] [CompoundRootAccessor] Caught an Ognl exception while getting property plansForDashboard
ognl.OgnlException: plansForDashboard [java.lang.NullPointerException]
at ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1299)
at ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:60)
at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:147)
at com.opensymphony.xwork.util.OgnlValueStack$ObjectAccessor.getProperty(OgnlValueStack.java:57)
at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1940)
at com.opensymphony.xwork.util.CompoundRootAccessor.getProperty(CompoundRootAccessor.java:334)
at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1940)
at ognl.ASTProperty.getValueBody(ASTProperty.java:114)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
at ognl.SimpleNode.getValue(SimpleNode.java:258)
at ognl.Ognl.getValue(Ognl.java:494)
at ognl.Ognl.getValue(Ognl.java:458)
at com.opensymphony.xwork.util.OgnlUtil.getValue(OgnlUtil.java:307)
at com.opensymphony.xwork.util.OgnlValueStack.findValue(OgnlValueStack.java:224)
at com.opensymphony.webwork.dispatcher.WebWorkRequestWrapper.getAttribute(WebWorkRequestWrapper.java:52)
at javax.servlet.ServletRequestWrapper.getAttribute(ServletRequestWrapper.java:93)
at javax.servlet.ServletRequestWrapper.getAttribute(ServletRequestWrapper.java:93)
at com.opensymphony.webwork.dispatcher.WebWorkRequestWrapper.getAttribute(WebWorkRequestWrapper.java:34)
at com.opensymphony.webwork.views.freemarker.ScopesHashModel.get(ScopesHashModel.java:66)
at freemarker.core.Environment.getGlobalVariable(Environment.java:1063)
:
:
:
Caused by: java.lang.NullPointerException
at com.atlassian.bamboo.webwork.StarterAction.isDashboardFilterEnabled(StarterAction.java:612)
at com.atlassian.bamboo.webwork.StarterAction.getPlansForDashboard(StarterAction.java:268)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:778)
at ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1297)
The following screenshots elaborate the issue:
Cause
The hibernate provider class is missing from the atlassian-user.xml
file. According to our documentation:
https://confluence.atlassian.com/display/BAMBOO/Integrating+Bamboo+with+LDAP
setp 2, point 3:
Please ensure that the following line is also active in your
atlassian-user.xml
(it should be there by default):
<hibernate name="Hibernate Repository" key="hibernateRepository" description="Hibernate Repository" />
the Hibranate provider has to be in atlassian-user.xml
along with LDAP provider.
Resolution
Check the $HOME\xml-data\configuration\atlassian-user.xml
file and ensure that the hibernate class above is included.