Skip to content

Subsystem error when using load listener to add an alias #443

@mjclemente

Description

@mjclemente

This is a bit of an edge case, and there is a workaround. It just took me a while to track down today.

I've set up a repo with a test case to demonstrate this: https://github.com/mjclemente/fw1alias

Steps to reproduce:

  • Set the application flag reloadApplicationOnEveryRequest=true
  • Use a loadlistener to set an alias for a service beanFactory.addAlias("alsoKnownAs", "existingService")
  • If you try to access a subsystem page (?action=module:main.default), it errors with "Element existingService is undefined in a CFML structure referenced as part of an expression." Examining beanfactory.getbeaninfo() shows that only the subsystem controller objects have been added at this point.
  • You are able to access pages within the default subsystem without issue.
  • You can work around it by declaring the bean before setting the alias beanFactory.declareBean( "departmentService", "model.services.department" ).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions