Check, if there are more than one jboss-j2ee.jar files in your classpath
Thanks jaikiran for responding. I just figured out that i have both jboss-j2ee.jar and jbossall-client.jar in my classspath. Both have javax.jms.Queue in them and could be of different versions. jbossall-client.jar has both org.jboss.mq.SpyQueue and javax.jms.Queue.
I removed jboss-j2ee.jar from my classspath to resolve my issue.