glassfish 6.1.2 and primefaces 11 not working

UI Components for JSF
Post Reply
dhommy
Posts: 1
Joined: 15 Sep 2016, 21:14

24 Sep 2022, 18:55

Hi at all,

I have a problem getting primefaces 11 running on a glassfish 6. I get the following error and I don't find the reason.

java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Unable to add listener of type: org.primefaces.webapp.UploadedFileCleanerListener, because it does not implement any of the required ServletContextListener, ServletContextAttributeListener, ServletRequestListener, ServletRequestAttributeListener, HttpSessionListener, or HttpSessionAttributeListener interfaces

Does somebody knew the cause?

Thanks

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

28 Sep 2022, 13:34

Sounds like a Glassfish bug because it implements`ServletRequestListener` see

Code: Select all

package org.primefaces.webapp;

import org.primefaces.component.fileupload.FileUploadChunkDecoder;
import org.primefaces.model.file.UploadedFile;

import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import java.io.IOException;

public class UploadedFileCleanerListener implements ServletRequestListener {
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 12.0.0 / PF Extensions 12.0.1
PrimeReact 8.6.1

tandraschko
PrimeFaces Core Developer
Posts: 3932
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

28 Sep 2022, 13:40

maybe jakarta <> javax?
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

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

28 Sep 2022, 14:15

Yep with GlassFish 6.0 you need to use the jakarta version of PrimeFaces.

Code: Select all

<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>11.0.0</version>
    <classifier>jakarta</classifier>
</dependency>
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 12.0.0 / PF Extensions 12.0.1
PrimeReact 8.6.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests