Please remove any xerces related jar that you have added into the existing
JBoss. JBoss 5.1 already contains xerces jars and you don't need to add those jars again which might be old. I had faced the same problem while upgrading from JBoss 4.2 to JBoss 5.1.