Upgrade to something newer.
I would recommend you WildFly 9.0.0.Final
you are talking about was added after 7.1 that is why it doesn't work.
Thank you for your answer Tomaz.
It seems that the problem was due to lacking exclusion of org.apache.commons.logging.
Both org.apache.log4j and org.apache.commons.logging are needed to be excluded in jboss-deployment-structure.xml.