3 Replies Latest reply on May 27, 2010 7:57 AM by joff

    CacheProvider null when injected

    troy.sellers

      Hi All,


      I am trying to include the jboss pojo cache into my Seam project and am having some trouble getting this to work.


      I inject the cache into a Conversation scoped object


      @In
      private CacheProvider<PojoCache> cacheProvider;


      which is confgured in the components.xml as


      <cache:jboss-pojo-cache-provider />


      I have placed the jbosscache-core-3.0.jar and jbosscache-pojo-3.0.jar on the classpath.


      When the component that is looking for the cacheProvider is instantiated it throws the following error


      org.jboss.seam.RequiredException: @In attribute requires non-null value: menu.cacheProvider


      Can anyone point me to some docs that explain how to set this up properly?


      JBoss 4.3 EAP
      Seam 2.1.0.SP1
      Java 1.5


      Cheers,
      Troy

        • 1. Re: CacheProvider null when injected
          zaferteker

           
          The same problem occurred to me.  I could not find solution


          Did you solve?


          Configurition : Seam 2.2 , JBoss 5.1



          javax.el.ELException: org.jboss.seam.RequiredException: @In attribute requires non-null value: authenticator.cacheProvider

          • 2. Re: CacheProvider null when injected
            sandman202

            I too am having the same issue when I use EhCache. Does anyone have a solution?

            • 3. Re: CacheProvider null when injected
              joff

              Add to your components.xml:


              <components xmlns="http://jboss.com/products/seam/components"
              ...
                          xmlns:cache="http://jboss.com/products/seam/cache"
                          xsi:schemaLocation=
                                  "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
                             http://jboss.com/products/seam/cache http://www.jboss.com/products/seam/cache-2.1.xsd">
              
              ...
                 <cache:eh-cache-provider/>
              ...
              </components>