1 Reply Latest reply on May 12, 2009 5:11 AM by Manik Surtani

    jboss cache initialization problem

    Jose Miguel Loor Apprentice

      Hi

      I have a project and i am trying to use jboss cache to save some data.

      My project is an ear, in the ear/lib folder i have this two jars:

      - jboss-cache-jdk50.jar (version 1.4.1.SP5)
      - jgroups.jar (2.4.1-SP4)

      i am deploying my app in the default config (i grabbed these two jars from the all config)

      when i try to initialize the cache i get these exception:

      org.jgroups.ChannelException: unable to setup the protocol stack
      12:03:29,127 ERROR [STDERR] at org.jgroups.JChannel.init(JChannel.java:1273)
      12:03:29,127 ERROR [STDERR] at org.jgroups.JChannel.(JChannel.java:265)
      12:03:29,127 ERROR [STDERR] at org.jgroups.JChannel.(JChannel.java:248)
      12:03:29,127 ERROR [STDERR] at org.jboss.cache.TreeCache._createService(TreeCache.java:1474)
      12:03:29,127 ERROR [STDERR] at org.jboss.cache.TreeCache.startService(TreeCache.java:1529)
      12:03:29,127 ERROR [STDERR] at ec.gov.sri.recValidacionDoc.servicio.ServicioCertificadoX509Bean.postConstructHandler(ServicioCertificadoX509Bean.java:179)
      12:03:29,127 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      12:03:29,127 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      12:03:29,127 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:03:29,127 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:03:29,127 ERROR [STDERR] at org.jboss.ejb3.interceptor.LifecycleInvocationContextImpl.proceed(LifecycleInvocationContextImpl.java:159)
      12:03:29,128 ERROR [STDERR] at org.jboss.ejb3.interceptor.LifecycleInterceptorHandler.postConstruct(LifecycleInterceptorHandler.java:109)
      12:03:29,128 ERROR [STDERR] at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:619)
      12:03:29,128 ERROR [STDERR] at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:131)
      12:03:29,128 ERROR [STDERR] at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:49)
      12:03:29,128 ERROR [STDERR] at org.jboss.ejb3.ThreadlocalPool.create(ThreadlocalPool.java:50)
      12:03:29,128 ERROR [STDERR] at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:90)
      12:03:29,128 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
      12:03:29,128 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:03:29,128 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      12:03:29,128 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
      12:03:29,128 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:03:29,128 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
      12:03:29,128 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:03:29,128 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      12:03:29,129 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:03:29,129 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
      12:03:29,129 ERROR [STDERR] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
      12:03:29,129 ERROR [STDERR] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
      12:03:29,129 ERROR [STDERR] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
      12:03:29,129 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
      12:03:29,129 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
      12:03:29,129 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
      12:03:29,129 ERROR [STDERR] Caused by: java.lang.ClassCastException: org.jgroups.protocols.UDP
      12:03:29,129 ERROR [STDERR] at org.jgroups.stack.Configurator$ProtocolConfiguration.createLayer(Configurator.java:593)
      12:03:29,130 ERROR [STDERR] at org.jgroups.stack.Configurator$ProtocolConfiguration.access$000(Configurator.java:502)
      12:03:29,130 ERROR [STDERR] at org.jgroups.stack.Configurator.createProtocols(Configurator.java:283)
      12:03:29,130 ERROR [STDERR] at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:56)
      12:03:29,130 ERROR [STDERR] at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:180)
      12:03:29,130 ERROR [STDERR] at org.jgroups.JChannel.init(JChannel.java:1270)
      12:03:29,130 ERROR [STDERR] ... 32 more

      The data i am trying to put in cache is not very complicated. I have no cluster environment and no special, high-tolerant needs in the process

      How can i solve the problem ??? is my approach too demanding for this need ?? is there any other cache provider i could use ??

      or a much simpler solution ?? eg: an static Map :)

      thanks a lot