3 Replies Latest reply on Feb 28, 2008 3:57 PM by Arun Kumarr

    JndiBoundTreeCacheProvider

    Arun Kumarr Newbie

      Hai, I get this Type cast error when Iam using JndiBoundTreeCacheProvider.

      02:33:24,653 ERROR [STDERR] Caused by: java.lang.ClassCastException: $Proxy200 cannot be cast to org.jboss.cache.TreeCache
      02:33:24,653 ERROR [STDERR] at org.hibernate.cache.JndiBoundTreeCacheProvider.getTreeCacheInstance(JndiBoundTreeCacheProvider.java:61)
      02:33:24,653 ERROR [STDERR] at org.hibernate.cache.JndiBoundTreeCacheProvider.buildCache(JndiBoundTreeCacheProvider.java:31)
      02:33:24,653 ERROR [STDERR] at org.hibernate.cache.UpdateTimestampsCache.<init>(UpdateTimestampsCache.java:42)
      02:33:24,653 ERROR [STDERR] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:337)
      02:33:24,653 ERROR [STDERR] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)


      When I checked the JndiBoundTreeCacheProvider Class, I saw that the author has tried to typecast the JRMPProxyObject to org.jboss.cache.TreeCache.

      Can you please tell me if this issue has been fixed. If it is not is there any work arounds for the same.
      Thanks.

      Here is my configuration for the exporting the Treecache MBean with a JNDI:


      <mbean
       code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
       name="jboss:service=proxyFactory,type=jrmp,target=factory">
       <attribute name="InvokerName">jboss:service=invoker,type=jrmp</attribute>
       <attribute name="TargetName">sensei:service=TreeCache</attribute>
       <attribute name="JndiName">SenseiCache</attribute>
       <attribute name="InvokeTargetMethod">true</attribute>
       <attribute name="ExportedInterface">org.jboss.cache.TreeCacheMBean</attribute>
       <attribute name="ClientInterceptors">
       <interceptors>
       <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
       <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
       <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
       </interceptors>
       </attribute>
       <depends>jboss:service=invoker,type=jrmp</depends>
       <depends>sensei:service=TreeCache</depends>
       </mbean>