Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cannot connect to h2db



Confluence didn't start anymore, I was using a h2db for testing purpose with already some configuration :

Can you help ?

(We plan also to migrate to Confluence Cloud, but before we need to be able to connect Confluence h2db back again)

Error : "Could not load bootstrap from environment"

2021-03-24 11:19:25,493 ERROR [Catalina-utility-2] [atlassian.confluence.setup.ConfluenceConfigurationListener] contextInitialized An error was encountered while bootstrapping Confluence (see below):
Cannot connect to h2db
java.lang.RuntimeException: Cannot connect to h2db
at com.atlassian.h2.DatabaseCreatingServerLifecycle.start(
at com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateConfig.getHibernateProperties(
at com.atlassian.confluence.setup.DefaultBootstrapManager.getHibernateProperties(
at com.atlassian.confluence.setup.DefaultBootstrapManager.performPersistenceUpgrade(
at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(
at com.atlassian.confluence.setup.DefaultBootstrapManager.init(
at com.atlassian.config.util.BootstrapUtils.init(
at com.atlassian.confluence.setup.ConfluenceConfigurationListener.initialiseBootstrapContext(
at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(
at org.apache.catalina.core.StandardContext.listenerStart(
at org.apache.catalina.core.StandardContext.startInternal(
at org.apache.catalina.util.LifecycleBase.start(
at org.apache.catalina.core.ContainerBase$
at org.apache.catalina.core.ContainerBase$
at java.base/ Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)
at org.apache.tomcat.util.threads.TaskThread$
at java.base/ Source)
Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.ArrayIndexOutOfBoundsException: Index 59 out of bounds for length 59" [50000-196]
at org.h2.message.DbException.getJdbcSQLException(
at org.h2.message.DbException.get(
at org.h2.message.DbException.convert(
at org.h2.engine.Database.openDatabase(
at org.h2.engine.Database.<init>(
at org.h2.engine.Engine.openSession(
at org.h2.engine.Engine.openSession(
at org.h2.engine.Engine.createSessionAndValidate(
at org.h2.engine.Engine.createSession(
at org.h2.engine.Engine.createSession(
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(
at org.h2.jdbc.JdbcConnection.<init>(
at org.h2.jdbc.JdbcConnection.<init>(
at org.h2.Driver.connect(
at java.sql/java.sql.DriverManager.getConnection(Unknown Source)
at java.sql/java.sql.DriverManager.getConnection(Unknown Source)
at com.atlassian.h2.DatabaseCreatingServerLifecycle.start(
... 19 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 59 out of bounds for length 59
at org.h2.index.PageDataLeaf.getRowAt(
at org.h2.index.PageDataLeaf.getRowWithKey(
at org.h2.index.PageDataNode.getRowWithKey(
at org.h2.index.PageDataIndex.getRowWithKey(
at org.h2.engine.Database.getPageStore(
at org.h2.engine.Database.openDatabase(

Thank you


1 answer

0 votes

This is the sort of error we see when the h2 database has become corrupted.

You may be able to rescue some of it if you are willing to spend some time tinkering with h2 database tools, but it would probably be quicker and easier to start up a new system, and import the latest standard xml backup from the broken one.


Thank you for the feedback.

I don't have any XML backup :/

I also start with success a new installation of Confluence with an empty database.

With h2 tools I can navigate to the corrupted one, but,

1)How can I find the corrupted data/values ?

2)and What are the records/table that need to be copied to the new H2 ?


Thank you 

This is a bit too far outside my area of knowledge.  I've used h2 a lot for development and testing, not just for Atlassian stuff, but I've only rescued one from a minor mistake once, all the other times it has failed (for Atlassian), I have been able to go back to an xml backup.

I'm afraid that if you don't have a backup, I am stuck.  I do not know how to undo the damage.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence Cloud

🎨 Add some visual life to your templates

Hi Atlassian Community, My name is Avni Barman, and I am a Product Manager on the Confluence Cloud team. Based on feedback from you, we are giving admins more power to create templates that a...

159 views 1 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you