Bug 832387

Summary: Seam2.3 examples richfaces dependency pulls jsf-api compile dependency, causing "mojarra not defined" JS errors.
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Marek Schmidt <maschmid>
Component: Examples, SeamAssignee: Marek Novotny <mnovotny>
Status: CLOSED DEFERRED QA Contact: Marek Schmidt <maschmid>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.0.0.ER8CC: bsutter, rruss
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Seam2.3
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-19 08:18:17 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:
Embargoed:

Description Marek Schmidt 2012-06-15 09:53:55 UTC
Description of problem:

Sometimes a wrong jsf.js is served in the Seam2.3 richfaces examples (reproducible at least in booking and nestedbooking examples), which causes commandLinks not working with "mojarra not defined" javascript errors. The problem seems to be that both the jsf API (org.jboss.spec.javax.faces:jboss-jsf-api_2.1_spec:jar:2.0.2.Final-redhat-1) and the mojarra impl artifacts contains javax.faces/jsf.js, but the version in jsf api doesn't work. The behavior of which resource is served when the API artifact is contained in the .war seems to be platform-dependent.

Steps to reproduce:

1. build and deploy Seam2.3 nestedbooking example
2. attempt to book a room
3. Notice the "select" link on Room Preference page doesn't work.

also notice the /seam-nestedbooking/javax.faces.resource/jsf.js.seam?ln=javax.faces  returns the jsf.js version from jsf API.

The solution seems to be to include

        <dependency>
            <groupId>org.jboss.spec.javax.faces</groupId>
            <artifactId>jboss-jsf-api_2.1_spec</artifactId>
            <scope>provided</scope>
        </dependency>

in foo-web/pom.xml in the richfaces examples to override the default compile scope.

Comment 1 Marek Novotny 2012-06-15 10:21:38 UTC
This is known issue in productized redhat version of jsf-impl artifact.
https://issues.jboss.org/browse/JBEE-114

This issue affects Richfaces component build and we have to worked around it in https://bugzilla.redhat.com/show_bug.cgi?id=820579