Issue Details (XML | Word | Printable)

Key: GLASSFISH-15009
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: jjsnyder83
Reporter: rogerk
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
glassfish

Weld JSF Permalink Example : Failure

Created: 06/Dec/10 12:00 PM   Updated: 21/Mar/13 01:01 PM   Resolved: 21/Mar/13 01:01 PM
Component/s: cdi
Affects Version/s: None
Fix Version/s: 4.0

Time Tracking:
Not Specified

Status Whiteboard:

weld-int-required

Tags:
Participants: jjsnyder83, mojavelinux, rogerk, Sivakumar Thyagarajan, tlcksnyder and Tom Mueller


 Description  « Hide

See: http://java.net/jira/browse/GLASSFISH-13182

The application has beans.xml here:
WEB-INF/classes/META-INF/beans.xml

However, the GlassFish Weld Integration module expects beans.xml to be under WEB-INF:
WEB-NF/beans.xml

I haven't checked the Weld specification in a while, so if WEB-INF/classes/META-INF/beans.xml is a valid location,
then the GlassFish Weld Integration module will have to be modified to accommodate this location.
The workaround for now would be to just put beans.xml under WEB-INF directly:
WEB-NF/beans.xml
[ Show » ]
rogerk added a comment - 06/Dec/10 11:49 AM Ok - the problem is as follows... The application has beans.xml here: WEB-INF/classes/META-INF/beans.xml However, the GlassFish Weld Integration module expects beans.xml to be under WEB-INF: WEB-NF/beans.xml I haven't checked the Weld specification in a while, so if WEB-INF/classes/META-INF/beans.xml is a valid location, then the GlassFish Weld Integration module will have to be modified to accommodate this location. The workaround for now would be to just put beans.xml under WEB-INF directly: WEB-NF/beans.xml



tlcksnyder added a comment - 21/Mar/13 01:01 PM

Issue fixed as of weld-1.1.10.Final. Successfully tested with 1.1.10 final in GF 3.1.2, and Weld 2.0.0Beta6 in GF 4.


Sivakumar Thyagarajan added a comment - 10/Dec/12 05:27 AM

Transferring to JJ Snyder


Tom Mueller added a comment - 06/Mar/12 09:55 PM

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.


mojavelinux added a comment - 26/Jan/11 10:59 AM

I have submitted a patch to the Weld issue.

Your understanding of the location for beans.xml is correct. The example was in error.

Despite the correction, its still necessary to put a second beans.xml on the classpath (src/main/resources/META-INF) when deploying with the embedded Jetty Maven plugin because of how it arranges the deployment.


Sivakumar Thyagarajan added a comment - 17/Dec/10 04:07 AM

Marking this issue as minor as the fix is needed in a weld sample and it is easy to make this change by the developer.


Sivakumar Thyagarajan added a comment - 07/Dec/10 04:32 AM

Marking this as Weld-int-required as we have raised https://jira.jboss.org/browse/WELD-780 to get this fixed in Weld jsf/permalink examples.


Sivakumar Thyagarajan added a comment - 07/Dec/10 04:31 AM

As per Section 12.1 of CDI 1.0 specification:
> • The WEB-INF/classes directory of a war is a bean archive if there is a file named beans.xml in the WEB-INF directory of the war.
> • A directory in the JVM classpath is a bean archive if it has a file named beans.xml in the META-INF directory.

So, this is an non-portable usage scenario. I have raised https://jira.jboss.org/browse/WELD-780 to get this fixed in Weld jsf/permalink examples. I have also raised a RFE in GlassFish to support this scenario http://java.net/jira/browse/GLASSFISH-15018


Sivakumar Thyagarajan added a comment - 07/Dec/10 01:07 AM

As per Section 12.1 of CDI 1.0 specification:
> • The WEB-INF/classes directory of a war is a bean archive if there is a file named beans.xml in the WEB-INF directory of the war.
> • A directory in the JVM classpath is a bean archive if it has a file named beans.xml in the META-INF directory.

So, the usage of WEB-INF/classes/META-INF/beans.xml doesn't sound right. Making this fix, solves the issue
move the file (in weld-core): from
examples/jsf/permalink/src/main/resources/META-INF/beans.xml
to
examples/jsf/permalink/src/main/webapp/WEB-INF/beans.xml

I am clarifying if this scenario is valid and will close the bug after I undestand if this is a portable usage scenario.