Interceptors in seperated jar not working in EAP 6.x
Issue
When trying to call a custom interceptor (packaged in a jar file) from the lib folder in EAR, the following errors occured :
10:24:37,338 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."myapp.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."myapp.ear".WeldStartService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001417 Enabled interceptor class <class>com.xxx.jar.chronolog.SimpleInterceptor</class> in vfs:/C:/tools/jboss-eap-6.2.3/bin/content/myapp.ear/superEJB-0.0.1-SNAPSHOT.jar/META-INF/beans.xml@6 is neither annotated @Interceptor nor registered through a portable extension
When packaged everything in a single WAR, it works.
Not working EAR structure :
EAR/lib/myInterceptor.jar
Working EAR structure :
EAR/WAR/WEB-INF/myInterceptor.jar
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
