Confluence returns system error due to 'Invocation of method 'isShowSignUp' in class com.atlassian.confluence.user.actions.LoginAction threw exception java.lang.NullPointerException at /login.vm'
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
After attempting to log in, Confluence returns System Error:
The following appears in the atlassian-confluence.log
:
2014-12-24 21:26:20,866 ERROR [http-bio-10565-exec-9] [opensymphony.webwork.dispatcher.VelocityResult] doExecute Unable to render Velocity Template, '/login.vm'
-- url: /confluence/login.action | userName: anonymous | action: login
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'isShowSignUp' in class com.atlassian.confluence.user.actions.LoginAction threw exception java.lang.NullPointerException at /login.vm[line 6, column 28]
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507)
at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at org.apache.velocity.Template.merge(Template.java:328)
at org.apache.velocity.Template.merge(Template.java:235)
at com.opensymphony.webwork.dispatcher.VelocityResult.doExecute(VelocityResult.java:91)
at com.atlassian.xwork.results.ProfiledVelocityResult.doExecute(ProfiledVelocityResult.java:21)
at com.atlassian.confluence.setup.webwork.EncodingVelocityResult.doExecute(EncodingVelocityResult.java:48)
at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:116)
at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:263)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:187)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:65)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
at com.atlassian.xwork.interceptors.XsrfTokenInterceptor.intercept(XsrfTokenInterceptor.java:100)
at com.atlassian.confluence.xwork.ConfluenceXsrfTokenInterceptor.intercept(ConfluenceXsrfTokenInterceptor.java:26)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
at com.atlassian.confluence.security.interceptors.CaptchaInterceptor.intercept(CaptchaInterceptor.java:50)
...
Caused by: java.lang.NullPointerException
at com.atlassian.confluence.user.crowd.DefaultApplicationCache.toCacheValue(DefaultApplicationCache.java:69)
at com.atlassian.confluence.user.crowd.DefaultApplicationCache.putApplication(DefaultApplicationCache.java:54)
at com.atlassian.confluence.user.crowd.CachedCrowdApplicationDao.findByName(CachedCrowdApplicationDao.java:50)
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:606)
... 295 more
Diagnosis
Determine the list_index
for each directory in the Confluence database using the following SQL query:
SELECT * FROM cwd_app_dir_mapping ORDER BY 5;
This error can also occur when the cwd_application and/or cwd_app_dir_mapping tables are empty after a failed XML import. If this is the case, please follow Unable to Log In to Confluence.
Cause
This problem occurs if the list index of your directories is not incremental (0,1,2..), or if the cwd_app_dir_mapping
the table does not include a directory with a list-index of 0.
Resolution
- Shutdown Confluence
Update the
cwd_app_dir_mapping
table so that thelist_index
of the directories are in proper incremental order (i.e., 0, 1, 2, ...). You can use the following SQL queries:UPDATE cwd_app_dir_mapping SET LIST_INDEX=0 WHERE ID=<first_id>; UPDATE cwd_app_dir_mapping SET LIST_INDEX=1 WHERE ID=<second_id>; UPDATE cwd_app_dir_mapping SET LIST_INDEX=2 WHERE ID=<third_id>;
- Restart Confluence
Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.