Confluence throws a System Error when attempting to login
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Summary
After upgrading your Confluence instance and re-applying customizations, clicking on "Log in" or "Sign up" generates a System Error.
Environment
Confluence versions up to (not including) 9.0 with customized login.vm
file.
In Confluence 9, Velocity templates have been deprecated and replaced with Soy resources. As a result, this customization is not applicable to Confluence 9 or later versions.
See Deprecated code paths removed in 9.0 for additional details on that.
Diagnosis
When reviewing atlassian-confluence.log the following error is seen:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
2024-02-02 11:47:23,398 ERROR [http-nio-8090-exec-2 url: /portal/login.action] [apache.struts2.result.VelocityResult] doExecute Unable to render velocity template: '/login.vm'
-- url: /portal/login.action | userName: anonymous | action: login | referer: http://localhost:8090/portal/ | traceId: 9c8c0d6f0d77c9ff
org.apache.velocity.exception.ParseErrorException: Encountered "#end\n" at /login.vm[line 101, column 25]
Was expecting one of:
<EOF>
"(" ...
<RPAREN> ...
<ESCAPE_DIRECTIVE> ...
<SET_DIRECTIVE> ...
"##" ...
"\\\\" ...
"\\" ...
<TEXT> ...
"*#" ...
"*#" ...
<STRING_LITERAL> ...
<IF_DIRECTIVE> ...
<STOP_DIRECTIVE> ...
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<WORD> ...
<BRACKETED_WORD> ...
<IDENTIFIER> ...
<DOT> ...
"{" ...
"}" ...
at org.apache.velocity.Template.process(Template.java:141)
at com.atlassian.confluence.util.velocity.ConfigurableResourceManager.loadResource(ConfigurableResourceManager.java:349)
(...)
Cause
Such error can be triggered when your instance's login.vm configuration file has been customized and contains syntax errors or misconfigurations.
When the login.action endpoint is called, Confluence will read that file and if it is misconfigured, an error will occur, preventing users from properly authenticating to the instance.
Solution
Review your instance's <confluence-installation-directory>\confluence\login.vm
configuration file for possible parsing or syntax errors.
đź’ˇTo determine if customizations are causing the problem, you can replace this file with the default Confluence login.vm
file. Then, check to see if the issue persists.
For further details on how to customize Confluence's login page, please refer to Customizing the Login Page.
Was this helpful?