Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalArgumentException thrown in YamlConfigurationValidator not properly logged #713

Open
kwin opened this issue May 15, 2024 · 0 comments

Comments

@kwin
Copy link
Member

kwin commented May 15, 2024

The following error can be observed in the error.log

15.05.2024 10:04:11.623 *WARN* [qtp295247546-90] org.apache.jackrabbit.vault.packaging.impl.InstallHookProcessorImpl Hook actool threw exception. PREPARE aborted.
org.apache.jackrabbit.vault.packaging.PackageException: invalid section identifier: system-reader in configuration file: /apps/hcp-common/permissions/02-systemusers.yaml_valid configuration section identifiers are: [group_config, obsolete_authorizables, global_config, user_config, ace_config]
	at biz.netcentric.cq.tools.actool.installhook.AcToolInstallHook.install(AcToolInstallHook.java:99) [biz.netcentric.cq.tools.accesscontroltool.bundle:3.0.10]
	at biz.netcentric.cq.tools.actool.installhook.AcToolInstallHook.execute(AcToolInstallHook.java:39) [biz.netcentric.cq.tools.accesscontroltool.bundle:3.0.10]
	at org.apache.jackrabbit.vault.packaging.impl.InstallHookProcessorImpl.execute(InstallHookProcessorImpl.java:145) [org.apache.jackrabbit.vault:3.7.3.T20240308111857-81fa88f1]
...
Caused by: java.lang.IllegalArgumentException: invalid section identifier: system-reader in configuration file: /apps/hcp-common/permissions/02-systemusers.yaml_valid configuration section identifiers are: [group_config, obsolete_authorizables, global_config, user_config, ace_config]
	at biz.netcentric.cq.tools.actool.validators.YamlConfigurationsValidator.validateSectionIdentifiers(YamlConfigurationsValidator.java:72) [biz.netcentric.cq.tools.accesscontroltool.bundle:3.0.10]
	at biz.netcentric.cq.tools.actool.configreader.YamlConfigurationMerger.getMergedConfigurations(YamlConfigurationMerger.java:145) [biz.netcentric.cq.tools.accesscontroltool.bundle:3.0.10]
	at biz.netcentric.cq.tools.actool.impl.AcInstallationServiceImpl.installConfigurationFiles(AcInstallationServiceImpl.java:286) [biz.netcentric.cq.tools.accesscontroltool.bundle:3.0.10]
	at biz.netcentric.cq.tools.actool.impl.AcInstallationServiceImpl.installConfigurationFiles(AcInstallationServiceImpl.java:255) [biz.netcentric.cq.tools.accesscontroltool.bundle:3.0.10]
	at biz.netcentric.cq.tools.actool.installhook.impl.AcToolInstallHookServiceImpl.installYamlFilesFromPackage(AcToolInstallHookServiceImpl.java:63) [biz.netcentric.cq.tools.accesscontroltool.bundle:3.0.10]
	at biz.netcentric.cq.tools.actool.installhook.impl.AcToolInstallHookServiceImpl.installYamlFilesFromPackage(AcToolInstallHookServiceImpl.java:32) [biz.netcentric.cq.tools.accesscontroltool.bundle:3.0.10]
	at biz.netcentric.cq.tools.actool.installhook.AcToolInstallHook.install(AcToolInstallHook.java:92) [biz.netcentric.cq.tools.accesscontroltool.bundle:3.0.10]
	... 83 common frames omitted

While the install log only emits

Install Package: /etc/packages/....zip
Wed May 15 2024 10:04:11 GMT+0200 (Central European Summer Time)

Installing content
Installing ACLs through AcToolInstallHook in phase PREPARE... 

Error: Error while executing an install hook during prepare phase.

The IAE should be caught inside the ACTool code and properly emitted to the install log as well before being rethrown to cancel package installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant