-
1. Re: PojoCache Weblogic 91 and JConsole issue!!
brian.stansberry Jul 19, 2006 5:20 PM (in response to sphinxmember)You're going to need to provide more details; e.g. a stack trace.
-
2. Re: PojoCache Weblogic 91 and JConsole issue!!
sphinxmember Jul 19, 2006 8:14 PM (in response to sphinxmember)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 Jul 19, 2006 8:45 PM (in response to sphinxmember)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!!
sphinxmember Jul 19, 2006 10:35 PM (in response to sphinxmember)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!!
sphinxmember Jul 19, 2006 10:38 PM (in response to sphinxmember)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!!
sphinxmember Jul 19, 2006 10:41 PM (in response to sphinxmember)opps ..how do i post a xml ..wanted to post the spring xml
-
7. Re: PojoCache Weblogic 91 and JConsole issue!!
sphinxmember Jul 20, 2006 1:03 PM (in response to sphinxmember)<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!!
sphinxmember Jul 22, 2006 3:47 PM (in response to sphinxmember)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 Jul 24, 2006 10:40 AM (in response to sphinxmember)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!!
sphinxmember Jul 24, 2006 5:27 PM (in response to sphinxmember)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!!
jerrygauth Jul 24, 2006 8:30 PM (in response to sphinxmember)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!!
jerrygauth Jul 24, 2006 8:32 PM (in response to sphinxmember)Sorry - my response needed to have HTML disabled. Here it is again.
false -
13. Re: PojoCache Weblogic 91 and JConsole issue!!
sphinxmember Jul 24, 2006 8:33 PM (in response to sphinxmember)try putting it inside the code tags
-
14. Re: PojoCache Weblogic 91 and JConsole issue!!
jerrygauth Jul 24, 2006 8:35 PM (in response to sphinxmember)Aargh! Reponse looks fine in preview mode but is wrong when displayed. Once again.
<attribute name="UseInterceptorMbeans">false</attribute>