Description
While running Granite with Oak following NPE is seen
20.08.2012 16:37:21.791 *ERROR* [OsgiInstallerImpl] com.day.jcr.vault.packaging.impl.ZipVaultPackage Error during install. java.lang.NullPointerException at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:259) at org.apache.jackrabbit.oak.security.privilege.PrivilegeDefinitionImpl.<init>(PrivilegeDefinitionImpl.java:44) at org.apache.jackrabbit.oak.security.privilege.PrivilegeDefinitionReader.readDefinition(PrivilegeDefinitionReader.java:89) at org.apache.jackrabbit.oak.security.privilege.PrivilegeDefinitionReader.readDefinitions(PrivilegeDefinitionReader.java:76) at org.apache.jackrabbit.oak.security.privilege.PrivilegeRegistry.getAllDefinitions(PrivilegeRegistry.java:85) at org.apache.jackrabbit.oak.security.privilege.PrivilegeRegistry.<init>(PrivilegeRegistry.java:70) at org.apache.jackrabbit.oak.jcr.security.privilege.PrivilegeManagerImpl.<init>(PrivilegeManagerImpl.java:49) at org.apache.jackrabbit.oak.jcr.WorkspaceImpl.getPrivilegeManager(WorkspaceImpl.java:239) at com.day.jcr.vault.fs.spi.impl.jcr20.JackrabbitPrivilegeInstaller.install(JackrabbitPrivilegeInstaller.java:72) at com.day.jcr.vault.fs.io.Importer.registerPrivileges(Importer.java:507) at com.day.jcr.vault.fs.io.Importer.run(Importer.java:412) at com.day.jcr.vault.packaging.impl.ZipVaultPackage.extract(ZipVaultPackage.java:359) at com.day.jcr.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:364) at com.day.jcr.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:320) at com.adobe.granite.installer.factory.packages.impl.PackageTransformer$InstallPackageTask.execute(PackageTransformer.java:251) at org.apache.sling.installer.core.impl.OsgiInstallerImpl.executeTasks(OsgiInstallerImpl.java:692) at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:219) at java.lang.Thread.run(Thread.java:662)
This is seen while collecting all Privileges and occurs for /jcr:system/rep:privileges/crx:replicate. It probably does not have 'rep:aggregates' property. Checking with JR2 o.a.j.spi.commons.privilege.PrivilegeDefinitionImpl it constructor does a null check for declaredAggregateNames.