Bug 996064 - rich:fileUpload doesn't work in Showcase
Summary: rich:fileUpload doesn't work in Showcase
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: PortletBridge
Version: 6.1.0
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: DR01
: 6.1.1
Assignee: Nobody
QA Contact: Tomas Kyjovsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-12 10:52 UTC by Petr Mensik
Modified: 2025-02-10 03:28 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:28:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Mensik 2013-08-12 10:52:55 UTC
It seems that file is never uploaded, progress bar doesn't show anything and there is also error in the server log, root cause seems to be

Caused by: java.lang.NumberFormatException: null
	at java.lang.Long.parseLong(Long.java:404) [rt.jar:1.7.0_25]
	at java.lang.Long.parseLong(Long.java:483) [rt.jar:1.7.0_25]
	at org.richfaces.context.FileUploadFacesContextFactory.getFacesContext(FileUploadFacesContextFactory.java:129) [richfaces-components-ui-4.3.2.Final.jar:4.3.2.Final]
	at com.sun.faces.context.InjectionFacesContextFactory.getFacesContext(InjectionFacesContextFactory.java:121) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
	at org.jboss.portletbridge.bridge.controller.Jsf20ControllerImpl.getFacesContext(Jsf20ControllerImpl.java:621) [portletbridge-impl-3.2.1.Final-redhat-1.jar:3.2.1.Final-redhat-1]
	at org.jboss.portletbridge.bridge.controller.Jsf20ControllerImpl.renderResource(Jsf20ControllerImpl.java:278) [portletbridge-impl-3.2.1.Final-redhat-1.jar:3.2.1.Final-redhat-1]
	... 136 more



Steps to reproduce

1. Start JPP
2. Deploy Showcase portlet
3. Go to Inputs/rich:fileUpload
4. Try to deploy some image

Comment 1 Petr Mensik 2013-08-12 10:54:28 UTC
Tested with PBR 3.2.1.Final and RF 4.3.2

Comment 3 Ken Finnigan 2013-08-12 12:51:31 UTC
Is the PBR richfaces extension jar included in the showcase war?

The stacktrace looks like it isn't present.

Comment 4 Petr Mensik 2013-08-12 13:04:24 UTC
Yes, it's there, I thought that richfaces4-depchain should add it to the project

https://github.com/portletbridge/portletbridge/blob/3.2.1.Final/examples/richfaces-showcase/pom.xml#L65

Comment 5 Ken Finnigan 2013-08-12 20:48:35 UTC
Try removing the beans.xml and the references to the portlet filter from portlet.xml

I think the issue is that the CDI integration library for portlets is wrapping the portlet request into a http one, which makes the RF File Upload context factory kick in, and not the PBR one for RF.

If that fix works for you, not sure if we can do anything code related. It may need to be updated docs stating that rich:fileUpload can't be used in a CDI portlet.

Comment 6 Petr Mensik 2013-08-13 12:11:38 UTC
Ok, I can confirm that this behaviour is caused by adding CDI to the portlet so I suppose we need to just update the docs.

Comment 7 Petr Mensik 2013-09-03 14:15:50 UTC
Jared, can you please provide me a link for documentation so I can close this issue?

Comment 8 Ken Finnigan 2013-10-29 15:05:33 UTC
This is now resolved in GateIn master by GTNPORTAL-3275.

CDI Portlet Integration library was upgraded, and the new version defaults to not wrapping multipart requests in the filter, but it is also possible to revert to wrapping all requests.

Comment 9 Petr Mensik 2013-12-02 10:40:43 UTC
Verified on JPP 6.1.1.DR1-prod that the updated library fixes this issue.

Comment 14 Red Hat Bugzilla 2025-02-10 03:28:19 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


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