]
Mircea Markus resolved ISPN-3473.
---------------------------------
Resolution: Duplicate Issue
closing this for now as we expect this to be fixed indirectly through ISPN-3316 (please
re-open if the case).
CDI Cache interceptor tests are failing while running in Tomcat
container
-------------------------------------------------------------------------
Key: ISPN-3473
URL:
https://issues.jboss.org/browse/ISPN-3473
Project: Infinispan
Issue Type: Bug
Components: CDI integration
Affects Versions: 6.0.0.Alpha3
Reporter: Anna Manukyan
Assignee: Galder ZamarreƱo
Labels: 620
There is a problem with Infinispan CDI interceptors under the Tomcat container.
While running the infinispan/cdi-extension module's tests under the tomcat container,
the following 2 related issues appear:
1) When the beans.xml contains the definition for the interceptors, as given below:
{code}
<beans
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
<interceptors>
<class>org.infinispan.jcache.annotation.CacheResultInterceptor</class>
<class>org.infinispan.jcache.annotation.CachePutInterceptor</class>
<class>org.infinispan.jcache.annotation.CacheRemoveEntryInterceptor</class>
<class>org.infinispan.jcache.annotation.CacheRemoveAllInterceptor</class>
</interceptors>
<alternatives>
<class>org.infinispan.cdi.InjectedCacheResolver</class>
</alternatives>
</beans>
{code}
Then while the deployment on the container, the following exception is thrown:
{code}
org.jboss.weld.exceptions.DeploymentException: WELD-001416 Enabled interceptor class
[<class>org.infinispan.jcache.annotation.CacheResultInterceptor</class> in
jar:file:/home/anna.manukyan/.jenkins/jobs/invm-tomcat/workspace/tomcat-server/jboss-ews-2.0/tomcat7/webapps/test/WEB-INF/lib/infinispan-jcache.jar!/META-INF/beans.xml@7,
<class>org.infinispan.jcache.annotation.CachePutInterceptor</class> in
jar:file:/home/anna.manukyan/.jenkins/jobs/invm-tomcat/workspace/tomcat-server/jboss-ews-2.0/tomcat7/webapps/test/WEB-INF/lib/infinispan-jcache.jar!/META-INF/beans.xml@8,
<class>org.infinispan.jcache.annotation.CacheRemoveEntryInterceptor</class> in
jar:file:/home/anna.manukyan/.jenkins/jobs/invm-tomcat/workspace/tomcat-server/jboss-ews-2.0/tomcat7/webapps/test/WEB-INF/lib/infinispan-jcache.jar!/META-INF/beans.xml@9,
<class>org.infinispan.jcache.annotation.CacheRemoveAllInterceptor</class> in
jar:file:/home/anna.manukyan/.jenkins/jobs/invm-tomcat/workspace/tomcat-server/jboss-ews-2.0/tomcat7/webapps/test/WEB-INF/lib/infinispan-jcache.jar!/META-INF/beans.xml@10,
<class>org.infinispan.jcache.annotation.CacheResultInterceptor</class> in
jndi:/localhost/test/WEB-INF/beans.xml@29,
<class>org.infinispan.jcache.annotation.CachePutInterceptor</class> in
jndi:/localhost/test/WEB-INF/beans.xml@30,
<class>org.infinispan.jcache.annotation.CacheRemoveEntryInterceptor</class> in
jndi:/localhost/test/WEB-INF/beans.xml@31,
<class>org.infinispan.jcache.annotation.CacheRemoveAllInterceptor</class> in
jndi:/localhost/test/WEB-INF/beans.xml@32] specified twice
at org.jboss.weld.manager.Enabled.createMetadataMap(Enabled.java:123)
at org.jboss.weld.manager.Enabled.<init>(Enabled.java:96)
at org.jboss.weld.manager.Enabled.of(Enabled.java:79)
at org.jboss.weld.bootstrap.BeanDeployment.<init>(BeanDeployment.java:114)
at
org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:183)
at
org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:152)
at org.jboss.weld.bootstrap.WeldBootstrap.startContainer(WeldBootstrap.java:283)
at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:151)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:537)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1468)
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1444)
at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:677)
at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:435)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
{code}
If there is no need declare the interceptors in the beans.xml (as far as I know it is
necessary), then please let me know and ignore this case.
2) When the interceptors declaration is commented, then the interceptors doesn't work
properly. So all tests located under the package org.infinispan.cdi.test.interceptor.* are
failing with assertion errors.
Please note that this behaviour is noticed for infinispan 6.0.0.Alpha3. It is not tried
for the earlier versions.
--
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: