0 Replies Latest reply on Nov 22, 2009 4:20 AM by Rakesh Prajapati

    Error in accessing pojocache mbean

    Rakesh Prajapati Newbie

      Hi,

      I am new to the jboss cache, I want to use jboss cache in my application using MBean feature. I have created MBean using following configuration:


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


      jboss:service=TransactionManager
      <!-- Configure the TransactionManager -->
      org.jboss.cache.JBossTransactionManagerLookup

      <!-- Isolation level : SERIALIZABLE
      REPEATABLE_READ (default)
      READ_COMMITTED
      READ_UNCOMMITTED
      NONE
      -->
      REPEATABLE_READ

      <!-- Valid modes are LOCAL, REPL_ASYNC and REPL_SYNC -->
      REPL_SYNC

      <!-- Just used for async repl: use a replication queue -->
      false

      <!-- Replication interval for replication queue (in ms) -->
      0

      <!-- Max number of elements which trigger replication -->
      0

      <!-- Name of cluster. Needs to be the same for all clusters, in order to find each other -->
      TreeCache-Cluster

      <!-- JGroups protocol stack properties. Can also be a URL, e.g. file:/home/bela/default.xml
      -->


      <!-- UDP: if you have a multihomed machine,
      set the bind_addr attribute to the appropriate NIC IP address, e.g bind_addr="192.168.0.2"
      -->
      <!-- UDP: On Windows machines, because of the media sense feature
      being broken with multicast (even after disabling media sense)
      set the loopback attribute to true
      -->
      <UDP mcast_addr="228.1.2.3" mcast_port="48866" ip_ttl="64" ip_mcast="true" mcast_send_buf_size="150000" mcast_recv_buf_size="80000" ucast_send_buf_size="150000" ucast_recv_buf_size="80000" loopback="false" />
      <PING timeout="2000" num_initial_members="3" up_thread="false" down_thread="false" />
      <MERGE2 min_interval="10000" max_interval="20000" />
      <FD_SOCK />
      <VERIFY_SUSPECT timeout="1500" up_thread="false" down_thread="false" />
      <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800" max_xmit_size="8192" up_thread="false" down_thread="false" />
      <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10" down_thread="false" />
      <pbcast.STABLE desired_avg_gossip="20000" up_thread="false" down_thread="false" />
      <FRAG frag_size="8192" down_thread="false" up_thread="false" />
      <pbcast.GMS join_timeout="5000" join_retry_timeout="2000" shun="true" print_local_addr="true" />
      <pbcast.STATE_TRANSFER up_thread="true" down_thread="true" />



      <!-- Whether or not to fetch state on joining a cluster -->
      true

      <!-- The max amount of time (in milliseconds) we wait until the
      initial state (ie. the contents of the cache) are retrieved from
      existing members in a clustered environment
      -->
      5000

      <!-- Number of milliseconds to wait until all responses for a synchronous call have been received. -->
      15000

      <!-- Max number of milliseconds to wait for a lock acquisition -->
      10000

      <!-- Name of the eviction policy class. -->




      --------------
      Now I am using it in my application using follwing code:

      MBeanServer server = MBeanServerLocator.locate();
      s_cacheLoginPageRoom = (PojoCacheMBean) MBeanProxyExt.create(PojoCacheMBean.class, "jboss.cache:service=PojoCache",server);


      When I am deploying my application I got follwoing error:

      javax.management.InstanceNotFoundException: jboss.cache:service=PojoCache
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1010)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1303)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.getMBeanInfo(JmxMBeanServer.java:903)
      at org.jboss.mx.util.MBeanProxyExt.init(MBeanProxyExt.java:407)
      at org.jboss.mx.util.MBeanProxyExt.(MBeanProxyExt.java:99)
      at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:394)
      at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:349)
      at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:324)
      at com.portal.cache.PortalPageCache.(LoginCache.java:34)
      at com.portal.cache.LoginCache.getS_cacheSingltonInstance(LoginCache.java:61)
      at com.portal.cache.LoginCache.getLoginPageData(LoginCache.java:74)
      at com.portal.cache.PortalCacheClient.getLoginPageList(PortalCacheClient.java:570)
      at com.portal.controller.marketingadmin.ManageSequencePrioritizationController.getSequenceLoginList(ManageSequencePrioritizationController.java:92)
      at com.portal.backingbean.login.LoginBean.iniInternetTable(LoginBean.java:397)
      at com.portal.backingbean.login.LoginBean.getSequenceInternetShowList(LoginBean.java:580)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
      at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
      at org.apache.el.parser.AstValue.getValue(AstValue.java:97)
      at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
      at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
      at javax.faces.component.UIData.getValue(UIData.java:609)
      at com.icesoft.faces.component.panelseries.UISeries.getValue(UISeries.java:572)
      at com.icesoft.faces.component.panelseries.UISeries.getDataModel(UISeries.java:357)
      at com.icesoft.faces.component.panelseries.UISeries.processCurrentRowData(UISeries.java:144)
      at com.icesoft.faces.component.panelseries.UISeries.setRowIndex(UISeries.java:136)
      at com.icesoft.faces.component.ext.renderkit.TableRenderer.renderFacet(TableRenderer.java:146)
      at com.icesoft.faces.renderkit.dom_html_basic.TableRenderer.encodeBegin(TableRenderer.java:122)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
      at javax.faces.component.UIData.encodeBegin(UIData.java:962)
      at com.icesoft.faces.component.panelseries.UISeries.encodeBegin(UISeries.java:298)
      at com.icesoft.faces.component.ext.HtmlDataTable.encodeBegin(HtmlDataTable.java:110)
      at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:356)
      at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:492)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:497)
      at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
      at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:159)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
      at com.icesoft.faces.context.View$2$1.respond(View.java:48)
      at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
      at com.icesoft.faces.context.View$2.serve(View.java:77)
      at com.icesoft.faces.context.View.servePage(View.java:149)
      at com.icesoft.faces.webapp.http.core.MultiViewServer.service(MultiViewServer.java:67)
      at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
      at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:149)
      at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
      at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
      at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
      at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
      at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694)
      at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665)
      at org.apache.jsp.index_jsp._jspService(index_jsp.java:64)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.portal.common.UserRoleCheckFilter.doFilter(UserRoleCheckFilter.java:100)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.portal.common.HitRateFilter.doFilter(HitRateFilter.java:78)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
      at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:97)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:595)


      Is there something that I am missing? I appreciated your help in advance.