This project has moved and is read-only. For the latest updates, please go here.

Action Adapter Exception

May 28, 2013 at 2:48 PM
I am mapping measurements through an Action adapter to a Virtual Device downstream.

My Virtual Device under Device Measurements shows that it is receiving data and is green.
My ShortStatus on my adapter verifies that I am receiving all intended measurements.

However, I get the following Exception in the Console:

[CHESAPEAKE_EC_PJM_MAPPING] Exception in consumer handler for NewMeasurements ev
ent: Index was out of range. Must be non-negative and less than the size of the
Parameter name: index

I don't believe this is coming from my code. Probably something in the base class. But I am not sure what it is that I have done wrong. I have 40+ adapters using the same code with no problems. The connection string for this adapter and the others are structurally the same (only the list of input and output measurement keys are different).

Any suggestions for troubleshooting this one?


May 28, 2013 at 3:58 PM
OK so I dug a little bit deeper...

The source code for the ActionAdapterBase says that it is an exception to protect your code from 'consumer' exceptions. I am assuming that this means that somehow anything downstream from the adapter could be considered a consumer. So for example, if there is an exception thrown by the output stream that contains my virtual device which I am mapping my measurements to that it could throw an exception and cause this problem.

OK, So I removed the virtual device from my output stream and it resovled the issue. I am assuming that the modeling of the device in the output stream could have somehow become corrupt. I have seen this happen in a different scenario. The receiver of that particular output stream was receiving infinite values and strange numbers so I deleted the output stream and remodeled it from scratch. That had fixed that problem. Puzzling.... THis explains that fact that my device was receiving the measurements yet a downstream issue was still throwing the exception.

I will post again if I can remodel the device in the stream successfully.

May 28, 2013 at 11:02 PM
I thought that I had tracked my error down to incorrectly defining the Source Index of the phasors that I am sending to the virtual devices. However, after fixing that problem I still cannot add this device to the output stream without getting the Consumer Handler error.

I am stumped. Any thoughts?