If you install the JBoss Agent, uninstall it, and then reinstall it on the same machine, the following error occurs:
java.util.NoSuchElementException: Cannot find xPath "/Server/Service/Engine/Realm [@className='org.jboss.web.tomcat.security.JBossSecurityMgrRealm']"
It occurs just after you are prompted to make sure the JBoss server is stopped.
Ignore the error. The JBoss Agent installs and imports into the Administration Console.