Migrating to Hibernate User Management Failed with JasperException

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

Symptoms

Migrating to new User Management fails with the following error in the browser:

1 2 3 4 5 6 7 8 9 10 javax.servlet.error.exception: org.apache.jasper.JasperException: An exception occurred processing JSP page /admin/osuser2atluser.jsp at line 73 70: out.print("Migrating users and groups ... "); 71: try 72: { 73: migrator.migrate(migratorConfiguration, new HtmlJspWriterMigrationProgressListener(out)); 74: out.print("<p>Users and groups migrated successfully!</p>"); 75: } 76: catch (DuplicateEntityException dee)

The following appears in the atlassian-confluence.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Caused by: java.lang.NullPointerException at com.atlassian.user.util.migration.OSUserDao$4.processRow(OSUserDao.java:114) at org.springframework.jdbc.core.JdbcTemplate$RowCallbackHandlerResultSetExtractor.extractData(JdbcTemplate.java:1248) at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:395) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:405) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:409) ... at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy39.migrate(Unknown Source) at org.apache.jsp.admin.osuser2atluser_jsp._jspService(osuser2atluser_jsp.java:136) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393) ... 58 more

Cause

Confluence hit a reference to non-existent user in the os_user_group table, hence it was not able to complete the user migration. The root cause for what has corrupted the table is unknown.

Resolution

  1. Identify the rogue rows that prevented your users from being migrated by running the following query:

    1 2 select os_user_group.* from os_user_group left join os_user on os_user_group.user_id = os_user.id where os_user.id is null;
  2. Delete the rogue user id from your database:

    1 2 delete from os_user_group where user_id = <user id returned from the query above>;
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.