javadependenciesapache-commons-logging

Error running Java EE application with GlassFish: NoClassDefFoundError: org/apache/commons/logging/LogFactory


When trying to run a Java EE application with GlassFish, I encounter the following error on the server:

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
    at org.apache.http.conn.ssl.DefaultHostnameVerifier.<init>(DefaultHostnameVerifier.java:72)
    ...
...
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
    at dynamics365.TokenGenerator.ejecutarTokenGenerator(TokenGenerator.java:62)
    at sessionBeans.ParametroFacade.buscarCliente(ParametroFacade.java:103)
        at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:808)
    ...

What I've tried:

Wait:

I am looking for help to fix this error and understand why it occurs. Is there something I'm overlooking in my configuration or dependency management? How can I resolve this issue and run my application without this error?


Solution

  • What I did was reload all the JAR into the lib of the payara domains, restart it and from there, clean and build the project and it worked.