Offline messages are not delivering to the user when the person avails.

*DelayInformation info = (DelayInformation)message.getExtension("x","jabber:x:delay");*

returns null.

when i iterate the collection of message.getExtensions() , i get delay urn:xmpp:delay.

can anyone explain on this.
I'm using smack and smackx.jar. Though the smackx.jar has smack.providers it's not taken into account.

some suggested to use urn:xmpp:delay ,which results in class cast exception.

DelayInformation inf = (DelayInformation)message.getExtension("delay","urn:xmpp:delay");

Exception:
java.lang.ClassCastException: org.jivesoftware.smack.packet.DefaultPacketExtension