0

We are migrating our large application (which uses JBoss EAP 6.2 + RichFaces 4.3.5 + JSF 2.1.19) to a newer server . ie (JBoss EAP 7.2)

Can anybody suggest a stable combination of JSF+RichFaces+JBoss EAP, which may not break any code. ?

The combo which we were trying was JSF-2.2.3 (added as a multimodule feature in EAP7.2) + RichFaces 4.3.5 Final. But fileupload was unsuccessful. Tried with a variety of version combo, but didn't help.

Thanks in advance.

Update1 :

File uploading is failing here :

<rich:fileUpload
    fileUploadListener="#{bean.singleFileUploadListener}"
    id="upload"
    acceptedTypes="#{searchCriteria.type=='1' ? 'xls' : 'txt'}"
    style="height:90px;width:270px;" 
    maxFilesQuantity="1"
    immediateUpload="true" 
    addLabel="Browse">
    <a4j:ajax event="uploadcomplete" render="imp_btn_panel" />
</rich:fileUpload>

The error which we gets is:

 Exception parsing multipart request: Request prolog cannot be read
org.richfaces.exception.FileUploadException: Exception parsing multipart request: Request prolog cannot be read
    at org.richfaces.request.MultipartRequestParser.parse(MultipartRequestParser.java:156)
    at org.richfaces.request.MultipartRequest25.parseIfNecessary(MultipartRequest25.java:77)
    at org.richfaces.request.MultipartRequest25.getParameter(MultipartRequest25.java:114)
    at com.sun.faces.context.RequestParameterMap.get(RequestParameterMap.java:75)
    at com.sun.faces.context.RequestParameterMap.get(RequestParameterMap.java:56)
Dominic Philip
  • 108
  • 2
  • 10
  • 4
    Why not just fixing the file upload problem? Note that JSF 2.2 comes with its own standard file upload component. – BalusC Jul 23 '20 at 02:18
  • 1
    So you looked at both client to server network requests in the browser and tried to find differences? You checked the RichFaces source code to see what it is trying to do? Tried creating a [mcve] for this and use it? – Kukeltje Jul 23 '20 at 09:59
  • Thanks @BalusC for the quick suggestion. Our application is large and we have this file upload feature used in multiple places. Do you know any workaround without touching the code. ? Like any compatible Richfaces version that will work smoothly in MSIE etc.. Or we have to choose the toughest option to play around with code .ie. go for JSF 2.2.3 file upload. – Dominic Philip Jul 23 '20 at 10:08
  • Thanks @Kukeltje !.We have the same problem as described here but .JBoss [link](https://stackoverflow.com/questions/19819377/is-richfileupload-component-in-rc-4-3-4-working-on-apache-tomcat7-and-jsf-2-2) . The solution was to go for JSF 2.2 file upload. And i am extremely happy if we could get a solution that doesn't touch the code. Ex. a different version of Richfaces etc. – Dominic Philip Jul 23 '20 at 10:19
  • 1
    You can't state any stable combination of RichFaces with anything. It reached end of life in June 2016. See [this answer](https://stackoverflow.com/a/31064946/207421) for some of the issues. – user207421 Jul 23 '20 at 10:44
  • Thanks @MarquisofLorne !. If i understood correctly, your answer is for RichFaces migration from 3 -> 4 version.. In my case, it is already in 4.3.5 Final version (before migration). The feature that is identified as not working in new environment (RF4.3.5 Final+JSF2.2.3+JBossEAP7.2) as of now is rich:fileUpload. – Dominic Philip Jul 23 '20 at 11:06
  • 2
    What you should really understand from my linked answer is that RichFaces was one of the worst-managed software products I had ever encountered, and I am not sorry to witness its demise. In any case it doesn't matter. The entire RIchFaces product has been at end of life for over four years. Change to something reasonable, and supported, like PrimeFaces,or use the features that are now builtin to JSF. – user207421 Jul 23 '20 at 12:14
  • @MarquisofLorne. We have used RF features very extensively in our application. .And this means, i can replace all the RichFace related code in my application with JSF2.2 builtin features..? Or PrimeFaces.? Or both? Sorry for asking coz i am new to this kind of migration. – Dominic Philip Jul 23 '20 at 12:36
  • 1
    Use a JSF feature if one exists, and a PrimeFaces feature otherwise. – user207421 Jul 23 '20 at 23:37
  • 1
    Migration to supported framework is good advice. But even without any migration Richfaces 4.3.5 worked fine with JSF 2.2 (native RichFaces file upload included). – Vasil Lukach Jul 24 '20 at 23:58
  • @VasilLukach. But unfortunately , richfaces native fileupload is no working in my application. getting the error - "Exception parsing multipart request: Request prolog cannot be read" – Dominic Philip Jul 26 '20 at 09:40
  • 2
    This is not an issue of incompatibility between RF and JSF. EAP 7 uses Servlet 3.0+ which RichFaces 4.3 does not support. You can try upgrading to RF 4.5 but there's no guarantee the app is going to run. – Makhiel Jul 28 '20 at 16:30
  • Thanks @Makhiel. I have upgraded to RF4.5.2 and JSF2.2.9 in EAP7.2. And seems there is no issues now. – Dominic Philip Jul 29 '20 at 05:56

0 Answers0