Hide Forgot
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
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.
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.
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
Created attachment 865528 [details] jsf2-rf4-hello-world-portlet deployment log
Ken, is there anything easy to apply without side effects (broken reloads) to eliminate the warning?
(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.