Bug 1290277 - [GSS](6.4.z) Interceptors in seperated jar not working
[GSS](6.4.z) Interceptors in seperated jar not working
Status: CLOSED NOTABUG
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CDI/Weld (Show other bugs)
6.2.3
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Dmitrii Tikhomirov
Matej Novotny
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-09 21:02 EST by xuzhan
Modified: 2016-07-13 15:57 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-13 15:55:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Sample project (157.19 KB, application/zip)
2015-12-09 21:02 EST, xuzhan
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBEAP-2350 Major Closed Interceptors in seperated jar not working 2017-05-12 02:53 EDT
Red Hat Knowledge Base (Solution) 2100591 None None None 2016-07-13 15:57 EDT

  None (edit)
Description xuzhan 2015-12-09 21:02:45 EST
Created attachment 1104202 [details]
Sample project

Description of problem:
If a customized interceptor packaged in a jar file placed in EAR\lib as below:
~~~
- EAR
  - lib/
    - myInterceptor.jar
  - myEJB.jar
    - META-INF/beans.xml
	- com/my/...
  - WAR
~~~

The deployment will fail with below error:
~~~
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.ych.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
~~~

If package everything in a single WAR, it works fine.
~~~
- EAR
  - WAR
    - WEB-INF/
      - myInterceptor.jar
      - myEJB.jar
        - META-INF/beans.xml
	    - com/my/...
~~~


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. deploy attached myapp.ear to EAP 6.2.3.
2. observe log message.

Actual results:
~~~
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.ych.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
~~~

Expected results:
Deployed successfully.

Additional info:
Please let us know if it is a bug or wrong usage.
Comment 8 JBoss JIRA Server 2016-01-05 08:46:33 EST
Rostislav Svoboda <rsvoboda@redhat.com> updated the status of jira JBEAP-2350 to Closed
Comment 9 Mike McCune 2016-03-28 18:32:18 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 10 Brad Maxwell 2016-07-13 15:55:38 EDT
Closing as the test app needs an additional beans.xml and then it will work:

CDI 1.0 requires a beans.xml, the test app has this structure:

- EAR
  - lib/
    - myInterceptor.jar
  - myEJB.jar
    - META-INF/beans.xml
	- com/my/...
  - WAR
     - WEB-INF/beans.xml

Add a beans.xml to the myInterceptor.jar/META-INF and then the app will deploy:

- EAR
  - lib/
    - myInterceptor.jar
      - META-INF/beans.xml
  - myEJB.jar
    - META-INF/beans.xml
	- com/my/...
  - WAR
     - WEB-INF/beans.xml

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