Bug 1039091

Summary: Add beans.xml to JSF2+RF4 Hello World Portlet to avoid warnings during its deployment
Product: [JBoss] JBoss Enterprise Portal Platform 6 Reporter: Peter Palaga <ppalaga>
Component: QuickstartsAssignee: Peter Palaga <ppalaga>
Status: CLOSED CANTFIX QA Contact: Dominik Pospisil <dpospisi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.1CC: kfinniga, tkyjovsk
Target Milestone: ER01   
Target Release: 6.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-24 13:50:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
jsf2-rf4-hello-world-portlet deployment log none

Description Peter Palaga 2013-12-06 15:10:52 UTC
Description of problem:
Add beans.xml to JSF2+RF4 Hello World Portlet to avoid warnings during its deployment

Version-Release number of selected component (if applicable):
JBoss Portal 6.1.1.DR1

How reproducible:
Always

Steps to Reproduce:
1. Deploy JSF2+RF4 Hello World Portlet to JBoss Portal 6.1.1.DR1

Actual results:
There is a warning in the log saying something about using annotations but not having beans.xml

Expected results:
No warning

Comment 2 Peter Palaga 2013-12-06 15:17:08 UTC
The exact warning text is as follows:

[org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016012: Deployment deployment "jsf2-rf4-hello-world-portlet.war" contains CDI annotations but beans.xml was not found.

Comment 3 Peter Palaga 2013-12-13 17:33:51 UTC
The patch was reverted because it breaks the portlet's "reload" functionality.
So, the verification steps for the ER1 test cycle are as follows:
(1) Deploy the quickstart
(2) Expected in log: "jsf2-rf4-hello-world-portlet.war" contains CDI annotations
(3) Add the portlet to a page
(4) Pressing the "reload" button in the portlet must not cause any errors in the log.

Comment 4 Tomas Kyjovsky 2014-02-20 13:48:35 UTC
I can still see the warning when deploying the jsf2-fr4-hello-world portlet to 6.1.1.CR1.

14:42:26,176 WARN  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016012: Deployment deployment "jsf2-rf4-hello-world-portlet.war" contains CDI annotations but beans.xml was not found.


I can see beans.xml in other qs projects but none in jsf2-rf4:

jboss-jpp-6.1.1-quickstarts$ find . -name beans.xml
./cdi-scopes-portlet/src/main/webapp/WEB-INF/beans.xml
./cdi-jsf-portlet/src/main/webapp/WEB-INF/beans.xml
./social-portlets/src/main/webapp/WEB-INF/beans.xml
./cdi-generic-portlet/src/main/webapp/WEB-INF/beans.xml

Comment 5 Tomas Kyjovsky 2014-02-20 13:49:12 UTC
Created attachment 865528 [details]
jsf2-rf4-hello-world-portlet deployment log

Comment 6 Peter Palaga 2014-04-24 07:52:03 UTC
Ken, is there anything easy to apply without side effects (broken reloads) to eliminate the warning?

Comment 7 Ken Finnigan 2014-04-24 13:26:19 UTC
(In reply to Peter Palaga from comment #6)
> Ken, is there anything easy to apply without side effects (broken reloads)
> to eliminate the warning?

No there isn't, with good reason.

This warning is CDI/Weld informing us that there are annotations on classes in the WAR that is being started, but its not being started as a CDI WAR.

This is to be expected. There are annotations on classes that relate to JSF, but CDI/Weld doesn't go to that level of investigation.

Adding beans.xml turns it into a CDI WAR, which adds a whole lot of issues if its not meant to use CDI.

This warning needs to remain, and there is no way I know, other than maybe tweaking logging levels, of removing it.