Bug 1119780 - CDI annotations
Summary: CDI annotations
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: CR1
: 6.3.1
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL: https://c.na7.visual.force.com/apex/C...
: 1122025 (view as bug list)
Depends On:
Blocks: 1119746 1121682 1122025
TreeView+ depends on / blocked
Reported: 2014-07-15 13:39 UTC by Shaun Appleton
Modified: 2019-05-20 11:13 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously in Red Hat JBoss Data Grid, certain user code failed to compile because some Infinispan CDI classes had been refactored to different packages located in other modules. In JBoss Data Grid 6.3.1, the Infinispan CDI classes have been moved back to the original package and module. As a result, the user code no longer fails to compile because the CDI classes are not available where expected.
Clone Of:
: 1121682 1122025 (view as bug list)
Last Closed: 2015-01-26 14:06:16 UTC
Type: Bug

Attachments (Terms of Use)
Preliminary patch (127.75 KB, text/plain)
2014-07-17 15:22 UTC, Galder Zamarreño
no flags Details

Description Shaun Appleton 2014-07-15 13:39:29 UTC
Description of issue:

org.infinispan.jcache.annotation.CacheResultInterceptor cannot be found in jdg 6.2.1 or jdg 6.3.0

in the docs 


was replaced by 


but jcache is not supported - see https://bugzilla.redhat.com/show_bug.cgi?id=1101282

Customers are using and relying on this in jdg 6.1 and want to migrate to jdg 6.2.1 and/or jdg 6.3.0 but now can't.

Comment 4 Galder Zamarreño 2014-07-16 17:30:13 UTC
I've pushed a preliminary fix to https://github.com/infinispan/jdg/tree/1119780 @Shaun, can you verify that their CDI applications work fine with those changes?

Comment 5 Shaun Appleton 2014-07-17 08:32:10 UTC
Galder, I can't see https://github.com/infinispan/jdg - I get a 404 - is it private?

Comment 6 Galder Zamarreño 2014-07-17 15:20:15 UTC
@Shaun, yes it's private, but shouldn't you have access to? Maybe @Wolf can help? In the mean time, I'm attaching a patch that you can apply to 6.3.x branch. Let me know if you have any issues :)

Comment 7 Galder Zamarreño 2014-07-17 15:22:58 UTC
Created attachment 918772 [details]
Preliminary patch

Comment 9 wfink 2014-07-23 14:10:49 UTC
*** Bug 1122025 has been marked as a duplicate of this bug. ***

Comment 10 Galder Zamarreño 2014-08-15 07:05:44 UTC
Pull requests sent:
https://github.com/infinispan/jdg/pull/186 <- for jdg-6.3.x
https://github.com/infinispan/jdg/pull/187 <- for jdg-6.4.x

Comment 11 Vojtech Juranek 2014-08-22 09:21:32 UTC
fails with

23:36:06,993 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."test.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.war".WeldStartService: Failed to start service
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1936) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-000069 An interceptor must have at least one binding, but org.infinispan.cdi.interceptor.CachePutInterceptor has none
        at org.jboss.weld.bean.InterceptorImpl.<init>(InterceptorImpl.java:72)
        at org.jboss.weld.bean.InterceptorImpl.of(InterceptorImpl.java:59)
        at org.jboss.weld.bootstrap.AbstractBeanDeployer.createInterceptor(AbstractBeanDeployer.java:229)
        at org.jboss.weld.bootstrap.BeanDeployer.createBeans(BeanDeployer.java:151)
        at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:204)
        at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:349)
        at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:63)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
        ... 3 more

It fails because interceptor bindings are not registered (https://github.com/infinispan/infinispan/blob/master/jcache/src/main/java/org/infinispan/jcache/annotation/AnnotationInjectExtension.java is missing in JDG)

Note You need to log in before you can comment on or make changes to this bug.