grails / grails-views

Additional View Technologies for Grails
Apache License 2.0
56 stars 41 forks source link

Grails version 5.3.5 not able to deploy to WildFly 26.1.2.Final #510

Closed y07it030 closed 6 months ago

y07it030 commented 8 months ago

HI, Grails version 5.3.5 application WAR file not able to deploy to WildFly 26.1.2.Final

Error: 16:02:27,032 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "test.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"test.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)."}}

We are trying to generate a war and deploy to wildfly. Could you pls assist. The same war with grails 3 is able to deploy.

build.gradle:

dependencies {
    // Default dependencies generated by grails
    developmentOnly("org.springframework.boot:spring-boot-devtools")
    compileOnly "io.micronaut:micronaut-inject-groovy"
    console "org.grails:grails-console"
    implementation "org.springframework.boot:spring-boot-starter-logging"
    implementation("org.springframework.boot:spring-boot-starter-validation") {
        exclude group: 'org.apache.tomcat.embed', module: 'tomcat-embed-el'
    }
    implementation "org.springframework.boot:spring-boot-autoconfigure:2.7.12" // Upgrade default version due to CVE-2023-20883

    implementation('org.grails:grails-core') {
        exclude group: 'com.h2database', module: 'h2'
    }

    implementation "org.springframework.boot:spring-boot-starter-actuator:2.7.12" // Upgrade default version due to CVE-2023-20873
    developmentOnly "org.springframework.boot:spring-boot-starter-tomcat"
    testImplementation "org.springframework.boot:spring-boot-starter-tomcat"
    implementation "org.grails:grails-web-boot"
    implementation "org.grails:grails-logging"
    implementation "org.grails:grails-plugin-rest"
    implementation "org.grails:grails-plugin-databinding"
    implementation "org.grails:grails-plugin-i18n"
    implementation "org.grails:grails-plugin-services"
    implementation "org.grails:grails-plugin-url-mappings"
    implementation "org.grails:grails-plugin-interceptors"
    implementation "org.grails.plugins:cache"
    implementation "org.grails.plugins:async"
    implementation "org.grails.plugins:scaffolding"
    implementation "org.grails.plugins:hibernate5"
    implementation "org.hibernate:hibernate-core:5.6.11.Final"
    implementation "org.grails.plugins:events"
    implementation "org.grails.plugins:gsp"
    profile "org.grails.profiles:web"
    runtimeOnly "org.glassfish.web:el-impl:2.2.1-b05"
    implementation "org.apache.tomcat:tomcat-jdbc"
    runtimeOnly "javax.xml.bind:jaxb-api:2.3.1"
    runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:3.4.7"
    testImplementation "com.h2database:h2"
    testImplementation "io.micronaut:micronaut-inject-groovy"
    testImplementation "org.grails:grails-gorm-testing-support"
    testImplementation "org.mockito:mockito-core"
    testImplementation "org.grails:grails-web-testing-support"
    testImplementation "org.grails.plugins:geb"
    testImplementation "org.seleniumhq.selenium:selenium-remote-driver:4.0.0"
    testImplementation "org.seleniumhq.selenium:selenium-api:4.0.0"
    testImplementation "org.seleniumhq.selenium:selenium-support:4.0.0"
    testImplementation "org.seleniumhq.selenium:htmlunit-driver:4.12.0"

    implementation 'org.owasp.esapi:esapi:2.5.3.1' // Upgrade default version due to CVE-2022-24891
    implementation 'org.springframework.boot:spring-boot-starter:2.7.12' // Upgrade default version due to CVE-2023-20873
    implementation 'org.springframework.boot:spring-boot-actuator-autoconfigure:2.7.12' // Upgrade default version due to CVE-2023-20873
    implementation 'xalan:xalan:2.7.3' // Upgrade default due to CVE-2022-34169
    implementation 'xalan:serializer:2.7.3' // Needed because xalan 2.7.3 doesn't have serializer as a dependency
    implementation 'org.bouncycastle:bcprov-ext-jdk18on:1.77' // Upgrade default due to CVE-2020-15522
    implementation 'org.bouncycastle:bcpkix-jdk18on:1.77' // Upgrade default due to CVE-2020-15522
    implementation 'org.springframework:spring-core:5.3.27' // Upgrade default due to CVE-2023-20861
    implementation 'org.springframework:spring-webmvc:5.3.27' // Upgrade default due to CVE-2023-20860
    implementation 'org.apache.santuario:xmlsec:2.3.4' // Upgrade default due to CVE-2023-44483

    // Exclusions from standard grails dependencies
    implementation('org.grails:grails-dependencies') {
        exclude group: 'com.h2database', module: 'h2'
    }

    // Additional dependencies
    implementation "org.apache.commons:commons-pool2:2.11.1"
    implementation("org.grails.plugins:spring-security-core:5.3.0") {
        exclude group: 'net.sf.ehcache', module: 'ehcache'
    }
    implementation "org.grails.plugins:spring-security-ldap:4.0.0.M1"
    implementation "org.grails.plugins:quartz:2.0.13"
    implementation "org.quartz-scheduler:quartz:2.3.2"
    implementation('org.grails.plugins:database-migration:4.1.0') {
        exclude group: 'org.grails', module: 'grails-shell'
    }
    implementation "org.liquibase:liquibase-core:$liquibaseVersion"
    implementation "org.slf4j:log4j-over-slf4j:1.7.36"

    implementation "commons-fileupload:commons-fileupload:1.5"

    implementation 'org.codehaus.groovy:groovy-dateutil'

    // ma-engine components and required dependencies 
    implementation("com.messageautomation.engine:ma-engine:${version}") {
        exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
        exclude group: 'org.eclipse.jetty', module: 'jetty-servlet'
    }

    implementation "net.sf.saxon:Saxon-HE:11.4"

    implementation 'org.webjars:jquery:3.6.0'
    implementation 'org.webjars:d3js:3.5.17'
    implementation 'org.webjars.npm:atlassian__tipsy:1.3.2'
    implementation "com.messageautomation.webjars.dagre-d3:dagre-d3:$dagred3Version"
    implementation "com.messageautomation.webjars.extjs:extjs:$extjsVersion"
    implementation('org.springframework.boot:spring-boot-starter-security')
    implementation('org.springframework.security.extensions:spring-security-saml2-core:1.0.10.RELEASE') {
         exclude group: 'spring-security-core'
         exclude group: 'spring-security-web'
         exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
         exclude group: 'org.bouncycastle', module: 'bcprov-ext-jdk15on'
         exclude group: 'org.bouncycastle', module: 'bcpkix-jdk15on'
    }

    implementation "software.amazon.awssdk:ssm:$awsVersion"
    implementation "software.amazon.awssdk:s3:$awsVersion"

    // JDBC drivers for development
    developmentOnly 'com.microsoft.sqlserver:mssql-jdbc:6.1.0.jre8'
    developmentOnly 'com.oracle.database.jdbc:ojdbc8:12.2.0.1'
    developmentOnly 'org.postgresql:postgresql:42.5.0'
}
guillermocalvo commented 7 months ago

Hi @y07it030. Have you tried using the latest WildFly release? Recent versions introduced Jakarta EE 10 support, which I believe 26.1.2.Final lacks. That could be the cause of the problem.

guillermocalvo commented 6 months ago

This issue duplicates https://github.com/grails/grails-core/issues/12743