Coldbox 3.5.2 Initialization Issue

We have recently ran into an issue with Coldbox 3.5.2, running under ColdFusion 11 on Windows 2008 R2.

Here is a brief explanation of the issue:

  1. The Coldbox.cfc performs a lot of initialization, framework settings, etc.

  2. It defines the handler main.onAppInit as the initialization handler (in Coldbox.cfc)

  3. The main.onAppInit() performs some additional initialization step, adding settings to the framework, using the setSetting(key, value) method.

Recently, we have seen issues where Cron jobs (CF Scheduler) are throwing errors where a class, injected via auto-wiring, are not found. If we manually reinitialize the application by using the URL fwreinit=value, the system settles down and operated correctly.

We can force the issue by invoking the job (event/action) with the fwreinit URL argument. When we do so, we have the dependency injection problem. To correct, we have to invoke a different event:action with the fwreinit.

I am curious if this could be related to having framework settings created in the onAppInit() method. It almost appears that dependencies are getting auto-wired before the application is initialized.

Any ideas would be appreciated.

Kevin S. Anderson

We have recently ran into an issue with Coldbox 3.5.2, running under ColdFusion 11 on Windows 2008 R2.

Here is a brief explanation of the issue:

<![if !supportLists]>1. <![endif]>The Coldbox.cfc performs a lot of initialization, framework settings, etc.

<![if !supportLists]>2. <![endif]>It defines the handler main.onAppInit as the initialization handler (in Coldbox.cfc)

<![if !supportLists]>3. <![endif]>The main.onAppInit() performs some additional initialization step, adding settings to the framework, using the setSetting(key, value) method.

Recently, we have seen issues where Cron jobs (CF Scheduler) are throwing errors where a class, injected via auto-wiring, are not found. If we manually reinitialize the application by using the URL fwreinit=value, the system settles down and operated correctly.

We can force the issue by invoking the job (event/action) with the fwreinit URL argument. When we do so, we have the dependency injection problem. To correct, we have to invoke a different event:action with the fwreinit.

I am curious if this could be related to having framework settings created in the onAppInit() method. It almost appears that dependencies are getting auto-wired before the application is initialized.

Any ideas would be appreciated.

Kevin S. Anderson

Hi, Brad:

You are quick!

It is not a proxy. We can replicate this both on our local VMs and on a test server.

Kevin S. Anderson

INDURE Team Software Engineer

Intelligent Software Solutions Inc.

Global Enterprise Solutions Division

Phone: 719.452.7456 | Cell: 719.930.2599

Email: kevin.anderson@issinc.com

I realized I did not respond completely to the question regarding the URL…

The URL for the job engine is: https://[server]/jobs/smsengine/run

Smsengine is the event with run as the action.

Kevin S. Anderson

INDURE Team Software Engineer

Intelligent Software Solutions Inc.

Global Enterprise Solutions Division

Phone: 719.452.7456 | Cell: 719.930.2599

Email: kevin.anderson@issinc.com