com.atlassian.confluence.pages.attachments.AttachmentDataStreamSizeMismatchException

Attachment data stream contains a different number of bytes to the declared size of the attachment. Expected: 495, actual: 6514

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1

  • via Atlassian JIRA by Don Willis [Atlassian], 11 months ago
    Attachment data stream contains a different number of bytes to the declared size of the attachment. Expected: 495, actual: 6514
  • Stack trace

    • com.atlassian.confluence.pages.attachments.AttachmentDataStreamSizeMismatchException: Attachment data stream contains a different number of bytes to the declared size of the attachment. Expected: 495, actual: 6514 at com.atlassian.confluence.pages.persistence.dao.FileSystemAttachmentDataDao.writeStreamToFile(FileSystemAttachmentDataDao.java:241) at com.atlassian.confluence.pages.persistence.dao.FileSystemAttachmentDataDao.saveDataForAttachment(FileSystemAttachmentDataDao.java:172) at com.atlassian.confluence.pages.persistence.dao.FileSystemAttachmentDataDao.saveDataForAttachment(FileSystemAttachmentDataDao.java:132) at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao$IntraHibernateAttachmentCopier.copy(AbstractHibernateAttachmentDao.java:448) at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao$IntraHibernateAttachmentMigrator.migrate(AbstractHibernateAttachmentDao.java:503) at com.atlassian.confluence.util.longrunning.AttachmentMigrationLongRunningTask$1.doInTransactionWithoutResult(AttachmentMigrationLongRunningTask.java:71) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.confluence.util.longrunning.AttachmentMigrationLongRunningTask.runInternal(AttachmentMigrationLongRunningTask.java:66) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21) at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.