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

Tobias Bocanegra reopened JCRVLT-31:
------------------------------------


NPE can happen with package hooks:

{noformat}
18.02.2014 21:15:05.510 *ERROR* [OsgiInstallerImpl] 
com.adobe.granite.installer.factory.packages.impl.PackageTransformer Error 
while processing install task.
java.lang.NullPointerException: null
        at java.util.TreeMap.compare(TreeMap.java:1188)
        at java.util.TreeMap.put(TreeMap.java:531)
        at 
com.day.jcr.vault.packaging.impl.JrVltInstallHookProcessor.initHook(JrVltInstallHookProcessor.java:138)
        at 
com.day.jcr.vault.packaging.impl.JrVltInstallHookProcessor.registerHook(JrVltInstallHookProcessor.java:123)
        at 
com.day.jcr.vault.packaging.impl.JrVltInstallHookProcessor.registerHooks(JrVltInstallHookProcessor.java:79)
        at 
org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.prepareExtract(ZipVaultPackage.java:183)
        at 
org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:388)
{noformat}

> Packages defined by a stream are copied to a file first
> -------------------------------------------------------
>
>                 Key: JCRVLT-31
>                 URL: https://issues.apache.org/jira/browse/JCRVLT-31
>             Project: Jackrabbit FileVault
>          Issue Type: Improvement
>            Reporter: Tobias Bocanegra
>            Assignee: Tobias Bocanegra
>             Fix For: 3.1
>
>
> in the current implementation the binary data of a package is always copied 
> to a file before it's handled. because the meta-inf files might not be at the 
> beginning of the stream. this might be a considerable performance drain when 
> uploading large packages.
> in order to change this, the entire archive handling needs to be rewritten. 
> i.e. the current way of copying the input stream to a tmp-file is "optimal" 
> in this respect because the file is not regenerated when the package is 
> accessed for installing.
> using a jar file a format might be possible - but is not controllable since 
> we deliberately allow any kind of zips for packages that were not created by 
> a jar-tool, package manager, vlt etc.
> however, another fast approach would be to scan-and-copy the package into the 
> repository and extract at the same time the relevant metadata. since the 
> stream is consumed during ValueFactory.createValue(),
> the proper packageId can be used to create the path and no tmp-location is 
> needed.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to