[MAGNOLIA-8237] Cannot bootstrap licence from webapp folders Created: 27/Sep/21  Updated: 16/Dec/21  Resolved: 29/Nov/21

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 6.2.12
Fix Version/s: 6.2.14

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Thuy To
Resolution: Fixed Votes: 0
Labels: VN-Maintenance, maintenance
Remaining Estimate: Not Specified
Time Spent: 11d 5.75h
Original Estimate: Not Specified

Attachments: PNG File image-2021-11-25-17-10-00-478.png     Text File license-error.txt    
Issue Links:
causality
relation
is related to MGNLLIC-82 Move the enterprise node to a config ... Open
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Global Maintenance 2
Story Points: 8

 Description   

Put a licence (config.modules.enterprise.license.xml) into one of these folders:

  • /WEB-INF/bootstrap/common
  • /WEB-INF/bootstrap/author
  • /WEB-INF/bootstrap/public
2021-09-27 08:39:54,783 DEBUG info.magnolia.module.webapp.WebappBootstrap       : Will bootstrap config.modules.enterprise.license.xml
2021-09-27 08:39:54,784 INFO  info.magnolia.importexport.Bootstrapper           : Trying to import content from 1 files into repository [config]
2021-09-27 08:39:54,784 DEBUG info.magnolia.importexport.DataTransporter        : Importing content into repository: [config] from: [/Users/rich.gange/magnolia/magnolia-dx-core-demo-6.2.11/apache-tomcat-9.0.43/webapps/magnoliaAuthor/WEB-INF/bootstrap/common/config.modules.enterprise.license.xml] into path: [/modules/enterprise]
2021-09-27 08:39:54,792 ERROR info.magnolia.module.InstallContextImpl           : [1301/1302 tasks - Magnolia Webapp Module (version 6.2.11)]> Error while installing or updating webapp module. Task 'Webapp bootstrap' failed. (ItemExistsException: Same name sibling not allowed for node /modules/enterprise/license by definition * (declaring type mgnl:content))
java.lang.RuntimeException: Error importing /Users/rich.gange/magnolia/magnolia-dx-core-demo-6.2.11/apache-tomcat-9.0.43/webapps/magnoliaAuthor/WEB-INF/bootstrap/common/config.modules.enterprise.license.xml: Same name sibling not allowed for node /modules/enterprise/license by definition * (declaring type mgnl:content)

Notes
I think somehow the import behavior changed. We should delete the already existing node for bootstrapping.

Workaround
Use the same UUID in the webapp bootstrap file. Copy the file from Git and add your credentials to it in owner/key.



 Comments   
Comment by Thuy To [ 15/Nov/21 ]

Hi rgange

Please help me verify this ticket, I've debugged and tested this problem. It works well when we use UUID the same as UUID in original file for the webapp bootstrap file.

Following the comments on https://jira.magnolia-cms.com/browse/SUPPORT-13729 . Do we need to fix this issue? 

Thanks

Comment by Thuy To [ 17/Nov/21 ]

We have the import behavior for bootstrapping like this:

+ When the import file contains the UUID the same as UUID in original license.xml, we would delete the already existing node and then import this file.

+ When the import file doesn't contain the UUID, we would not delete the already existing node. So there is an exception throwing in this case "Same name sibling not allowed for node".

This issue was reported in previous ticket https://jira.magnolia-cms.com/browse/SUPPORT-11755 and resolved in https://jira.magnolia-cms.com/browse/MAGNOLIA-7579 .

Comment by Thuy To [ 25/Nov/21 ]

After investigated and discussed, we have aligned the import behavior of webapp bootstraps:

+ Delete the already existing node and add a new node. 

Generated at Mon Feb 12 04:30:53 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.