java.lang.NullPointerException: inputStream cannot be null

Atlassian JIRA | Jing Hwa [Atlassian] | 2 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    h3. Step to replicate # Create a question and attach an attachmen to the question. # Edit the question and move it to another space. # Edit the question again. Observed Result: The following ERROR appear in the browser {code} Your Confluence administrator can use the support request form to create a support ticket which will include this information. We will respond as promptly as possible. Thank you! Return to site homepage… Cause java.lang.NullPointerException: inputStream cannot be null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) Stack Trace:[hide] java.lang.NullPointerException: inputStream cannot be null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) at com.atlassian.confluence.pages.persistence.dao.AttachmentDataStream$InputStreamWrapper.<init>(AttachmentDataStream.java:43) at com.atlassian.confluence.pages.persistence.dao.filesystem.FileSystemAttachmentDataDao.rawBinaryWrapper(FileSystemAttachmentDataDao.java:155) at com.atlassian.confluence.pages.persistence.dao.filesystem.FileSystemAttachmentDataDao.saveDataForAttachment(FileSystemAttachmentDataDao.java:150) at {code} The attachment which is stored in the filesystem are not moved to the new location after thhe question is moved to the new space. The attachment still exist in the old location in the filesystem. Because the question in the new space is trying to refer to the attachment in the new location, it could not find the attachment which resulted in the ERROR. For example Before the question was moved to the new space, the attachment is stored in the following location in the filesystem: {panel} /home/jing/atlassian/atlassian-confluence-5.6.6/data/attachments/ver003/172/223/59473922/146/60/59310146/59441182 {panel} After it has been moved it is still in the same location: {panel} /home/jing/atlassian/atlassian-confluence-5.6.6/data/attachments/ver003/172/223/59473922/146/60/59310146/59441182 {panel} By right, the value {{/172/223/59473922}} in the path above should be difference based on the new spaceid as explained here https://confluence.atlassian.com/display/DOC/Hierarchical+File+System+Attachment+Storage.

    Atlassian JIRA | 2 years ago | Jing Hwa [Atlassian]
    java.lang.NullPointerException: inputStream cannot be null
  2. 0

    h3. Step to replicate # Create a question and attach an attachmen to the question. # Edit the question and move it to another space. # Edit the question again. Observed Result: The following ERROR appear in the browser {code} Your Confluence administrator can use the support request form to create a support ticket which will include this information. We will respond as promptly as possible. Thank you! Return to site homepage… Cause java.lang.NullPointerException: inputStream cannot be null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) Stack Trace:[hide] java.lang.NullPointerException: inputStream cannot be null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) at com.atlassian.confluence.pages.persistence.dao.AttachmentDataStream$InputStreamWrapper.<init>(AttachmentDataStream.java:43) at com.atlassian.confluence.pages.persistence.dao.filesystem.FileSystemAttachmentDataDao.rawBinaryWrapper(FileSystemAttachmentDataDao.java:155) at com.atlassian.confluence.pages.persistence.dao.filesystem.FileSystemAttachmentDataDao.saveDataForAttachment(FileSystemAttachmentDataDao.java:150) at {code} The attachment which is stored in the filesystem are not moved to the new location after the question is moved to the new space. The attachment still exist in the old location in the filesystem. Because the question in the new space is trying to refer to the attachment in the new location, it could not find the attachment which resulted in the ERROR. For example Before the question was moved to the new space, the attachment is stored in the following location in the filesystem: {panel} /home/jing/atlassian/atlassian-confluence-5.6.6/data/attachments/ver003/172/223/59473922/146/60/59310146/59441182 {panel} After it has been moved it is still in the same location: {panel} /home/jing/atlassian/atlassian-confluence-5.6.6/data/attachments/ver003/172/223/59473922/146/60/59310146/59441182 {panel} By right, the value {{/172/223/59473922}} in the path above should be difference as it is suppose to be reffering to new spaceid as explained here https://confluence.atlassian.com/display/DOC/Hierarchical+File+System+Attachment+Storage.

    Atlassian JIRA | 2 years ago | Jing Hwa [Atlassian]
    java.lang.NullPointerException: inputStream cannot be null
  3. 0

    h3. Step to replicate # Create a question and attach an attachmen to the question. # Edit the question and move it to another space. # Edit the question again. Observed Result: The following ERROR appear in the browser {code} Your Confluence administrator can use the support request form to create a support ticket which will include this information. We will respond as promptly as possible. Thank you! Return to site homepage… Cause java.lang.NullPointerException: inputStream cannot be null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) Stack Trace:[hide] java.lang.NullPointerException: inputStream cannot be null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) at com.atlassian.confluence.pages.persistence.dao.AttachmentDataStream$InputStreamWrapper.<init>(AttachmentDataStream.java:43) at com.atlassian.confluence.pages.persistence.dao.filesystem.FileSystemAttachmentDataDao.rawBinaryWrapper(FileSystemAttachmentDataDao.java:155) at com.atlassian.confluence.pages.persistence.dao.filesystem.FileSystemAttachmentDataDao.saveDataForAttachment(FileSystemAttachmentDataDao.java:150) at {code} The attachment which is stored in the filesystem are not moved to the new location after thhe question is moved to the new space. The attachment still exist in the old location in the filesystem. Because the question in the new space is trying to refer to the attachment in the new location, it could not find the attachment which resulted in the ERROR. For example Before the question was moved to the new space, the attachment is stored in the following location in the filesystem: {panel} /home/jing/atlassian/atlassian-confluence-5.6.6/data/attachments/ver003/172/223/59473922/146/60/59310146/59441182 {panel} After it has been moved it is still in the same location: {panel} /home/jing/atlassian/atlassian-confluence-5.6.6/data/attachments/ver003/172/223/59473922/146/60/59310146/59441182 {panel} By right, the value {{/172/223/59473922}} in the path above should be difference based on the new spaceid as explained here https://confluence.atlassian.com/display/DOC/Hierarchical+File+System+Attachment+Storage.

    Atlassian JIRA | 2 years ago | Jing Hwa [Atlassian]
    java.lang.NullPointerException: inputStream cannot be null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h3. Step to replicate # Create a question and attach an attachmen to the question. # Edit the question and move it to another space. # Edit the question again. Observed Result: The following ERROR appear in the browser {code} Your Confluence administrator can use the support request form to create a support ticket which will include this information. We will respond as promptly as possible. Thank you! Return to site homepage… Cause java.lang.NullPointerException: inputStream cannot be null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) Stack Trace:[hide] java.lang.NullPointerException: inputStream cannot be null at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) at com.atlassian.confluence.pages.persistence.dao.AttachmentDataStream$InputStreamWrapper.<init>(AttachmentDataStream.java:43) at com.atlassian.confluence.pages.persistence.dao.filesystem.FileSystemAttachmentDataDao.rawBinaryWrapper(FileSystemAttachmentDataDao.java:155) at com.atlassian.confluence.pages.persistence.dao.filesystem.FileSystemAttachmentDataDao.saveDataForAttachment(FileSystemAttachmentDataDao.java:150) at {code} The attachment which is stored in the filesystem are not moved to the new location after the question is moved to the new space. The attachment still exist in the old location in the filesystem. Because the question in the new space is trying to refer to the attachment in the new location, it could not find the attachment which resulted in the ERROR. For example Before the question was moved to the new space, the attachment is stored in the following location in the filesystem: {panel} /home/jing/atlassian/atlassian-confluence-5.6.6/data/attachments/ver003/172/223/59473922/146/60/59310146/59441182 {panel} After it has been moved it is still in the same location: {panel} /home/jing/atlassian/atlassian-confluence-5.6.6/data/attachments/ver003/172/223/59473922/146/60/59310146/59441182 {panel} By right, the value {{/172/223/59473922}} in the path above should be difference as it is suppose to be reffering to new spaceid as explained here https://confluence.atlassian.com/display/DOC/Hierarchical+File+System+Attachment+Storage.

    Atlassian JIRA | 2 years ago | Jing Hwa [Atlassian]
    java.lang.NullPointerException: inputStream cannot be null
  6. 0
    samebug tip
    Take a look at this blog post on how to set up Grid2 https://goo.gl/rxzbE6. A user related (in the email group on the source) that using older selenium libs solves this exception.
    via gmane.org

  1. Andreas Häber 1 times, last 1 week ago
  2. Indri Yunita 3 times, last 4 weeks ago
  3. jstrayer 1 times, last 1 month ago
  4. xiaokangwang 1 times, last 3 months ago
  5. stigkj 2 times, last 3 months ago
16 more registered users
49 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    inputStream cannot be null

    at com.google.common.base.Preconditions.checkNotNull()
  2. Guava
    Preconditions.checkNotNull
    1. com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
    1 frame
  3. com.atlassian.confluence
    FileSystemAttachmentDataDao.saveDataForAttachment
    1. com.atlassian.confluence.pages.persistence.dao.AttachmentDataStream$InputStreamWrapper.<init>(AttachmentDataStream.java:43)
    2. com.atlassian.confluence.pages.persistence.dao.filesystem.FileSystemAttachmentDataDao.rawBinaryWrapper(FileSystemAttachmentDataDao.java:155)
    3. com.atlassian.confluence.pages.persistence.dao.filesystem.FileSystemAttachmentDataDao.saveDataForAttachment(FileSystemAttachmentDataDao.java:150)
    3 frames