Confluence 4.0 says "Could not open Hibernate Session for transaction" and "GenericJDBCException: Cannot open connection"

Hi!

We have Confluence 4.0 and it's using MySql-database. Once for a while it crashes and we must reboot it. Sometimes when shutting it down fails and trying to start again it says:

Error occurred during initialization of VM 
Could not reserve enough space for object heap

But that is maybe a different issue. When checking the logs I find error messages:

SEVERE: Exception Processing ErrorPage[errorCode=500, location=/500page.jsp]
org.apache.jasper.JasperException: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is net.sf.hibernate.exception.GenericJDBCException: Cannot open connection

What could couse this? And what could solve the problem?

One more thing that wonders me:

# ls -la
lrwxrwxrwx.  1 root root   18 Jan 17  2012 confluence -> confluence-3.5-std
drwxr-xr-x. 13 1506 root 4096 Oct  3 09:48 confluence-3.5-std

There seems to be difference in permissions between actual confluence-folder and its virtual path..

3 answers

1 accepted

Hi Zacharias,

Your error on shutdown is a result of a lack of memory. Tomcat actually requires the same amount of memory to startup and shutdown to some extent and so in effect you need almost double the minimum memory required.

Hi Zacharias,

The most concerning errors seems to be the "Cannot Open Connection" one, and for that we have this KB: https://confluence.atlassian.com/display/CONFKB/Unable+to+Start+Due+to+net.sf.hibernate.exception.GenericJDBCException+Cannot+open+connection

It usually indicates that your instance cannot reach the database, but there are another possible causes that it's worth to check.

Hope it helps.

In my case its postgres, the postgres service stops after some hours but i dont know why, after restart it works again

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

381 views 21 10
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you