6 Replies Latest reply on Jan 5, 2012 5:30 AM by Galder Zamarreño

    Possible to update 'infinispan quickstarts' to (at least) 5.1.0.CR1

    Aleš Bregar Newbie

      Hi,

       

      I have recently upgraded as7 from 7.0.2 to 7.1.0.CR1, which introduced infinispan 5.1.CR1. Trying to start distributed cache against latest available quickstarts examples(specially 'jboss-as7-quickstart') has given me some trouble.

       

      The snippet from Controller.java, condition

      if (cache.getConfiguration().getCacheMode() != CacheMode.LOCAL) {
      

       

      always returns false, regardless the cache config (eq. I use 'distributed cache') used.

       

      If this condition is removed (for test purpose), than

      return cache.getDistributionManager().locate(key);
      

       

      throws NPE, looks like on distribution manager which is null for some reason.

       

      Logger states that cluster forms normally, eq.:

       

      [Server:server-four] 00:36:41,824 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (Incoming-4,null) ISPN000094: Received new cluster view: [server-four/jboss-as7-quickstart|1] [server-four/jboss-as7-quickstart, server-three/jboss-as7-quickstart]
      

       

      As this worked previously, I have built some functionality on top of this example for the application I work on.

      I would really appreciate for some hint what changed or if quickstart example is possible to be updated.

       

      Thank you in advance,

      A

        • 1. Re: Possible to update 'infinispan quickstarts' to (at least) 5.1.0.CR1
          Galder Zamarreño Master

          Hmmmm, this might be related to the configuration changes introduced in 5.1. We've released 5.1.0.CR2 which might have fixed that but this version did not make it to 7.1.0.CR1. Can you try substituting the Infinispan version in AS with 5.1.0.CR2 and see if the issue is still present?

          • 2. Re: Possible to update 'infinispan quickstarts' to (at least) 5.1.0.CR1
            Aleš Bregar Newbie

            @Galder

            Switched to CR2, now it does not even deploy with following:

             

            [Server:server-three] 03:38:06,299 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."infinispan-jboss-as7.war".We
            ldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."infinispan-jboss-as7.war".WeldService: org.jboss.weld.exceptions.UnserializableDependencyException
            : WELD-001413 The bean Managed Bean [class org.infinispan.quickstart.jbossas7.Controller] with qualifiers [@Any @Default @Named] declares passivating scope but has non-serializable
             dependency Producer Method [AdvancedCache<K, V>] with qualifiers [@Any @GenericMarker @Synthetic] declared as [[method] @Produces @ApplyScope public org.infinispan.cdi.AdvancedCac
            heProducer.getAdvancedCache(BeanManager)]
            [Server:server-three]   at org.jboss.as.weld.services.WeldService.start(WeldService.java:96)
            [Server:server-three]   at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
            [Server:server-three]   at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
            [Server:server-three]   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29]
            [Server:server-three]   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29]
            [Server:server-three]   at java.lang.Thread.run(Thread.java:662) [:1.6.0_29]
            [Server:server-three] Caused by: org.jboss.weld.exceptions.UnserializableDependencyException: WELD-001413 The bean Managed Bean [class org.infinispan.quickstart.jbossas7.Controller
            ] with qualifiers [@Any @Default @Named] declares passivating scope but has non-serializable dependency Producer Method [AdvancedCache<K, V>] with qualifiers [@Any @GenericMarker @
            Synthetic] declared as [[method] @Produces @ApplyScope public org.infinispan.cdi.AdvancedCacheProducer.getAdvancedCache(BeanManager)]
            [Server:server-three]   at org.jboss.weld.bootstrap.Validator.validateInjectionPointPassivationCapable(Validator.java:323)
            [Server:server-three]   at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:294)
            [Server:server-three]   at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:243)
            [Server:server-three]   at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:106)
            [Server:server-three]   at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:126)
            [Server:server-three]   at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:345)
            [Server:server-three]   at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:330)
            [Server:server-three]   at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
            [Server:server-three]   at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
            [Server:server-three]   at org.jboss.as.weld.services.WeldService.start(WeldService.java:89)
            [Server:server-three]   ... 5 more
            [Server:server-three]
            [Server:server-four] 03:38:06,494 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."infinispan-jboss-as7.war".Wel
            dService: org.jboss.msc.service.StartException in service jboss.deployment.unit."infinispan-jboss-as7.war".WeldService: org.jboss.weld.exceptions.UnserializableDependencyException:
             WELD-001413 The bean Managed Bean [class org.infinispan.quickstart.jbossas7.Controller] with qualifiers [@Any @Default @Named] declares passivating scope but has non-serializable
            dependency Producer Method [AdvancedCache<K, V>] with qualifiers [@Any @GenericMarker @Synthetic] declared as [[method] @Produces @ApplyScope public org.infinispan.cdi.AdvancedCach
            eProducer.getAdvancedCache(BeanManager)]
            

             

            Any hint?

            • 3. Re: Possible to update 'infinispan quickstarts' to (at least) 5.1.0.CR1
              Galder Zamarreño Master

              Hmmm, something not right there. I've created a JIRA to track it.

              • 4. Re: Possible to update 'infinispan quickstarts' to (at least) 5.1.0.CR1
                Aleš Bregar Newbie

                Hi,

                 

                I have tried some more and have some more info if of any help:

                - all tried on as 7.1.0.CR1 with infinispan 5.1.0.CR2

                - I have removed CDI temporary and have done a lookup to cachecontainer directly through resource

                - updated the CacheMode import due to deprecation as apidoc stated (

                //import org.infinispan.config.Configuration.CacheMode;

                import org.infinispan.configuration.cache.CacheMode;

                )

                 

                 

                Now cache loads itself (at least) but another problem is that CacheMode states that it is LOCAL, while subsystem is set as

                 

                <cache-container name="jboss-as7-quickstart" default-cache="jboss-as7-quickstart-cache">
                       <distributed-cache owners="2" mode="SYNC" name="jboss-as7-quickstart-cache"/>
                </cache-container>
                

                 

                Which makes me think that subsystem configuration is not read (or not read properly)?

                • 5. Re: Possible to update 'infinispan quickstarts' to (at least) 5.1.0.CR1
                  Aleš Bregar Newbie

                  Hi,

                   

                  just some more info I figured out:

                  - like issue with reading as7 infinispan configuration from subsystem config was already found (http://community.jboss.org/message/644507) as a case but this is as7 issue

                  - I have tried as above discussion suggests and tried to produce cache directly and not just container as quickstart example showed, also tried to configure cache programmatically (as reading config from as7 does not work currently in as7.1CR1)

                  - if done that I was able to Inject produced Cache (injecting AdvancedCache still has the same problem as is stated above), so I kind can move forward with my project, but still I think I would benefit from AdvancedCache and am looking forward for this to be fixed

                   

                  Also a word over the configuration changes on Infinispan. I would be glad if those are documented as wiki shows the deprecated methods usage.

                  Mainly I cannot figure out how to use the '.fluent()' way of configuration in a new way.

                   

                  Brg,

                  A