Custom Plugin in aspect

Hey everyone,

First post here.
We are using Coldbox 3.5

I wrote a simple aspect that has a custom plugin(autowired) injected
as a property.
When trying to run I get a coldfusion error stating that WIREBOX is

The source of the error is PluginService.cfc line 129.
Which pretty much is :
if( NOT wirebox.getBinder().mappingExists( pluginLocation ) ){

I did a dump of the plugin it was trying to instantiate and it turns
out to be our custom plugin.
Is there anything specific I should be configuring for this to work?
Is it possible to inject custom plugins into aspects at all?

I tried using 'bindAspect' in wirebox.cfc instead of annotating the
aspect but still no joy.

Thanks in advance.
Gerhard Davids

Hi Gerhard,

We had this issue already reported to us. I just finally finished the fix for it and is on the development branch now. RC1 for ColdBox 3.5 is only about 2 weeks away, so you can either wait for that official release, or update your core from github or do a workaround.

The issue lies in that the plugin service is not fully configured waiting for WireBox to finalize, but WireBox in its initialization needed a plugin. Chickend and the egg issues.

Inject a plugin provider instead

// the following fails
property name=“myPlugin” inject=“coldbox:myPlugin:MyCustomPlugin”;

  1. Map your plugin
  2. Inject a provider to it
    property name=“myPlugin” inject=“provider:MyCustomPlugin”)

This will lazy load it and prevent those issues you see.

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager:


Thanks Luis,

I managed to find the same workaround you mentioned in the mean time and it works as expected.