grails-core: Grails 5 - Unable to deploy on Wildfly 26.1.2

I’m trying to deploy my grails application (latest stable version 5.2.4) on Wildfly application server (version 26.1.2). I’ve dealt with some log-related conflict points, however, now I’m getting the following error:

{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"g6web-0.1-plain.war\".undertow-deployment" => "java.lang.RuntimeException: io.micronaut.context.exceptions.NoSuchBeanException: No bean of type [io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.context.event.StartupEvent>] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor).
    Caused by: java.lang.RuntimeException: io.micronaut.context.exceptions.NoSuchBeanException: No bean of type [io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.context.event.StartupEvent>] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor).
    Caused by: io.micronaut.context.exceptions.NoSuchBeanException: No bean of type [io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.context.event.StartupEvent>] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor)."}}

This seems to have something bug from micronaut dependency. Maybe the issue below: https://github.com/micronaut-projects/micronaut-core/issues/7144

Gradle dependencies:

dependencies {
    developmentOnly("org.springframework.boot:spring-boot-devtools")
    compileOnly "io.micronaut:micronaut-inject-groovy"
    console "org.grails:grails-console"
    providedCompile "org.springframework.boot:spring-boot-starter-logging"
    implementation "org.springframework.boot:spring-boot-starter-validation"
    implementation "org.springframework.boot:spring-boot-autoconfigure"
    implementation "org.grails:grails-core"
    implementation "org.springframework.boot:spring-boot-starter-actuator"
    providedCompile "org.springframework.boot:spring-boot-starter-tomcat"
    implementation "org.grails:grails-plugin-url-mappings"
    implementation "org.grails:grails-plugin-rest"
    implementation "org.grails:grails-plugin-codecs"
    implementation "org.grails:grails-plugin-interceptors"
    implementation "org.grails:grails-plugin-services"
    implementation "org.grails:grails-plugin-datasource"
    implementation "org.grails:grails-plugin-databinding"
    implementation "org.grails:grails-web-boot"
    implementation "org.grails:grails-logging"
    implementation "org.grails.plugins:cache"
    implementation "org.grails.plugins:async"
    implementation "org.grails.plugins:events"
    implementation "org.grails.plugins:hibernate5"
    implementation "org.hibernate:hibernate-core:5.6.12.Final"
    implementation "org.grails.plugins:views-json"
    implementation "org.grails.plugins:views-json-templates"
    profile "org.grails.profiles:rest-api"
    runtimeOnly "org.apache.tomcat:tomcat-jdbc"
    runtimeOnly 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359'
    testImplementation "io.micronaut:micronaut-inject-groovy"
    testImplementation "org.grails:grails-gorm-testing-support"
    testImplementation "org.mockito:mockito-core"
    testImplementation "io.micronaut:micronaut-http-client"
    testImplementation "org.grails:grails-web-testing-support"
    testImplementation "org.grails:views-json-testing-support"
    testImplementation "org.hibernate.validator:hibernate-validator:8.0.0.Final"

    implementation "mysql:mysql-connector-java:8.0.30"
    implementation "org.codehaus.jackson:jackson-mapper-asl:1.9.13"
    implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.4"
    implementation "com.codahale.metrics:metrics-json:3.0.2"
}

WEB-INF jboss configs: jboss-web.xml

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="
      http://www.jboss.com/xml/ns/javaee
      http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd">
    <context-root>api</context-root>
</jboss-web>

jboss-deployment-structure

<?xml version='1.0' encoding='UTF-8'?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
    <deployment>
        <exclusions>
            <module name="org.hibernate.validator" />
        </exclusions>
    </deployment>
</jboss-deployment-structure>

Expected Behavior

Deploy and usually run the application in Wildfly as grails 5.2.4.

Actual Behaviour

Failed deployment

Steps To Reproduce

1.Run grails clean 2. Run grails dev war 3. Upload war on wildfly management interface 4. I got the above mentioned error

Environment Information

  • Operating System: Windows 10/Ubuntu 22.04
  • Grails Version: 5.2.4
  • Gorm Version: 7.3.2
  • JDK Version: 1.8
  • Container Version (If Applicable): Wildfly 26.1.2

Example Application

No response

Version

5.2.4

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 21

Commits related to this issue

Most upvoted comments