You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Julian Sedding (JIRA)" <ji...@apache.org> on 2016/11/07 14:58:58 UTC

[jira] [Updated] (SLING-6250) Importing packages with large headers fails

     [ https://issues.apache.org/jira/browse/SLING-6250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Sedding updated SLING-6250:
----------------------------------
    Attachment: SLING-6250-testcase.patch

The attached patch adds a test case that allows to reproduce the issue.

> Importing packages with large headers fails
> -------------------------------------------
>
>                 Key: SLING-6250
>                 URL: https://issues.apache.org/jira/browse/SLING-6250
>             Project: Sling
>          Issue Type: Bug
>          Components: Distribution
>    Affects Versions: Content Distribution Core 0.1.18
>            Reporter: Julian Sedding
>            Assignee: Julian Sedding
>         Attachments: SLING-6250-testcase.patch
>
>
> When importing packages with large headers, e.g. packages containing many paths, the following exception is thrown:
> {noformat}
> java.lang.RuntimeException: java.io.IOException: Resetting to invalid mark
> 	at java.io.BufferedInputStream.reset(BufferedInputStream.java:448)
> 	at org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporter.importStream(LocalDistributionPackageImporter.java:122)
> 	at org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporterTest.importPackageWithLargeHeader(LocalDistributionPackageImporterTest.java:100)
> {noformat}
> This happens when the header is larger than the default buffer size of the {{BufferedInputStream}} and thus its {{#mark()}} is lost and {{#reset()}} cannot happen anymore.
> I will investigate, whether we can stop relying on marked input streams. This would be desirable, because we cannot know in advance how long the header is.
> cc [~teofili]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)