Opening whitelist page will throw error 500
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
Trying to open Confluence Administration > Whitelist will throw an error 500.
Environment
The issue was detected on Confluence 7.4, but it can affect any version.
Diagnosis
In the <confluence-home>/logs/atlassian-confluence.log, prior to the 500page.jsp we would see something like this:
2021-09-23 19:46:44,013 ERROR [https-jsse-nio2-8443-exec-27] [[Standalone].[localhost].[/dcifcnfl].[servlet-module-container-servlet]] log Servlet.service() for servlet [servlet-module-container-servlet] in context with path [/dcifcnfl] threw exception
java.util.concurrent.CompletionException: net.java.ao.ActiveObjectsException: Could not find enum value for 'class com.atlassian.plugins.whitelist.WhitelistType' corresponding to database value '?]v(-oJeRl"bhSVUz-.82*Tr?E, DC7B':nCH.'lAw<h99j_rUo)-c+mCl|b\gnr2(bwyXw(kx('4"?p*zo[8z@bK:v[le^#p9~W]E,%=4yJcj4U>PwV43X#zz$/5WEV\jKSpN>B7^D\);+'0IWK3-mnOu(1VN!,%*#viP+B`ar1ap(ghsq4[@QE'db]t;@>00$%"vj3p:,QUttVTV<A^<Zav=#;3}aTQTIoy{A8Y+^j3;S^IaDo-fm@WE6h)+'
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
...
Caused by: net.java.ao.ActiveObjectsException: Could not find enum value for 'class com.atlassian.plugins.whitelist.WhitelistType' corresponding to database value '?]v(-oJeRl"bhSVUz-.82*Tr?E, DC7B':nCH.'lAw<h99j_rUo)-c+mCl|b\gnr2(bwyXw(kx('4"?p*zo[8z@bK:v[le^#p9~W]E,%=4yJcj4U>PwV43X#zz$/5WEV\jKSpN>B7^D\);+'0IWK3-mnOu(1VN!,%*#viP+B`ar1ap(ghsq4[@QE'db]t;@>00$%"vj3p:,QUttVTV<A^<Zav=#;3}aTQTIoy{A8Y+^j3;S^IaDo-fm@WE6h)+'
at net.java.ao.types.EnumType.pullFromDatabase(EnumType.java:36)
...
Running select on the database table AO_21D670_WHITELIST_RULES will show broken records like this:
select * from AO_21D670_WHITELIST_RULES;
Cause
At the moment, it is still unclear how these records are created.
Solution
Stop the Confluence, create the backup of the DB, and then remove affected rows, in this case:
DELETE FROM AO_21D670_WHITELIST_RULES WHERE ID IN (6,7,8,9);