[MAGNOLIA-4361] CLONE -Starting up 4.5.1 with STK 1.4 ends up with hard to decipher Guice exceptions Created: 30/Mar/12  Updated: 02/Apr/12  Resolved: 30/Mar/12

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 4.5.1
Fix Version/s: 4.5.2

Type: Bug Priority: Critical
Reporter: Magnolia International Assignee: Jan Haderka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MAGNOLIA-4360 Starting up 4.5.1 with STK 1.4 ends u... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* 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:

 Description   

I was trying to update a project, and didn't think of updating my dependency to STK. So I was starting this projects based on 4.5.1, with STK 1.4.4. At startup, this resulted in this exception

A binding to info.magnolia.cms.core.AggregationState was already configured at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindImplementation(GuiceComponentConfigurationModule.java:157).

I traced it down to the GuiceComponentProviderBuilder.build() call in info.magnolia.cms.beans.config.ConfigLoader#load.

I'm reporting this as "critical", because it's easy to overlook one or the other dependency when upgrading a project, especially until we don't fix MAGNOLIA-3545

I'm not suggesting such a project should work or even start, but it would be nice if the exception message was a little less puzzling, or offered some sort of information or hint that would allow to track the problem down.

  • a hint that there might be old/conflicting modules ? Perhaps warnings beforehand when loading those modules ? I didn't check, but I'm suspecting the conflict happens with a legacy module definition property ?
  • for advanced users or developers, it would probably also be helpful to point at where the conflict comes from.

I'm also suspecting this sort of conflict could occur, say, if two modules try to register the same component (or using the same key) ?



 Comments   
Comment by Jan Haderka [ 30/Mar/12 ]

Just improved error message to hint on conflicting modules.

Generated at Mon Feb 12 03:55:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.