Bug 1039007 - HTTP 404 for RF background images in JSF2+RF4 Hello World Portlet
Summary: HTTP 404 for RF background images in JSF2+RF4 Hello World Portlet
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Quickstarts
Version: 6.1.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER01
: 6.1.1
Assignee: Peter Palaga
QA Contact: Tomas Kyjovsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-06 10:45 UTC by Peter Palaga
Modified: 2021-10-23 04:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The portletbridge-extension-richfaces-*.jar was missing in the RichFaces quickstart's WAR file, despite the artifact being listed in dependencies. This caused the background images used in RichFaces components to be inaccessible. The Fix removes the provided scope from portletbridge-extension-richfaces in the portal Bill of Materials (BOM). The background images used in RichFaces components are now shown as expected.
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Peter Palaga 2013-12-06 10:45:22 UTC
Description of problem:
There is a couple of messages visible in Chrome Console when visiting a page with  JSF2+RF4 Hello World Portlet:

http://127.0.0.1:8180/portal/org.richfaces.images/inputBackgroundImage.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:8180/portal/org.richfaces.images/autocompleteButtonGradient.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:8180/portal/org.richfaces.images/comboDownButton.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:8180/portal/classic/org.richfaces.images/inputBackgroundImage.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:8180/portal/classic/org.richfaces.images/buttonBackgroundImage.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:8180/org.richfaces.images/combo_list_shadow.png

Version-Release number of selected component (if applicable):
JBoss Portal 6.1.1.DR1 and JSF2+RF4 Hello World Portlet distributed with JBoss Portal 6.1.1.DR1

How reproducible:
Always

Steps to Reproduce:
1. Get the Portal and quickstarts from 
http://torii.gva.redhat.com/gatein-prod/jboss-portal-6.1.1.DR1-prod.zip
http://torii.gva.redhat.com/gatein-prod/jboss-portal-6.1.1.DR1-quickstarts.zip 

2. Build and deploy the quickstart

3. Add the quickstart portlet to a page, visit the page.

Actual results:
The background images used in RF components are not accessible.

Expected results:
The background images used in RF components should be displayed.

Comment 1 Peter Palaga 2013-12-06 10:49:12 UTC
The same quickstart behaves the same on JPP 6.1.

Comment 3 Ken Finnigan 2013-12-06 18:21:46 UTC
Resolved by PBR 3.3.1.Final

Comment 4 Ken Finnigan 2013-12-10 17:22:43 UTC
Can't reproduce on PBR 3.3.1.Final

Comment 5 Filip Kiss 2013-12-12 08:46:10 UTC
Tested on JPP DR02 + DR02 QS. Chrome console output:

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/portal/g/:platform:administrators/administration/registry/org.richfaces.images/buttonBackgroundImage.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/portal/g/:platform:administrators/administration/org.richfaces.images/inputBackgroundImage.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/portal/g/:platform:administrators/administration/org.richfaces.images/autocompleteButtonGradient.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/portal/g/:platform:administrators/administration/org.richfaces.images/comboDownButton.png
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/portal/g/:platform:administrators/administration/registry/org.richfaces.images/inputBackgroundImage.png
event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery-min.js:75

Comment 6 Ken Finnigan 2013-12-12 14:43:46 UTC
Filip,

Did you add the portlet onto the administration page?

If not, those are some unusual urls.

Comment 7 Filip Kiss 2013-12-13 10:25:55 UTC
Hmm, yes I added it on administration page, but same errors on classic pages. I tested it on Firefox and Chrome on Ubuntu - same errors on both browsers, QS were build using this repo: http://jboss-developer.github.io/temp-maven-repo/

Comment 8 Peter Palaga 2013-12-13 13:05:02 UTC
Updated instructions for building the quickstart:

git clone https://github.com/jboss-developer/jboss-portal-quickstarts.git
cd jboss-portal-quickstarts
git checkout 6.1.x-develop
cd jsf2-rf4-hello-world-portlet
mvn clean install -s ../src/build/settings-for-contributors.xml

I hope I have not forgot anything important.

Comment 9 Peter Palaga 2013-12-13 13:08:02 UTC
And here is the newest JBoss Portal 6.1.1.DR2 http://torii.gva.redhat.com/gatein-prod/jboss-portal-6.1.1.DR2-prod.zip

Comment 10 Ken Finnigan 2013-12-13 15:13:09 UTC
Ok, I was able to reproduce the error building the quickstart with the above information.

The reason the images are not being loaded is because the portletbridge-extension-richfaces jar, though specified as a dependency, is not present within WEB-INF/lib of the built WAR.

Manually adding that jar to the WAR enables the images to appear.

Comment 11 Peter Palaga 2013-12-13 18:14:05 UTC
Thanks for your assistance, Ken! Yes, this can be fixed through removing provided scope from portletbridge-extension-richfaces in BOM.

https://github.com/jboss-developer/jboss-portal-boms/commit/c05c24381014670735baaa97baddbf9d1a6b0c65

Comment 12 Peter Palaga 2014-02-06 17:03:05 UTC
I cannot change the requires_doc_text to +

Comment 13 Tomas Kyjovsky 2014-02-20 13:21:39 UTC
Cannot reproduce with 6.1.1.CR1. All images are accounted for, I only see HTTP 200 responses. Tested with jsf2-hello-world-portlet, jsf2-rf4hello-world-portlet.

Comment 14 TyPV 2017-04-04 06:51:36 UTC
yes thank for this thread post!
I used JSF2 RF4.5 and RESTEasy with the following configurations web.xml:
---------------
<servlet>
	<servlet-name>Resteasy</servlet-name>
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>Resteasy</servlet-name>
		<url-pattern>/*</url-pattern>
	</servlet-mapping>


  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
  </servlet-mapping>

-----------
My bug is the icon calendar did not display properly.
My fix are two steps:
1. Add more jar library portletbridge-extension-richfaces in Web-inf lib folder
(after this step, the icon showed, but css is not working well)
2. change the url-pattern of Resteasy mapping in web.xml

	<servlet-mapping>
		<servlet-name>Resteasy</servlet-name>
		<url-pattern>/resteasy/*</url-pattern>
	</servlet-mapping>
Remember add more prefix for:
	<context-param>
		<param-name>resteasy.servlet.mapping.prefix</param-name>
		<param-value>/resteasy</param-value>
	</context-param>


Again thanks contributed this link
https://bugzilla.redhat.com/show_bug.cgi?id=1039007


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