Cannot insert item with key afterInstanceAutowire

54 views
Skip to first unread message

Ary Yuniarti

unread,
Aug 4, 2016, 6:26:30 AM8/4/16
to ColdBox Platform
hi there,

i have this following error: 

Message : Cannot insert item with key afterInstanceAutowire. | Detail :  This key already exists. | TagContext: 1 CF_CFPAGE (389,0) /opt/workexpert/15.1/coldbox/system/web/services/InterceptorService.cfc 2 CF_TEMPLATEPROXY (510,0) /opt/workexpert/15.1/coldbox/system/web/services/HandlerService.cfc 3 CF_UDFMETHOD (100,0) /opt/workexpert/15.1/coldbox/system/web/services/HandlerService.cfc 4 CF_UDFMETHOD (141,0) /opt/workexpert/15.1/coldbox/system/web/services/HandlerService.cfc 5 CF_TEMPLATEPROXY (502,0) /opt/workexpert/15.1/coldbox/system/web/Controller.cfc 6 CF_UDFMETHOD (425,0) /opt/workexpert/15.1/coldbox/system/web/Controller.cfc 7 CF_TEMPLATEPROXY (197,0) /opt/workexpert/15.1/coldbox/system/Bootstrap.cfc 8 CF_UDFMETHOD (353,0) /opt/workexpert/15.1/coldbox/system/Bootstrap.cfc 9 CF_TEMPLATEPROXY (96,0) /opt/workexpert/15.1/web/go/Application.cfc | Stack Trace : coldfusion.runtime.StructInsertException: Cannot insert item with key afterInstanceAutowire.

the trigger error was in interceptorservice.cfc in line structinsert

if ( NOT structKeyExists( instance.interceptionStates, arguments.state ) ){
oInterceptorState = CreateObject("component","coldbox.system.web.context.InterceptorState").init( arguments.state, controller.getLogBox() );
structInsert( instance.interceptionStates , arguments.state, oInterceptorState );
}
else{
oInterceptorState = structFind( instance.interceptionStates, arguments.state );
}

currently i'm using coldbox 4.2 
can someone help me with this issue ?

thank you
Ary



Ancient Programmer

unread,
Aug 4, 2016, 9:41:18 AM8/4/16
to ColdBox Platform
What is the context? What are you trying to do? It would be helpful if you post your code.
Reply all
Reply to author
Forward
0 new messages