Bug 988899 - CDI @Named bean in a static module not found from a JSF page
CDI @Named bean in a static module not found from a JSF page
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CDI/Weld (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ER6
: EAP 6.2.0
Assigned To: Stuart Douglas
Marek Schmidt
Depends On:
  Show dependency treegraph
Reported: 2013-07-26 12:04 EDT by Marek Schmidt
Modified: 2013-12-15 11:55 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-15 11:55:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
reproducer module and test.war (20.00 KB, application/x-tar)
2013-07-26 12:04 EDT, Marek Schmidt
no flags Details

  None (edit)
Description Marek Schmidt 2013-07-26 12:04:21 EDT
Created attachment 778823 [details]
reproducer module and test.war

Description of problem:

Having a static module org.jboss.test.namedModule with

public class Greeter {
	public String getGreeting() {
		return "Hello, world!";

and a test.war depending on the module

Dependencies: org.jboss.test.namedModule meta-inf

with a home.xhtml page:

	<h1>Greeting: #{greeter.greeting}</h1>


doesn't show the "Hello, world!" greeting and the "greeter" is null.

Version-Release number of selected component (if applicable):
EAP 6.1.0, EAP 6.1.1.ER3

How reproducible:

Steps to Reproduce:

See the attached module to put into modules and deployment into standalone/deployments, or run a test from an experimental internal git:

git clone git://git.engineering.redhat.com/users/maschmid/weld-module-tests.git
cd weld-module-tests

unzip jboss-eap-6.1.1.ER3.zip 
export JBOSS_HOME=jboss-eap-6.1/

mvn clean verify -Darquillian=jbossas-managed-7 -Dtest=NamedModuleTest

Additional info:

The test passes on WildFly 8.0.0.Alpha3.
Comment 1 Stuart Douglas 2013-10-01 07:39:02 EDT
Root cause is that CDI won't activate if there in only 1 beans.xml in the app in WEB-INF/beans.xml and WEB-INF/classes does not exist. 

Pull request:

Comment 6 Marek Schmidt 2013-10-17 09:03:46 EDT
Verified on EAP 6.2.0.ER6

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