0
votes

I am getting the exception:

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)].

Does anyone have some tip? I have already confirmed that beans.xml is in src\main\webapp\WEB-INF and I am not publishing more than one jar. It's only one project.

@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); 
}

POM snippet:

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

<dependencies>
    ...
    <artifactId>infinispan-core</artifactId>
    ...
</dependencies>
1
Post code. The exception is very straightforward, it can't find what you are trying to inject.Karl Kildén
Karl Kildén, thanks for your reply.Demetrio
There is a warning "No bean is eligible for injection to the injection point [JSR-299 §5.2.1]" in the line bellow: [code] @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); }Demetrio
In pom I have <dependencyManagement> ... <artifactId>jboss-javaee-6.0-with-infinispan</artifactId> and in <dependencies> <artifactId>infinispan-core</artifactId>. P.S. Sorry for the format: I didn't find how to post code source in better format.Demetrio

1 Answers

2
votes

My guess is this is an Infinispan class and you don't have Infinispan on the classpath.