addExtension() method does not work!

Hi, as title suggest, I’ve developed an extension for IQ but, when I do:

iq.addExtension(ext);

program stops, no exceptions or other but iq packet is not created.

I think it’s because i didn’t register this ext, how can I solve this problem?