3 Replies Latest reply on Jan 31, 2012 4:33 AM by galder.zamarreno

    CDI exception when upgrade to 5.1.0.FINAL

    hantsy

      When I upgraded my applciation to 5.1.0.Final, and repalced the Configuration to the new Config api. I tried to deploy to JBoss 7.0.2 and got the following exception.

       

       

      Caused by: org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001435 Normal scoped bean class org.infinispan.configuration.cache.Configuration is not proxyable because it has no no-args constructor.
          at org.jboss.weld.util.Proxies.getUnproxyableClassException(Proxies.java:216)
          at org.jboss.weld.util.Proxies.getUnproxyableTypeException(Proxies.java:160)
          at org.jboss.weld.util.Proxies.getUnproxyableTypesException(Proxies.java:192)
          at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:111)
          at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:129)
          at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:351)
          at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:336)
          at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:404)
          at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
          at org.jboss.as.weld.services.WeldService.start(WeldService.java:89)
          ... 5 more
      

       

       

      The Config producers codes:

        @ConfigureCache("signup-denied-cache")
          @DeniedCache
          @Produces
          @ApplicationScoped
          public Configuration deniedCacheConfiguration() {
         return new ConfigurationBuilder()
                      .eviction()
                          .strategy(EvictionStrategy.FIFO)
                          .maxEntries(10)
                      .expiration()
                          .lifespan(24L * 60 * 60 * 1000)
                      .loaders()
                          .shared(false)
                          .preload(true)
                          .passivation(false)
                      .addFileCacheStore()
                           .location("signup-denied-cache")
                           .fetchPersistentState(true)
                           .purgeOnStartup(false)
                           .ignoreModifications(false)
                      .build();
          }
      }
      

       

      There are serveral caches I declared in my application.

       

       

      @Inject
      @DeniedCache
      private Cache<String, SignupRequest> deniedCache;

       

       

      Any help here? Thanks.