I deploying but i get this error in glassfish 7.0.11

46 Views Asked by At

enter image description here

i was expecting to get deploy successful

Waiting for domain1 to start ............ Waiting finished after 11,396 ms. Successfully started the domain : domain1 domain Location: C:\GLASSFISH_HOME\glassfish\domains\domain1 Log File: C:\GLASSFISH_HOME\glassfish\domains\domain1\logs\server.log Admin Port: 4,848 Command start-domain executed successfully.

C:\GLASSFISH_HOME\bin>asadmin deploy D:\hmis\target\sethma-3.0.0.war

C:\GLASSFISH_HOME\bin>asadmin deploy D:\hmis\target\sethma-3.0.0.war remote failure: Error occurred during deployment: Exception while loading the app : 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. Please see server.log for more details. Command deploy failed.

C:\GLASSFISH_HOME\bin>asadmin deploy D:\hmis\target\sethma-3.0.0.war remote failure: Error occurred during deployment: Exception while loading the app : 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. Please see server.log for more details. Command deploy failed.

1

There are 1 best solutions below

0
OndroMih On

I assume your app contains an incompatible Primefaces version. GlassFish 7 requires that Jakarta EE code uses the new jakarta package prefix instead of the old javax prefix. Primefaces is provided in 2 flavours, for new and okd package prefix. You the one that supports the jakarta prefix.

If you use maven, enaure that there’s the jakarta classifier:

dependency>
  <groupId>org.primefaces</groupId>
  <artifactId>primefaces</artifactId>
  <version>13.0.0</version>
  <classifier>jakarta</classifier>
</dependency>

as described in https://omnifish.ee/2023/08/04/upgrade-to-jakarta-ee-10-transform-incompatible-dependencies/