The warning is pretty straightforward. Only a root deployment can define a new classloading scope/domain.
I don't recall what was the exact fix we made, but it seems your packaging could be wrong before.
Where should the file be packaged? At the moment it is in the ear inside META-INF/jboss-app.xml
Please can you tell me where I should move it to.
Fixed the problem. In jboss-service.xml
<attribute name="URLs"> deploy/,mydeploy </attribute>
Needed to be
<attribute name="URLs"> deploy/,mydeploy/ </attribute>
Bummer! Not an easily found. The app server was deploying mydeploy dir as the root because I forgot the slash!