1 2 Previous Next 21 Replies Latest reply on Jul 28, 2006 12:58 PM by Shirish Goel

    PojoCache Weblogic 91 and JConsole issue!!

    Shirish Goel Newbie

      Hi ,

      I am using Pojo cache on weblogic 9.1 server with a clustered domain.
      When I try to check the operations through JConsole (Sun) it throws a classcast exception on the server .

      Kindly throw some light on this behavior.

      Thanks

        • 1. Re: PojoCache Weblogic 91 and JConsole issue!!
          Brian Stansberry Master

          You're going to need to provide more details; e.g. a stack trace.

          • 2. Re: PojoCache Weblogic 91 and JConsole issue!!
            Shirish Goel Newbie

            Hi,
            Thanks for your reply, Here is what I get on the weblogic server.
            I was getting errors on the jconsole side also which are not coming now after I started it with the following set up, Let me know what more information I need to provide. I am using spring to export the pojo cache as mbean to weblogic mbean server.

            jconsole -J-classpath -JC:\bea91\weblogic91\server\lib\wljmxclient.
            jar;C:\bea91\jdk150_04\lib\jconsole.jar;C:\jboss-cache\JBossCache-1.3.0.SP2\lib-50\jboss-ca
            che-jdk50.jar




            <Jul 19, 2006 5:04:01 PM PDT> <BEA-080003> <RuntimeException thrown by rmi server:
            javax.management.remote.rmi.RMIConnectionImpl.getAttribute(Ljavax.management.ObjectName;Ljava.lang.
            String;Ljavax.security.auth.Subject;)
            java.lang.ClassCastException: org.jboss.cache.aop.TreeCacheAop.
            java.lang.ClassCastException: org.jboss.cache.aop.TreeCacheAop
            at weblogic.iiop.IIOPOutputStream.writeAny(IIOPOutputStream.java:1534)
            at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2172)
            at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source)
            at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
            at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
            Truncated. see log file for complete stacktrace
            >

            • 3. Re: PojoCache Weblogic 91 and JConsole issue!!
              Ben Wang Master

              Seems to me you are trying to serialize the whole cache instance somehow? PojoCache itself has corresponding MBean that you should be able to view it from jconsole though so why do via Spring?

              • 4. Re: PojoCache Weblogic 91 and JConsole issue!!
                Shirish Goel Newbie

                Spring is exporting the PojoCache(TreeCacheAop) to the
                Weblogic MBean Server , All the JMX opertations like registration of mbeans are handled by spring,
                The PojoCache is also running on the weblogic server itself and not stand alone.

                Did I answer your question ?


                • 5. Re: PojoCache Weblogic 91 and JConsole issue!!
                  Shirish Goel Newbie

                  This is the actual configuration I am using for spring








                  weblogic
                  weblogic

                  weblogic.management.remote








                  <entry key="web:name=testBean1" value-ref="ConfigBeanA">
                  <entry key="web:name=testBean2" value-ref="CacheMBean">











                  <!-- Bean definition -->
                  <!-- The factory bean, which contains a method createInstance -->






                  • 6. Re: PojoCache Weblogic 91 and JConsole issue!!
                    Shirish Goel Newbie

                    opps ..how do i post a xml ..wanted to post the spring xml

                    • 7. Re: PojoCache Weblogic 91 and JConsole issue!!
                      Shirish Goel Newbie

                       

                      <bean id="mbeanServer"
                       class="org.springframework.jndi.JndiObjectFactoryBean">
                       <property name="jndiName"
                       value="java:comp/env/jmx/runtime"/>
                      </bean>
                      <bean id="runtimeMbeanServerConnection"
                       class="org.springframework.jmx.support.MBeanServerConnectionFactoryBean">
                       <property name="serviceUrl" value="service:jmx:t3://localhost:7001/jndi/weblogic.management.mbeanservers.runtime"/>
                       <property name="environment">
                       <props>
                       <prop key="java.naming.security.principal">weblogic</prop>
                       <prop key="java.naming.security.credentials">weblogic</prop>
                       <prop key="jmx.remote.protocol.provider.pkgs">
                       weblogic.management.remote</prop>
                       </props>
                       </property>
                      </bean>
                      <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
                       <property name="assembler" ref="assembler"/>
                       <property name="server" ref="mbeanServer"/>
                       <property name="beans">
                       <map>
                       <entry key="web:name=testBean1" value-ref="ConfigBeanA"></entry>
                       <entry key="web:name=testBean2" value-ref="CacheMBean"></entry>
                       </map>
                       </property>
                       <property name="listeners">
                       <list>
                       <ref bean="consoleAdapter"/>
                       </list>
                       </property>
                       <property name="autodetect" value="true"/>
                       <property name="registrationBehavior" value="2"/>
                       </bean>
                      
                      <!-- Bean definition -->
                      <!-- The factory bean, which contains a method createInstance -->
                      
                      <bean id="myFactoryBean" class="examples.JBossCacheServiceImpl">
                       <property name="cacheMBean" ref="CacheMBean"/>
                      </bean>
                      
                      <bean id="CacheMBean" class="org.jboss.cache.aop.TreeCacheAop">
                      </bean>


                      • 8. Re: PojoCache Weblogic 91 and JConsole issue!!
                        Shirish Goel Newbie

                        Even after not using spring for registration of cache mbean with weblogic mbean server, the same classcast exception is visible inthe server logs.

                        I dint know that the cache automatically registers with the mbean server when you start the service.

                        Any help would be great...

                        • 9. Re: PojoCache Weblogic 91 and JConsole issue!!
                          Ben Wang Master

                          Not sure exactly what happened there but not cache won't register with the mbean server directly. Some client code is doing that registration.

                          • 10. Re: PojoCache Weblogic 91 and JConsole issue!!
                            Shirish Goel Newbie

                            Hi Ben,

                            Can you help me find out the cause of this classcast exception and resolve it , That would be of great help.

                            JMX registration

                            Does Jboss cache registers with the available MBean server , when the jvm is started with the jmx agent enabled by setting the property in the weblogic startup "-Dcom.sun.management.jmxremote"
                            I think it does thats the reason I see two cache mbeans exposed on the jconsole.

                            1. Under MBeans tab , it shows this kind of structure
                            Tree
                            -jboss.cache
                            --TreeCache-Cluster
                            --- CacheMgmtInterceptor

                            2. Again under Mbeas tab but under my own custom object names

                            Tree
                            -Web
                            -- testBean2 (Of Type AopCache, no interceptos etc are listed here)..

                            Thanks for your time .


                            • 11. Re: PojoCache Weblogic 91 and JConsole issue!!
                              Jerry Gauthier Apprentice

                              JBoss Cache will register with an MBean server if you have statistics enabled. You can disable this behavior by adding the following attribute to your JBoss cache instance definition.

                              false

                              The statistics (e.g., hit/miss ratio) are dispalyed via interceptor mbeans that are associated with your cache's mbean.

                              • 12. Re: PojoCache Weblogic 91 and JConsole issue!!
                                Jerry Gauthier Apprentice

                                Sorry - my response needed to have HTML disabled. Here it is again.

                                false

                                • 13. Re: PojoCache Weblogic 91 and JConsole issue!!
                                  Shirish Goel Newbie

                                  try putting it inside the code tags

                                  • 14. Re: PojoCache Weblogic 91 and JConsole issue!!
                                    Jerry Gauthier Apprentice

                                    Aargh! Reponse looks fine in preview mode but is wrong when displayed. Once again.

                                    &lt;attribute name="UseInterceptorMbeans"&gt;false&lt;/attribute&gt;

                                    1 2 Previous Next