1 Reply Latest reply on May 27, 2011 10:14 AM by Galder Zamarreño

    Using Infinispan within the JBoss AS 6

    Mayank Mittal Novice

      We are using JBoss Cache in our project. But now we are thinking to go ahead with Infinispan. But unlike JBoss Cache I'm unable to access the Infinispan instance within JBoss.

       

      Environment:

      -----------------

      AS : JBoss AS 6.0.0 Final

      Infinispan : 4.2.0

       

      what I've tried is attached along with:

      CacheDemo.java     :  The session bean to lookup the instance of Infinispan Instance and put some value in it.

      InfinispanClientDemo.java     :     The client class to invoke the session bean.

      infinispan-configs.xml:     The infinispan config file at <JBOSS_HOME>\server\all\deploy\cluster\infinispan-cache-registry.sar

       

      I'm getting following exception:

       

       

      07:50:32,494 WARN  [org.infinispan.jmx.ResourceDMBean] Did not find queried attribute with name Cache
      07:50:32,501 ERROR [STDERR] java.lang.reflect.UndeclaredThrowableException
      07:50:32,502 ERROR [STDERR]     at $Proxy181.getCache(Unknown Source)
      07:50:32,504 ERROR [STDERR]     at infinispanDemo.CacheDemo.start(CacheDemo.java:28)
      07:50:32,505 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      07:50:32,506 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      07:50:32,507 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      07:50:32,508 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
      07:50:32,509 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.LifecycleCallbackBeanMethodInterceptor.invoke(LifecycleCallbackBeanMethodInterceptor.java:69)
      07:50:32,510 ERROR [STDERR]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)
      07:50:32,511 ERROR [STDERR]     at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)
      07:50:32,512 ERROR [STDERR]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)
      07:50:32,513 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90)
      07:50:32,514 ERROR [STDERR]     at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_779942019.invoke(InvocationContextInterceptor_z_setup_779942019.java)
      07:50:32,515 ERROR [STDERR]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)
      07:50:32,518 ERROR [STDERR]     at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
      07:50:32,519 ERROR [STDERR]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)
      07:50:32,520 ERROR [STDERR]     at org.jboss.ejb3.interceptors.container.AbstractContainer.invokeCallback(AbstractContainer.java:258)
      07:50:32,521 ERROR [STDERR]     at org.jboss.ejb3.EJBContainer.invokeCallback(EJBContainer.java:1385)
      07:50:32,522 ERROR [STDERR]     at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:1396)
      07:50:32,523 ERROR [STDERR]     at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:1408)
      07:50:32,524 ERROR [STDERR]     at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:83)
      07:50:32,525 ERROR [STDERR]     at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:62)
      07:50:32,526 ERROR [STDERR]     at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:57)
      07:50:32,527 ERROR [STDERR]     at org.jboss.ejb3.pool.ThreadlocalPool.create(ThreadlocalPool.java:54)
      07:50:32,528 ERROR [STDERR]     at org.jboss.ejb3.pool.ThreadlocalPool.get(ThreadlocalPool.java:86)
      07:50:32,529 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58)
      07:50:32,531 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      07:50:32,532 ERROR [STDERR]     at org.jboss.ejb3.core.context.SessionInvocationContextAdapter.proceed(SessionInvocationContextAdapter.java:95)
      07:50:32,535 ERROR [STDERR]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:247)
      07:50:32,536 ERROR [STDERR]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:349)
      07:50:32,537 ERROR [STDERR]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209)
      07:50:32,538 ERROR [STDERR]     at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52)
      07:50:32,539 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      07:50:32,540 ERROR [STDERR]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      07:50:32,541 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      07:50:32,542 ERROR [STDERR]     at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
      07:50:32,543 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      07:50:32,544 ERROR [STDERR]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182)
      07:50:32,545 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      07:50:32,546 ERROR [STDERR]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
      07:50:32,548 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      07:50:32,548 ERROR [STDERR]     at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
      07:50:32,551 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      07:50:32,552 ERROR [STDERR]     at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)
      07:50:32,553 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      07:50:32,554 ERROR [STDERR]     at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
      07:50:32,555 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      07:50:32,556 ERROR [STDERR]     at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86)
      07:50:32,557 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      07:50:32,558 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:392)
      07:50:32,559 ERROR [STDERR]     at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
      07:50:32,560 ERROR [STDERR]     at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
      07:50:32,561 ERROR [STDERR]     at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
      07:50:32,563 ERROR [STDERR]     at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898)
      07:50:32,565 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)
      07:50:32,565 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)
      07:50:32,568 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)
      07:50:32,569 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
      07:50:32,570 ERROR [STDERR] Caused by: javax.management.AttributeNotFoundException: Unknown attribute 'Cache'. Known attributes names are: [CreatedCacheCount, DefinedCacheCount, Name, CacheManagerStatus, RunningCacheCount, Version, Dynamic MBean Description, DefinedCacheNames]
      07:50:32,571 ERROR [STDERR]     at org.infinispan.jmx.ResourceDMBean.getAttribute(ResourceDMBean.java:152)
      07:50:32,572 ERROR [STDERR]     at org.jboss.mx.server.RawDynamicInvoker.getAttribute(RawDynamicInvoker.java:117)
      07:50:32,573 ERROR [STDERR]     at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:567)
      07:50:32,574 ERROR [STDERR]     at org.jboss.system.server.jmx.MBeanServerWrapper.getAttribute(MBeanServerWrapper.java:122)
      07:50:32,575 ERROR [STDERR]     at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1404)
      07:50:32,576 ERROR [STDERR]     at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
      07:50:32,577 ERROR [STDERR]     at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
      07:50:32,578 ERROR [STDERR]     at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360)
      07:50:32,579 ERROR [STDERR]     at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:600)
      07:50:32,580 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      07:50:32,581 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      07:50:32,582 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      07:50:32,585 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
      07:50:32,586 ERROR [STDERR]     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
      07:50:32,587 ERROR [STDERR]     at sun.rmi.transport.Transport$1.run(Transport.java:159)
      07:50:32,588 ERROR [STDERR]     at java.security.AccessController.doPrivileged(Native Method)
      07:50:32,589 ERROR [STDERR]     at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
      07:50:32,590 ERROR [STDERR]     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
      07:50:32,591 ERROR [STDERR]     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
      07:50:32,592 ERROR [STDERR]     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
      07:50:32,593 ERROR [STDERR]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      07:50:32,594 ERROR [STDERR]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      07:50:32,595 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:619)
      07:50:32,596 ERROR [STDERR]     at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
      07:50:32,598 ERROR [STDERR]     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
      07:50:32,599 ERROR [STDERR]     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
      07:50:32,602 ERROR [STDERR]     at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
      07:50:32,602 ERROR [STDERR]     at javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown Source)
      07:50:32,604 ERROR [STDERR]     at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:878)
      07:50:32,605 ERROR [STDERR]     at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:263)
      07:50:32,606 ERROR [STDERR]     ... 57 more
      

       

      Please help me out..