You may be aware of this but the module number you feed in is relative to the number of Solenoid cards you have. It is not the slot number. We ran into this issue. We had a second Solenoid card in slot 4 and were getting the error. When trying to create a solenoid like this.
Code:
new Solenoid(4, 1);
In reality we had to use.
Code:
new Solenoid(2, 1);
*Note I don't have the code in front of me. It is possible the number is 0 based in which case it would 1 not 2.
Hope this helps.