Primefaces FileUploadListener not invoking listener method in bean class in wildfly 20 server

UI Components for JSF
Mohanraj.M
Posts: 11
Joined: 22 Apr 2021, 11:01

22 Apr 2021, 11:04

Dear team,
Primefaces FileUploadListener not invoking listener method in bean class in wildfly 20 server.

XHTML Code:
<p:fileUpload id="fileupload_Test"
fileUploadListener="#{CIM.handleFileUpload}" auto="true"
fileLimit="1" label="Select Excel File" mode="advanced"
invalidSizeMessage="File size limit exceeds.Maximum allowable size '#{CIM.xlFileSizeLimit}'MB. FileName: "
sizeLimit="100000"
allowTypes="/(\.|\/)(xls|xlsx)$/" onstart="PF('import_glasspane').block()"
oncomplete="PF('import_glasspane').unblock()" >
</p:fileUpload>

Bean Code:
public void handleFileUpload(FileUploadEvent event) {
FacesMessage message = new FacesMessage("Succesful", event.getFile().getFileName() + " is uploaded.");
FacesContext.getCurrentInstance().addMessage(null, message);
}

Note: working fine in wildfly version : 10, primefaces version 6.1.11.

Issue: After migrating wildfly 20, fileupload listener is not invoking.

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

23 Apr 2021, 13:12

I use it all the time it works fine in WildFly 20.

You have something else wrong with your project. Are you still using Commons FileUpload, if so remove it and use the Native Uploaded since Wildfly 20 is JSF 2.3 and has native mode you don't need Commons Uploader anymore.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Mohanraj.M
Posts: 11
Joined: 22 Apr 2021, 11:01

24 Apr 2021, 06:06

I have not used any commons file uploader but still its not working

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

24 Apr 2021, 16:21

Yep you have something else wrong then...
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Mohanraj.M
Posts: 11
Joined: 22 Apr 2021, 11:01

26 Apr 2021, 06:21

then what should I do to get solution for this issue

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

26 Apr 2021, 13:56

Start with Simple debugging. Create a small reproducer and try to narrow down the problem. I have over 60+ projects on WildFly 20+ and all use File Uploads and all are working properly.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Mohanraj.M
Posts: 11
Joined: 22 Apr 2021, 11:01

03 May 2021, 09:42

Dear team,

I have created simple war file project and tested file upload component in wildfly 20 version.
But it does not working. Attached my project URL.

Kindly check and update asap.

https://github.com/MohanMuthusamy243/sa ... /JSFSample

Mohanraj.M
Posts: 11
Joined: 22 Apr 2021, 11:01

04 May 2021, 07:25

Dear team,

Please check and update asap.

Mohanraj.M
Posts: 11
Joined: 22 Apr 2021, 11:01

04 May 2021, 15:07

I have created simple war file project and tested file upload component in wildfly 20 version. But it does not working.
Below attached my project URL.

github.com/MohanMuthusamy243/sampleJSF/ ... /JSFSample

Note : FileUploadListener method invoking fine in wildfly 17.0.1 and below version, but not working in 18 and above version.

Mohanraj.M
Posts: 11
Joined: 22 Apr 2021, 11:01

06 May 2021, 12:26

Dear team,

pushed my project in a public repository, hope u can view now.

Please check and suggest.

Thanks,
Mohanraj

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 51 guests