[MAGNOLIA-3059] Unable to replace implementation of the dynamically loaded class with its super class Created: 05/Feb/10  Updated: 23/Jan/13  Resolved: 06/Dec/12

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 4.3
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Jan Haderka Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MAGNOLIA-3001 FactoryUtil/ClassUtil refactorings Closed
is related to MAGNOLIA-2553 FactoryUtil: should return a proxy ob... Closed
is related to MAGNOLIA-3079 ComponentProvider should lookup super... 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   

Since the changes made to FactoryUtil and mechanism of class instantiation it is no longer possible to replace class implementation with its superclass at runtime.
To reproduce the issue:

  1. extend some existing class, e.g. URI2RepositoryManager
  2. configure Magnolia to use extending class (in this case set /server/URI2RepositoryMapping/class to full.name.of.ExtendedURI2RepositoryManager)
  3. check that everything works fine with the extending class (e.g. try to display some page from website)
  4. restart Magnolia to make to have it started with extending class
  5. repeat step 3) (to see that everything still works)
  6. change URI2RepositoryManager configuration back to use the original URI2RepositoryManager implementation
  7. try to repeat step 3) ==> page loading fails with ClassCastException


 Comments   
Comment by Magnolia International [ 10/Feb/10 ]

Please link to appropriate issue. I believe this is related to the proxying of observed components ?
Any chance you could provide a unit(-ish) test?

Comment by Jan Haderka [ 10/Oct/12 ]

I think this issue should be gone by now. Needs to be re-evaluated before closing as obsolete.

Comment by Roman Kovařík [ 06/Dec/12 ]

Fixed by: http://jira.magnolia-cms.com/browse/MAGNOLIA-3001

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