Hi,
I'm considering migrating the site from confluence server to a cloud based approach (or maybe data center).
However, I failed to do the export of either the site or any individual spaces.
The direct exception message is :
com.atlassian.confluence.backuprestore.exception.BackupRestoreException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap'
A little bit more background, I've migrated the DB from MySQL to Postgres a couple of weeks ago. There was some casing issue initially, but was resolved.
Here's the log I found from
2024-01-21 14:24:09,096 INFO [ConfluenceBackupRestoreManager:thread-11] [impl.backuprestore.backup.SiteBackupService] doBackupSynchronously SITE backup [119111685] has started.
2024-01-21 14:24:09,100 INFO [ConfluenceBackupRestoreManager:thread-11] [impl.backuprestore.backup.AbstractBackupService] performBackup SITE backup [119111685] is now backing up entities and attachments.
2024-01-21 14:24:09,157 WARN [backuprestore-site-backup:thread-4] [activeobjects.confluence.backup.LoggingBackupProgressMonitor] beginBackup Begin Active objects backup, change log level to INFO for com.atlassian.activeobjects.confluence.backup for more detailed logging.
-- url: /rest/api/backup-restore/backup/site | userName: myuser | referer: https://mydomain/plugins/servlet/backup-and-restore/backup | traceId: 3a5f1d71772e0224
2024-01-21 14:24:15,095 WARN [backuprestore-site-backup:thread-4] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:\n ->[null]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT,readOnly (Session #2109565131)
-- url: /rest/api/backup-restore/backup/site | userName: myuser | referer: https://mydomain/plugins/servlet/backup-and-restore/backup | traceId: 3a5f1d71772e0224
2024-01-21 14:24:15,099 WARN [ConfluenceBackupRestoreManager:thread-11] [confluence.impl.backuprestore.ConfluenceBackupRestoreManager] updateJobStateAfterCompletion Backup restore job BackupRestoreJob{id=119111685, jobOperation=BACKUP, jobScope=SITE, jobState=PROCESSING, createTime=2024-01-21T22:24:09Z, startProcessingTime=2024-01-21T22:24:09Z, finishProcessingTime=null, cancelTime=null, owner='myuser', whoCancelledTheJob='null', errorMessage='null'} failed: java.util.concurrent.ExecutionException: java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap')
-- url: /rest/api/backup-restore/backup/site | userName: myuser | referer: https://mydomain/plugins/servlet/backup-and-restore/backup | traceId: 3a5f1d71772e0224
com.atlassian.confluence.backuprestore.exception.BackupRestoreException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap')
at com.atlassian.confluence.impl.backuprestore.backup.SiteBackupService.doBackupSynchronously(SiteBackupService.java:112)
at com.atlassian.confluence.impl.backuprestore.BackupRestoreJobRunner.runJobSynchronously(BackupRestoreJobRunner.java:54)
at com.atlassian.confluence.impl.backuprestore.ConfluenceBackupRestoreManager.runJobAndUpdateJobProperties(ConfluenceBackupRestoreManager.java:271)
at com.atlassian.confluence.impl.backuprestore.ConfluenceBackupRestoreManager.processJobsFromTheQueue(ConfluenceBackupRestoreManager.java:250)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.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 java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap')
at java.base/java.util.concurrent.FutureTask.report(Unknown Source)
at java.base/java.util.concurrent.FutureTask.get(Unknown Source)
at com.atlassian.confluence.impl.backuprestore.ParallelTasksExecutor.waitUntilAllTasksComplete(ParallelTasksExecutor.java:119)
at com.atlassian.confluence.impl.backuprestore.ParallelTasksExecutor.waitUntilAllStageJobsComplete(ParallelTasksExecutor.java:92)
at com.atlassian.confluence.impl.backuprestore.ParallelTasksExecutor.waitUntilAllStageJobsComplete(ParallelTasksExecutor.java:108)
at com.atlassian.confluence.impl.backuprestore.backup.SiteBackupService.backupAllEntitiesAndAttachments(SiteBackupService.java:155)
at com.atlassian.confluence.impl.backuprestore.backup.AbstractBackupService.performBackup(AbstractBackupService.java:75)
at com.atlassian.confluence.impl.backuprestore.backup.SiteBackupService.doBackupSynchronously(SiteBackupService.java:96)
... 8 more
Caused by: java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap')
at com.atlassian.confluence.impl.backuprestore.backup.exporters.converters.AbstractDatabaseDataConverter.convertToInteger(AbstractDatabaseDataConverter.java:214)
at com.atlassian.confluence.impl.backuprestore.backup.models.AttachmentInfo.<init>(AttachmentInfo.java:31)
at com.atlassian.confluence.impl.backuprestore.backup.exporters.site.ContentEntityPostExportAction.lambda$writeAttachments$1(ContentEntityPostExportAction.java:34)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.base/java.util.LinkedList$LLSpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
at com.atlassian.confluence.impl.backuprestore.backup.exporters.site.ContentEntityPostExportAction.writeAttachments(ContentEntityPostExportAction.java:35)
at com.atlassian.confluence.impl.backuprestore.backup.exporters.site.ContentEntityPostExportAction.apply(ContentEntityPostExportAction.java:27)
at com.atlassian.confluence.impl.backuprestore.backup.exporters.site.GenericSiteExporter.exportAllRecords(GenericSiteExporter.java:79)
at com.atlassian.confluence.impl.backuprestore.backup.SiteBackupService.lambda$backupAllEntitiesAndAttachments$0(SiteBackupService.java:144)
... 4 more
2024-01-21 14:26:47,791 INFO [Caesium-1-3] [service.stepexecutor.export.SpaceExportCacheService] removeExpiredCacheEntries Removing export cache entries that have exceeded their TTL.
@Yun WuIf you taking a XML backup of your site and if your site has a large data then taking a backup through proxy (application running on https) will get gateway timeout most of time as proxy has certain timeout period set for any request, so you need to update that if you are using the proxy like Apache, Nginx, etc to support the long requests although it is not recommended but you can so this for short timeframe and revert the changes once XML backup is completed.
Also, there is another way to disable the proxy server of time being and access the confluence on port 8090 which is a default port for Confluence. you may need to login with internal confluence user if you using any external SSO for user management, this process is fast as there is no proxy in between the Application server and client browser, so XML backup process will also be fast, but this will require a downtime and recommended to do on weekend to avoid any impact on the users.
http:/10.12.13.14:8090
Thanks
Ravina
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.