0 Replies Latest reply on Apr 9, 2013 11:01 AM by Deme Carva

    Problems while injecting EmbeddedCacheManager. Unsatisfied dependencies.

    Deme Carva Newbie

      I have been followed the TicketMonster tutorial and now I am getting this error when I try to publish:

      WELD-001408 Unsatisfied dependencies for type [EmbeddedCacheManager] with qualifiers [@Default] at injection point [[parameter 1] of [constructor] @Inject public org.jboss.jdf.example.ticketmonster.service.SeatAllocationService(EmbeddedCacheManager)]

       

      In the SeatAllocationService.java there is a warning "No bean is eligible for injection to the injection point [JSR-299 §5.2.1]" in the line bellow:

      @Inject

      public SeatAllocationService(EmbeddedCacheManager manager) {

      Configuration allocation = new ConfigurationBuilder()

      .transaction().transactionMode(TransactionMode.TRANSACTIONAL)

      .transactionManagerLookup(new JBossTransactionManagerLookup())

      .lockingMode(LockingMode.PESSIMISTIC)

      .loaders().addFileCacheStore().purgeOnStartup(true)

      .build();

      manager.defineConfiguration(ALLOCATIONS, allocation);

      this.cache = manager.getCache(ALLOCATIONS);

      }

       

      In pom I have:

                <dependencyManagement>

                ...

                  <dependency>

                      <groupId>org.jboss.bom</groupId>

                      <artifactId>jboss-javaee-6.0-with-infinispan</artifactId>

                      <version>${jboss.bom.version}</version>

                      <type>pom</type>

                      <scope>import</scope>

                  </dependency>

              </dependencies>

          </dependencyManagement>

      ...

      <dependencies>

              <dependency>

                  <groupId>org.infinispan</groupId>

                  <artifactId>infinispan-core</artifactId>

              </dependency>

          </dependencies>

       

      Some tips about this error will help a lot.