Binding JBossCache 1.2.1 using JRMPProxyFactory to JNDI
-------------------------------------------------------

         Key: JBCACHE-127
         URL: http://jira.jboss.com/jira/browse/JBCACHE-127
     Project: JBoss Cache
        Type: Bug
    Versions: 1.2.1    
 Environment: JBoss 4.0.1sp1 with JBossCache 1.2.1 (the original JBossCache 1.2 
which is delivered with JBoss 4.0.1sp1 was replaced by JBossCache 1.2.1), 
Hibernate3
    Reporter: wdorning
 Assigned to: Bela Ban 


When trying to bind JBossCache 1.2.1 (which does not have the JndiName property 
anymore) to JNDI using JRMPProxyFactory MBean I get an runtime exception saying 
getInterceptors() of org.jboss.cache.TreeCacheMBean and 
org.jboss.proxy.IClientContainer does not mach ... - seems to me that both 
TreeCacheMBean and IClientContainer implmeent getInterceptors...

So binding JBossCache 1.2.1 to JNDI using JRMPProxyFactory does not seem to 
work.

The config:

    <classpath codebase="lib" archives="jboss-cache.jar, jgroups.jar"/>

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

The exception:

13:25:00,163 DEBUG [JRMPProxyFactory] Starting 
jboss.cache:service=Cache-1,target=factory,type=jrmp
13:25:00,165 ERROR [JRMPProxyFactory] Starting failed 
jboss.cache:service=Cache-1,target=factory,type=jrmp
java.lang.IllegalArgumentException: methods with same name and parameter 
signature but different return type in interface org.jboss.cache.TreeCacheMBe
an and interface org.jboss.proxy.IClientContainer: getInterceptors()
        at sun.misc.ProxyGenerator.addProxyMethod(ProxyGenerator.java:312)
        at sun.misc.ProxyGenerator.generateClassFile(ProxyGenerator.java:175)
        at sun.misc.ProxyGenerator.generateProxyClass(ProxyGenerator.java:74)
        at java.lang.reflect.Proxy.getProxyClass(Proxy.java:472)
        at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:552)
        at 
org.jboss.proxy.GenericProxyFactory.createProxy(GenericProxyFactory.java:115)
        at 
org.jboss.proxy.GenericProxyFactory.createProxy(GenericProxyFactory.java:66)
        at 
org.jboss.invocation.jrmp.server.JRMPProxyFactory.createProxy(JRMPProxyFactory.java:245)
        at 
org.jboss.invocation.jrmp.server.JRMPProxyFactory.startService(JRMPProxyFactory.java:186)
        at 
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
        at 
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at 
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
        at $Proxy0.start(Unknown Source)
        at org.jboss.system.ServiceController.start(ServiceController.java:416)
        at org.jboss.system.ServiceController.start(ServiceController.java:438)
        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
        at $Proxy4.start(Unknown Source)
        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
/Cache-1



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to