GenericJDBCException occurs during migrating from server to cloud via Confluence Cloud Migration Assistant

Platform Notice: Cloud and Data Center - This article applies equally to both cloud 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

Summary

A GenericJDBCException may occur as shown below, when migrating from confluence server to confluence cloud via Confluence Cloud Migration Assistant .

1 2 3 4 5 6 7 8 2022-06-01 01:01:40,869 ERROR [pool-10862-thread-1] [engine.jdbc.spi.SqlExceptionHelper] logExceptions general error: "java.lang.NullPointerException" General error: "java.lang.NullPointerException" [50000-175] -- stepConfig: {"spaceKey":"ABCDEF","fileId":"abcdef-abcdef-abcdef-abcdef-abcdef","cloudId":"abcdef-abcdef-abcdef-abcdef-abcdef"} | cloudId: abcdef-abcdef-abcdef-abcdef-abcdef | planName: abcdef | stepType: CONFLUENCE_EXPORT | stepId: abcdef-abcdef-abcdef-abcdef-abcdef | planId: abcdef-abcdef-abcdef-abcdef-abcdef | cloudUrl: https://abcdef.atlassian.net | taskName: Migrate space abcdef | taskId: abcdef-abcdef-abcdef-abcdef-abcdef org.springframework.orm.hibernate5.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [select user2conte0_.RELATIONID as col_0_0_ from USERCONTENT_RELATION... ... Caused by: org.hibernate.exception.GenericJDBCException: could not prepare statement Caused by: org.h2.jdbc.JdbcSQLException: general error "java.lang.NullPointerException"

Cause

The exact cause is still unknown, but it is probably due to the use of embedded H2 DB.

As stated in the Atlassian documentation, H2 DB is for development and test purposes only.

The embedded H2 database is only supported for testing and app development purposes on non-clustered (single node) Confluence Data Center installations.

H2 DB itself is unstable and there is no guarantee that it can keep running normally, so it is not recommended for production environment.

However, some customers are using H2 DB in production environment from beginning without awareness of it.

Solution

If GenericJDBCException occurs during cloud migration and the use of H2 DB is confirmed, you should follow below steps.

  • Following Migrating to Another Database , migrate your environment from H2 database to a normal database (Postgres etc.) .

  • After DB is migrated, running CCMA and do cloud migration again.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.