Issue Type: Bug Bug
Affects Versions: 2.0.3.Final, 1.1.3.Final
Assignee: Jozef Hartinger
Components: Proxies
Created: 04/Sep/13 11:11 AM
Description:

Using Infinispan Cache via CDI cause ClassCastException

Setup

@Produces @ApplicationScoped
public EmbeddedCacheManager create() {
	return new DefaultCacheManager(...);
}

@Produces @ApplicationScoped
public Cache<String, Attachment> create(EmbeddedCacheManager manager) {
	return manager.getCache();
}
@Inject
private Cache<String, Attachment> cache;

public Attachment store(Attachment entity) {
    cache.getAdvancedCache().put(entity.getId(), entity);
    return entity;
}

cache.getAdvancedCache() cause ClassCastException

Caused by: java.lang.ClassCastException: org.jboss.weld.proxies.BasicCache$Cache$ConcurrentMap$Lifecycle$Listenable$Map$449205494$Proxy$_$$_WeldClientProxy cannot be cast to org.infinispan.AdvancedCache
at org.jboss.weld.proxies.BasicCache$Cache$ConcurrentMap$Lifecycle$Listenable$Map$449205494$Proxy$_$$_WeldClientProxy.getAdvancedCache(BasicCache$Cache$ConcurrentMap$Lifecycle$Listenable$Map$449205494$Proxy$_$$_WeldClientProxy.java) [weld-core-1.1.13.Final-redhat-1.jar:]
at org.cedj.geekseek.domain.attachment.AttachmentRepository.store(AttachmentRepository.java:32) [df4da6a4-e82c-403c-9815-03a170096317.jar:]
Project: Weld
Priority: Major Major
Reporter: Aslak Knutsen
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
weld-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-issues

Reply via email to