Migrating to Hibernate User Management Failed with JasperException

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

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


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:


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:
    
    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:
    
    delete from os_user_group where user_id = <user id returned from the query above>;
    

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.