Updateing from 7.13.4 to 7.19.9 fails
Asked by Marc Stirner:

After installing/updating with the provided installer, the confluence server dosnt start and now http requests are proceeded.

/opt/confluence/application-data/logs/atlassian-confluence.log

\`\`\`

2023-06-16 11:14:02,555 WARN \[Catalina-utility-1\] \[plugin.osgi.util.OsgiHeaderUtil\] stripDuplicatePackages removing duplicate import package com.atlassian.confluence.api.service.network\~ for plugin com.atlassian.streams.confluence - it is likely that a duplicate package was supplied in the OSGi instructions in the plugin's MANIFEST.MF  
2023-06-16 11:14:36,109 WARN \[ThreadPoolAsyncTaskExecutor::Thread 8\] \[scanner.runtime.impl.ComponentImportBeanFactoryPostProcessor\] loadServiceClass Unable to load class 'com.atlassian.jira.user.UserKeyService' for component importation purposes. Skipping...  
2023-06-16 11:14:36,111 WARN \[ThreadPoolAsyncTaskExecutor::Thread 8\] \[scanner.runtime.impl.ComponentImportBeanFactoryPostProcessor\] loadServiceClass Unable to load class 'com.atlassian.jira.util.I18nHelper' for component importation purposes. Skipping...  
2023-06-16 11:14:38,084 ERROR \[ThreadPoolAsyncTaskExecutor::Thread 9\] \[internal.dependencies.startup.DependencyWaiterApplicationContextExecutor\] logWrongState Expecting state (RESOLVING_DEPENDENCIES) not (DEPENDENCIES_RESOLVED) for context \[NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.confluence.plugins.confluence-mobile, config=osgibundle:/META-INF/spring/\*.xml)\]; assuming an interruption and bailing out  
2023-06-16 11:14:46,900 INFO \[Catalina-utility-1\] \[atlassian.plugin.manager.DefaultPluginManager\] logTime Plugin system earlyStartup ended  
2023-06-16 11:14:46,936 WARN \[AtlassianEvent::CustomizableThreadFactory-4\] \[core.persistence.hibernate.HibernateVersionHistoryDao\] getLatestBuildNumber Unable to determine build number from database. If you are upgrading from a Confluence version prior to 7.14.0, this is expected: Unknown column 'FINALIZED' in 'where clause'  
2023-06-16 11:14:47,122 INFO \[Catalina-utility-1\] \[confluence.upgrade.impl.DefaultUpgradeManager\] beforeUpgrade Generating pre-upgrade recovery file...  
2023-06-16 11:14:47,151 INFO \[Catalina-utility-1\] \[confluence.upgrade.recovery.ConfluenceProgressMonitor\] begin Starting  
2023-06-16 11:14:47,156 INFO \[Catalina-utility-1\] \[confluence.upgrade.recovery.ConfluenceProgressMonitor\] logTask Starting DATABASE_INFORMATION  
2023-06-16 11:14:47,161 INFO \[Catalina-utility-1\] \[confluence.upgrade.recovery.ConfluenceProgressMonitor\] logTask Finishing DATABASE_INFORMATION  
2023-06-16 11:14:47,161 INFO \[Catalina-utility-1\] \[confluence.upgrade.recovery.ConfluenceProgressMonitor\] logTask Starting TABLE_DEFINITION  
2023-06-16 11:14:47,664 INFO \[Catalina-utility-1\] \[confluence.upgrade.recovery.ConfluenceProgressMonitor\] logTask Finishing TABLE_DEFINITION  
2023-06-16 11:14:47,665 INFO \[Catalina-utility-1\] \[confluence.upgrade.recovery.ConfluenceProgressMonitor\] totalNumberOfTables Total number of tables: 224  
2023-06-16 11:14:47,665 INFO \[Catalina-utility-1\] \[confluence.upgrade.recovery.ConfluenceProgressMonitor\] logTask Starting TABLES_DATA

<br />

2023-06-16 11:17:30,495 WARN \[Catalina-utility-1\] \[confluence.impl.hibernate.ConfluenceHibernateTransactionManager\] doRollback Performing rollback. Transactions:  
-\>\[null\]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT (Session #835469687)  
2023-06-16 11:17:30,538 ERROR \[Catalina-utility-1\] \[springframework.transaction.support.TransactionTemplate\] rollbackOnException Application exception overridden by rollback exception  
java.lang.OutOfMemoryError: Java heap space  
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3515)  
at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:2088)  
at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1992)  
at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3413)  
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:471)  
at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3115)  
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2344)  
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2739)  
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2491)  
at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4807)  
at com.mchange.v2.c3p0.impl.NewProxyConnection.setAutoCommit(NewProxyConnection.java:1059)  
at com.atlassian.config.db.DelegatingConnection.setAutoCommit(DelegatingConnection.java:53)  
at jdk.internal.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)  
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
at java.base/java.lang.reflect.Method.invoke(Unknown Source)  
at com.atlassian.activeobjects.spi.ConnectionHandler.delegate(ConnectionHandler.java:39)  
at com.atlassian.activeobjects.spi.ConnectionHandler.invoke(ConnectionHandler.java:34)  
at com.sun.proxy.$Proxy2468.setAutoCommit(Unknown Source)  
at com.atlassian.dbexporter.jdbc.JdbcUtils.withNoAutoCommit(JdbcUtils.java:54)  
at com.atlassian.dbexporter.exporter.DataExporter.lambda$export$1(DataExporter.java:50)  
at com.atlassian.dbexporter.exporter.DataExporter$$Lambda$1933/0x000000080215ac40.call(Unknown Source)  
at com.atlassian.dbexporter.jdbc.JdbcUtils.withConnection(JdbcUtils.java:29)  
at com.atlassian.dbexporter.exporter.DataExporter.export(DataExporter.java:48)  
at com.atlassian.dbexporter.DbExporter.exportData(DbExporter.java:65)  
at com.atlassian.confluence.upgrade.recovery.DefaultRecoveryFileGenerator.lambda$generate$0(DefaultRecoveryFileGenerator.java:80)  
at com.atlassian.confluence.upgrade.recovery.DefaultRecoveryFileGenerator$$Lambda$1914/0x0000000802147440.doInTransaction(Unknown Source)  
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)  
at com.atlassian.confluence.upgrade.recovery.DefaultRecoveryFileGenerator.generate(DefaultRecoveryFileGenerator.java:61)  
at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.beforeUpgrade(DefaultUpgradeManager.java:173)  
at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:134)  
at com.atlassian.confluence.plugin.PluginFrameworkContextListener.launchUpgrades(PluginFrameworkContextListener.java:122)  
at com.atlassian.confluence.plugin.PluginFrameworkContextListener.contextInitialized(PluginFrameworkContextListener.java:82)  
2023-06-16 11:17:30,539 ERROR \[Catalina-utility-1\] \[atlassian.confluence.plugin.PluginFrameworkContextListener\] contextInitialized Error initialising plugin manager: Could not roll back Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Unable to rollback against JDBC Connection  
org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Unable to rollback against JDBC Connection  
at org.springframework.orm.hibernate.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:535)  
at com.atlassian.confluence.impl.hibernate.ConfluenceHibernateTransactionManager.doRollback(ConfluenceHibernateTransactionManager.java:81)  
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:835)  
at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:809)  
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
at java.base/java.lang.reflect.Method.invoke(Unknown Source)  
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)  
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)  
at com.sun.proxy.$Proxy79.rollback(Unknown Source)  
at org.springframework.transaction.support.TransactionTemplate.rollbackOnException(TransactionTemplate.java:168)  
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:144)  
at com.atlassian.confluence.upgrade.recovery.DefaultRecoveryFileGenerator.generate(DefaultRecoveryFileGenerator.java:61)  
at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.beforeUpgrade(DefaultUpgradeManager.java:173)  
at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:134)  
at com.atlassian.confluence.plugin.PluginFrameworkContextListener.launchUpgrades(PluginFrameworkContextListener.java:122)  
at com.atlassian.confluence.plugin.PluginFrameworkContextListener.contextInitialized(PluginFrameworkContextListener.java:82)  
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4491)  
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4939)  
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)  
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)  
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)  
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)  
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)  
at java.base/java.lang.Thread.run(Unknown Source)  
Caused by: net.sf.hibernate.TransactionException: Unable to rollback against JDBC Connection  
at org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor.rollback(AbstractLogicalConnectionImplementor.java:122)  
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.rollback(JdbcResourceLocalTransactionCoordinatorImpl.java:251)  
at org.hibernate.engine.transaction.internal.TransactionImpl.rollback(TransactionImpl.java:100)  
at com.atlassian.hibernate.adapter.adapters.TransactionV2Adapter.rollback(TransactionV2Adapter.java:44)  
at org.springframework.orm.hibernate.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:532)  
... 28 more  
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.  
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)  
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)  
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)  
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)  
at com.mysql.jdbc.Util.getInstance(Util.java:408)  
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)  
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)  
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)  
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)  
at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1192)  
at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1187)  
at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4534)  
at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:1033)  
at org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor.rollback(AbstractLogicalConnectionImplementor.java:116)  
... 32 more  
Caused by: java.lang.OutOfMemoryError: Java heap space  
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3515)  
at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:2088)  
at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1992)  
at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3413)  
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:471)  
at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3115)  
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2344)  
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2739)  
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2491)  
at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4807)  
at com.mchange.v2.c3p0.impl.NewProxyConnection.setAutoCommit(NewProxyConnection.java:1059)  
at com.atlassian.config.db.DelegatingConnection.setAutoCommit(DelegatingConnection.java:53)  
at jdk.internal.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)  
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
at java.base/java.lang.reflect.Method.invoke(Unknown Source)  
at com.atlassian.activeobjects.spi.ConnectionHandler.delegate(ConnectionHandler.java:39)  
at com.atlassian.activeobjects.spi.ConnectionHandler.invoke(ConnectionHandler.java:34)  
at com.sun.proxy.$Proxy2468.setAutoCommit(Unknown Source)  
at com.atlassian.dbexporter.jdbc.JdbcUtils.withNoAutoCommit(JdbcUtils.java:54)  
at com.atlassian.dbexporter.exporter.DataExporter.lambda$export$1(DataExporter.java:50)  
at com.atlassian.dbexporter.exporter.DataExporter$$Lambda$1933/0x000000080215ac40.call(Unknown Source)  
at com.atlassian.dbexporter.jdbc.JdbcUtils.withConnection(JdbcUtils.java:29)  
at com.atlassian.dbexporter.exporter.DataExporter.export(DataExporter.java:48)  
at com.atlassian.dbexporter.DbExporter.exportData(DbExporter.java:65)  
at com.atlassian.confluence.upgrade.recovery.DefaultRecoveryFileGenerator.lambda$generate$0(DefaultRecoveryFileGenerator.java:80)  
at com.atlassian.confluence.upgrade.recovery.DefaultRecoveryFileGenerator$$Lambda$1914/0x0000000802147440.doInTransaction(Unknown Source)  
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)  
at com.atlassian.confluence.upgrade.recovery.DefaultRecoveryFileGenerator.generate(DefaultRecoveryFileGenerator.java:61)  
at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.beforeUpgrade(DefaultUpgradeManager.java:173)  
at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:134)  
at com.atlassian.confluence.plugin.PluginFrameworkContextListener.launchUpgrades(PluginFrameworkContextListener.java:122)  
at com.atlassian.confluence.plugin.PluginFrameworkContextListener.contextInitialized(PluginFrameworkContextListener.java:82)  
2023-06-16 11:17:30,602 INFO \[Catalina-utility-1\] \[confluence.upgrade.impl.DefaultUpgradeGate\] waitForBooleanValue Waiting to find if plugin dependent upgrades are required. Maximum wait time will be 90 seconds.  
2023-06-16 11:17:30,604 INFO \[Catalina-utility-1\] \[confluence.upgrade.impl.DefaultUpgradeGate\] waitForBooleanValue plugin dependent upgrades are required : true.  
2023-06-16 11:17:30,609 INFO \[Catalina-utility-1\] \[confluence.upgrade.impl.DefaultUpgradeGate\] waitForBooleanValue Waiting to find if plugin dependent upgrades are complete. Maximum wait time will be 1800 seconds.

\`\`\`


Answers:
author: Tyrell Bobowski
body: I ran into the same issue trying to upgrade from 7.13.0 to 7.19.16. I was able to get the upgrade to complete by doing the following.  

After running the upgrade it failed and I could see Java Out of Memory errors in the atlassian-confluence.log file so I increased the Java Heap size to 2GB  
/opt/atlassian/confluence/bin/setenv.sh  
CATALINA_OPTS="-Xms2048m -Xmx2048m ${CATALINA_OPTS}"  
\*\*\*Note I originally did this before running the upgrade but after the upgrade was started it overwrote this file and set it back to 1GB so I had to set it again  
Restarted Confluence but still got the same error in your screenshot. Atlassian-Confluence.log no longer shows the OutofMemory error but instead was showing lose of connection to the mysql database. I stopped Confluence and then did this  

1. **Remove Corrupt JAR Cache**   

   Delete the following plugin cache folders and restart Confluence:

*
  * \<confluence-home\>/bundled-plugins
  * \<confluence-home\>/plugins-cache
  * \<confluence-home\>/plugins-osgi-cache
  * confluence-home\>/plugins-temp

<https://confluence.atlassian.com/confkb/unable-to-start-up-confluence-372081272.html>  

Started Confluence again and the upgrade was now able to finish successfully and 7.19.16 was now working.

<br />

<br />

<br />


author: Mohamed Benziane
body: You may have this issue

<https://confluence.atlassian.com/confkb/confluence-crashes-due-to-outofmemoryerror-java-heap-space-error-183469749.html>

comments: author: Marc Stirner
body: This is strange, since we had the memoy limit set to 12GB.  
After playing around with it, and setting it to 4GB a error page can be viewed:

![Screenshot 2023-06-19 at 13-24-53 Errors.png](https://community.atlassian.com/t5/image/serverpage/image-id/263851i70ED71A428379FD6/image-size/large?v=v2&px=999 "Screenshot 2023-06-19 at 13-24-53 Errors.png")

\`\`\`  
Could not roll back Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Unable to rollback against JDBC Connection  
\`\`\`


Tags: confluence-server

server