WELD-001408类型[EmbeddedCacheManager]与限定符[@Default]的不满意依赖关系

时间:2013-04-08 20:50:32

标签: dependency-injection persistence jboss7.x cdi

我得到了例外:

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

有没有人有提示?我已经确认beans.xml位于src \ main \ webapp \ WEB-INF中,我不会发布多个jar。这只是一个项目。

@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片段:

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

<dependencies>
    ...
    <artifactId>infinispan-core</artifactId>
    ...
</dependencies>

1 个答案:

答案 0 :(得分:2)

我的猜测是这是一个Infinispan类,你没有在类路径上使用Infinispan。