1 Reply Latest reply on Oct 16, 2013 9:48 AM by Li Chen

    the JMX Mbean lookup not working in Jboss AS 7

    Li Chen Newbie

      I successfully migrated our application from JBoss AS 5 to JBoss AS 7. i had service.sar to be delpoyed to the JBoss AS 7, here is the jboss-service.xml file looks like:


      <?xml version="1.0" encoding="UTF-8"?>

      <server xmlns="urn:jboss:service:7.0"


        xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">

          <mbean code="com.etn.xmlloader.XMLDataLoader" 


             <attribute name="JndiName">services/XMLData</attribute>


          <mbean code="org.quartz.ee.jmx.jboss.QuartzService"


             <attribute name="JndiName">services/Quartz</attribute>




      I try to lookup my Mbean from servlet, i got followed error:


      16:04:36,113 ERROR [stderr] (http-/ java.lang.ClassCastException:

      javax.naming.Reference cannot be cast to com.etn.xmlloader.XMLDataHolder



      here is the code in servlet:


      UrlToWarIdMapStaticXMLData urlWarIdMap = ((XMLDataHolder)initial.lookup("services/XMLData")).getUrlToWarIdMapXMLData();




      please Help.