Julian Sedding created SLING-9869: ------------------------------------- Summary: Installer Factory Feature Model cannot install feature JSON file Key: SLING-9869 URL: https://issues.apache.org/jira/browse/SLING-9869 Project: Sling Issue Type: Bug Components: Installer Affects Versions: Installer Factory Feature Model 0.5.0 Reporter: Julian Sedding Assignee: Julian Sedding
The installer factory for the feature model is supposed to support installation of both feature JSON files and feature archives (FAR). When trying to install a feature JSON file I encountered the exception below. It seems that JSON files are partially treated as FAR files. {noformat} 02.11.2020 09:13:52.154 *INFO* [JcrInstaller.1] org.apache.sling.installer.provider.jcr.impl.JcrInstaller Registering resource with OSGi installer: [InstallableResource, priority=200, id=/apps/foo/config/config-package-1.0.0-SNAPSHOT-feature.json] 02.11.2020 09:13:52.154 *INFO* [JcrInstaller.1] org.apache.sling.installer.provider.jcr.impl.JcrInstaller Removing resource from OSGi installer: [/apps/foo/config/config-package-1.0.0-SNAPSHOT-far.far] 02.11.2020 09:13:52.172 *INFO* [OsgiInstallerImpl] org.apache.sling.audit.osgi.installer Installing featuremodel:ch.stzh.cq:config-package:1.0.0-SNAPSHOT 02.11.2020 09:13:52.267 *WARN* [OsgiInstallerImpl] org.apache.sling.installer.factory.model.impl.InstallFeatureModelTask Unable to extract artifacts from feature model ch.stzh.cq:config-package:1.0.0-SNAPSHOT java.io.IOException: Not a feature model archive - manifest is missing. at org.apache.sling.feature.io.archive.ArchiveReader.checkHeaderAndExtractContents(ArchiveReader.java:155) [org.apache.sling.feature:1.2.6] at org.apache.sling.feature.io.archive.ArchiveReader.read(ArchiveReader.java:79) [org.apache.sling.feature:1.2.6] at org.apache.sling.installer.factory.model.impl.InstallFeatureModelTask.transform(InstallFeatureModelTask.java:141) [org.apache.sling.installer.factory.feature:0.5.0] at org.apache.sling.installer.factory.model.impl.InstallFeatureModelTask.execute(InstallFeatureModelTask.java:83) [org.apache.sling.installer.factory.feature:0.5.0] at org.apache.sling.installer.core.impl.OsgiInstallerImpl.doExecuteTasks(OsgiInstallerImpl.java:914) [org.apache.sling.installer.core:3.9.0.B002] at org.apache.sling.installer.core.impl.OsgiInstallerImpl.executeTasks(OsgiInstallerImpl.java:749) [org.apache.sling.installer.core:3.9.0.B002] at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:298) [org.apache.sling.installer.core:3.9.0.B002] at java.lang.Thread.run(Thread.java:748) 02.11.2020 09:13:52.267 *INFO* [OsgiInstallerImpl] org.apache.sling.audit.osgi.installer Unable to install feature model resource TaskResource(url=jcrinstall:/apps/foo/config/config-package-1.0.0-SNAPSHOT-feature.json, entity=featuremodel:ch.stzh.cq:config-package:1.0.0-SNAPSHOT, state=INSTALL, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:41:1603:12224:, feature={ "id":"ch.stzh.cq:config-package:1.0.0-SNAPSHOT", "title":"Stadt Zuerich 01.00 Config: package", "description":"configuration data for shipped bundles and stzh", "license":"Stadt Zuerich, Organisation und Informatik", "repoinit:TEXT|true":[ "create path /tmp/config-package(sling:OrderedFolder)", "create path /tmp/config-package(sling:OrderedFolder)/foo(nt:unstructured)", "create path /tmp/config-package(sling:OrderedFolder)/bar(nt:unstructured)", "", "set ACL on /tmp/config-package", " allow jcr:read everyone", " allow jcr:all administrators", "end" ] }, Bundle-Version=8.99.1.SNAPSHOT, featureId=ch.stzh.cq:config-package:1.0.0-SNAPSHOT], digest=1604067231900) : unable to create resources {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)