AppLicensesController ClassNotFoundException Error During Axelor Template Installation

Hello everyone,

I’m encountering an issue while trying to install the Axelor Template in our solution. Here are the steps I followed and the problem I’m facing:

  1. Added dependencies and successfully compiled the project.
  2. Placed the .license file in src/main/resources.
  3. Installed the Template and Library modules from Apps Management.

However, when I attempt to open License Management, I encounter a 500 error. The trace log shows the following message:

java.lang.ClassNotFoundException: com.axelor.enterprise.license.AppLicensesController

I am unsure how to resolve this issue and would greatly appreciate any guidance or suggestions on how to fix it.

Thank you in advance for your help!

Best regards,

Hello, same issue here. i’m unable to launch the app correctly

Settings.gradle :

dependencyResolutionManagement {
  repositories {
    mavenCentral() {
      content {
        excludeGroup 'com.axelor'
      }
    }
    maven {
      url 'https://repository.axelor.com/nexus/repository/maven-public/'
    }
    maven {
      name 'maven-enterprise'
      url 'https://repository.axelor.com/nexus/repository/maven-enterprise/'
      credentials {
        username axelorMavenUsername
        password axelorMavenPassword
      }
    }
    // Declare the Node.js download repository
    ivy {
      name = "Node.js" 
      setUrl("https://nodejs.org/dist/")
      patternLayout {
        artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]")
      }
      metadataSources {
        artifact()
      }
      content {
        includeModule("org.nodejs", "node")
      }
    }
  }
}

gradle.properties in the root of the project : \axelor-8-1-0\open-suite-webapp\gradle.properties .

org.gradle.parallel=true
org.gradle.jvmargs=-Xmx2g
axelorMavenUsername=*********
axelorMavenPassword=*************

Build.gradle :

dependencies {
  gradle.appModules.each { dir ->
    implementation project(":modules:$dir.name")
  }
  implementation 'com.axelor.addons:axelor-template:2.0.0'
  implementation('org.apache.pdfbox:pdfbox') {
    version {
      strictly('2.0.26')
    }
  }
}

I tried this way too

dependencies {
  gradle.appModules.each { dir ->
    implementation project(":modules:$dir.name")
    implementation 'com.axelor.addons:axelor-template:2.0.0'
    implementation('org.apache.pdfbox:pdfbox') {
      version {
        strictly('2.0.26')
      }
    }
  }
}

and application-config.properties :

# Template library
# template.library.url = https://aos-library.axelor.com
# template.library.user = templateUser
# template.library.password = password

# Template API
template.api.auth = jwt
template.api.tenantUuid =*****************
template.api.baseUrl = https://template-api.saas.axelor.com
template.api.user = ****************
template.api.password = ********************

Error log :

1 error
05-Aug-2024 09:46:00.421 GRAVE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

======================
Full classname legend:
======================
AppModule:        "com.axelor.app.AppModule" 
AppServletModule: "com.axelor.web.AppServletModule" 
StudioModule:     "com.axelor.studio.module.StudioModule" 
TemplateModule:   "com.axelor.template.module.TemplateModule" 
ViewProcessor:    "com.axelor.meta.service.ViewProcessor" 
========================
End of classname legend:
========================

        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:576)
        at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:163)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
        at com.google.inject.Guice.createInjector(Guice.java:87)
        at com.google.inject.Guice.createInjector(Guice.java:69)
        at com.google.inject.Guice.createInjector(Guice.java:59)
        at com.axelor.web.AppContextListener.getInjector(AppContextListener.java:137)
        at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:45)
        at com.axelor.web.AppContextListener.contextInitialized(AppContextListener.java:124)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4463)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4911)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1345)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1335)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:876)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:794)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1345)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1335)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:876)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:248)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:470)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:951)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.startup.Tomcat.start(Tomcat.java:438)
        at com.axelor.tomcat.TomcatServer.start(TomcatServer.java:182)
        at com.axelor.tomcat.TomcatRunner.main(TomcatRunner.java:171)
05-Aug-2024 09:46:00.826 GRAVE [main] org.apache.catalina.core.StandardContext.startInternal Context [/axelor-erp] startup failed due to previous errors
2024-08-05 09:46:00.843 ERROR 13228 --- [           main] o.a.c.c.C.[.[localhost].[/axelor-erp]    : Exception sending context destroyed event to listener instance of class [com.axelor.web.AppContextListener]
java.lang.RuntimeException: Guice is not initialized.
        at com.axelor.inject.Beans.get(Beans.java:46)
        at com.axelor.inject.Beans.get(Beans.java:59)
        at com.axelor.meta.loader.ViewWatcher.getInstance(ViewWatcher.java:117)
        at com.axelor.web.AppContextListener.beforeStop(AppContextListener.java:112)
        at com.axelor.web.AppContextListener.contextDestroyed(AppContextListener.java:130)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4509)
        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5144)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:242)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:175)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1345)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1335)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:876)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:794)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1345)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1335)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:876)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:248)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:470)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:951)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.startup.Tomcat.start(Tomcat.java:438)
        at com.axelor.tomcat.TomcatServer.start(TomcatServer.java:182)
        at com.axelor.tomcat.TomcatRunner.main(TomcatRunner.java:171)
05-Aug-2024 09:46:00.991 AVERTISSEMENT [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [axelor-erp] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
05-Aug-2024 09:46:00.991 AVERTISSEMENT [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [axelor-erp] registered the JDBC driver [com.mysql.cj.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
05-Aug-2024 09:46:00.991 AVERTISSEMENT [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [axelor-erp] registered the JDBC driver [org.hsqldb.jdbc.JDBCDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
05-Aug-2024 09:46:00.991 AVERTISSEMENT [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [axelor-erp] appears to have started a thread named [mysql-cj-abandoned-connection-cleanup] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@11.0.23/java.lang.Object.wait(Native Method)
 java.base@11.0.23/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
 com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:91)
 java.base@11.0.23/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
 java.base@11.0.23/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 java.base@11.0.23/java.lang.Thread.run(Thread.java:829)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/C:/Users/Julien/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/9.0.88/97c5b67cc0d263f281e3210783bce04f4ffcbc19/tomcat-embed-core-9.0.88.jar) to field java.io.ObjectStreamClass$Caches.localDescs
WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
05-Aug-2024 09:46:01.044 INFOS [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]

Running at http://localhost:8080/axelor-erp

05-Aug-2024 09:46:05.989 INFOS [mysql-cj-abandoned-connection-cleanup] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
        java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load []. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
                at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1349)
                at org.apache.catalina.loader.WebappClassLoaderBase.getResource(WebappClassLoaderBase.java:981)
                at com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.checkThreadContextClassLoader(AbandonedConnectionCleanupThread.java:123)
                at com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:90)
                at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
                at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
                at java.base/java.lang.Thread.run(Thread.java:829)