Description of problem: Workaround in https://issues.jboss.org/browse/RF-11739, used in Sportsclub is no longer valid. Uncaught ReferenceError: jQuery is not defined 2:8080/sportsclub/reservations/:29Uncaught TypeError: Cannot read property 'MenuItem' of undefined chrome-extension://dfdmbpdbpocelpgahddghhkomnefchkl/fittowidth.js:31Uncaught TypeError: Cannot read property 'parentNode' of undefined <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jstl/core"><head> <title>Sports Club Reservations Spring Application Demo</title> <link href="images/favicon.png" rel="Shortcut Icon" /> <link class="component" href="css/basic_classes.css" rel="stylesheet" type="text/css" /> <link class="component" href="css/extended_classes.css" media="rich-extended-skinning" rel="stylesheet" type="text/css" /> <link class="component" href="css/panel.css" rel="stylesheet" type="text/css" /> <link class="component" href="css/toolBar.css" rel="stylesheet" type="text/css" /> <link class="component" href="css/datascroller.css" rel="stylesheet" type="text/css" /> <link class="component" href="css/dragindicator.css" rel="stylesheet" type="text/css" /> <link class="component" href="css/extendedDataTable.css" rel="stylesheet" type="text/css" /> <link class="component" href="css/inplaceinput.css" rel="stylesheet" type="text/css" /> <link class="component" href="css/inplaceselect.css" rel="stylesheet" type="text/css" /> <link class="component" href="css/menucomponents.css" rel="stylesheet" type="text/css" /> <link class="component" href="css/custom.css" rel="stylesheet" type="text/css" /><link type="text/css" rel="stylesheet" href="/sportsclub/reservations/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.2.0.Final-redhat-1/PackedCompressed/DEFAULT/skinning.css" /><script type="text/javascript" src="/sportsclub/reservations/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.2.0.Final-redhat-1/PackedCompressed/packed/packed.js"></script><script type="text/javascript" src="/sportsclub/reservations/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.2.0.Final-redhat-1/PackedCompressed/jquery.js"></script><link type="text/css" rel="stylesheet" href="/sportsclub/reservations/org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.2.0.Final-redhat-1/PackedCompressed/DEFAULT/packed/packed.css" /></head><body class="main-body"> <!-- Work around https://issues.jboss.org/browse/RF-11739 --><span id="j_idt7" style="display: none;"><script type="text/javascript">_nothing=function(){RichFaces.ajax("j_idt7",null,{"incId":"1"} )};</script></span> <div id="container"> <div id="snowdropheader"> <h1><a href="http://www.jboss.org/snowdrop.html">Snowdrop</a></h1> </div> <div id="contentcontainer"> <div id="container_grey"> <div id="main-contentwrapper"> Version-Release number of selected component (if applicable): RichFaces 4.2.0.Final-redhat-1 How reproducible: Always Steps to Reproduce: 1. Deploy Sportsclub EAR 2. Try to click on anything Actual results: Buttons are not clickable. Expected results: It works. Additional info: This was working in WFK 2.0.0.ER1 with EAP 2.0.0.ER1. As WFK 2.0.0.ER1 contained 4.2.0.Final-redhat-1, it means that something must have been broken in MEAD build.
Possible reason why that happens: While comparing ER1 and ER2 releases: /tmp/richfaces-components-ui-4.2.0.Final-redhat-1.jar.diffjars.Dfb/META-INF/richfaces/staticResourceMapping/Packed.properties contains line 117 javax.faces\:jsf.js=org.richfaces.staticResource/4.2.0.Final-redhat-1/Packed/packed/packed.js which load packed.js before jquery.js. Kudos to Lukas Fryc for discovering this issue.
Likely caused by wrong classpath ordering in file https://github.com/richfaces/components/blob/develop/dist/static-resources/pom.xml
The classpath ordering is influenced by scope of artifacts. This concrete issue happened because /home/kpiwko/installations/wfk/2.0.0.ER2/jboss-wfk-2.0.0.ER2-maven-repository/org/richfaces/richfaces-root-parent/4.2.0.Final-redhat-1/richfaces-root-parent-4.2.0.Final-redhat-1.pom <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-impl</artifactId> <!-- <scope>test</scope> --> </dependency> line 846 was switched from test to compile scope.
I have found where the origin intention for changing the scope was. Showcase hides jboss profile for variable dependency-scope for jsf-impl.
After rebuild, the line with: javax.faces\:jsf.js disappeared, so I consider that as fixed.
Referenced built jar in MEAD is here http://download.devel.redhat.com/brewroot/work/tasks/9529/4139529/org/richfaces/ui/richfaces-components-ui/4.2.0.Final-redhat-1/richfaces-components-ui-4.2.0.Final-redhat-1.jar
Verified fix in WFK 2.0.0.ER3.
Verified in WFK 2.0.0.ER3 (a.k.a. 2.0.0.Beta1).
Michal Petrov <mpetrov> updated the status of jira RF-11739 to Resolved