Grails 3.1.6 部署到 JBoss 是 404

Grails 3.1.6 Deploy to JBoss is 404

当我将 helloWorld 应用程序部署到 JBoss EAP 6.4 时。0.GA 它在部署时出现警告且没有错误,显示部署在 JBoss 网络管理控制台中,但应用程序上下文 returns 404. JBoss 日志文件中有一些警告但没有错误。

进程:

Grails 3.1.6
JVM 1.8.0_77
Build on Windows 7 Enterprise
Deploying to JBoss EAP 6.4.0.GA running on CentOS Linux release 7.1.1503
grails create-app helloWorld
grails create-domain-class Person
Edit Person.groovy... add String name
grails henerate-all *
gradle bootRun (Works)
gradle war
Deploy to Tomcat 7.0.41, Win 7, JDK 1.8.0_77-b03 (Works)
Deploy to JBoss 6.4.0.GA, CentOS, deploys with warnings, app is 404.

我需要做什么才能在 JBoss EAP 上达到 运行?

这是我在 JBoss 日志文件中收到的警告:

2016-05-04 14:08:12,842 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015960: Class Path entry xml-apis.jar in /content/helloWorld.war/WEB-INF/lib/serializer-2.7.2.jar  does not point to a valid jar for a Class-Path reference.
2016-05-04 14:08:12,890 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=grails-core' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,890 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=3.0' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,891 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.grails.spring.context.ApplicationContextExtension' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,891 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=groovy-xml' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,891 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=2.4.6' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,892 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.codehaus.groovy.runtime.XmlGroovyMethods' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,892 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'staticExtensionClasses=' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,892 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=grails-web-servlets-module' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,892 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=1.0' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,893 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.grails.web.servlet.HttpServletRequestExtension,org.grails.web.servlet.HttpServletResponseExtension,org.grails.web.servlet.HttpSessionExtension,org.grails.web.servlet.ServletContextExtension' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,893 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'grails.dev.commands.ApplicationCommand=org.grails.web.mapping.reporting.UrlMappingsReportCommand' for service type 'grails.factories'
2016-05-04 14:08:12,893 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=grails-converters-module' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,894 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=1.0' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,894 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.grails.web.converters.ConvertersExtension' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,894 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=grails-mimetypes-module' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,894 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=1.0' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,895 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.grails.web.mime.HttpServletRequestExtension,org.grails.web.mime.HttpServletResponseExtension' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,895 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=groovy-sql' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,895 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=2.4.6' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,896 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.codehaus.groovy.runtime.SqlGroovyMethods' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,896 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'staticExtensionClasses=' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,896 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleName=grails-codecs' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,896 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'moduleVersion=3.0' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,897 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'extensionClasses=org.grails.plugins.codecs.Base64CodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,897 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.grails.plugins.codecs.HexCodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,897 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.grails.plugins.codecs.MD5BytesCodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,897 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.grails.plugins.codecs.MD5CodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,898 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.grails.plugins.codecs.SHA1BytesCodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,898 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.grails.plugins.codecs.SHA1CodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,898 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.grails.plugins.codecs.SHA256BytesCodecExtensionMethods,\' for service type 'org.codehaus.groovy.runtime.ExtensionModule'
2016-05-04 14:08:12,901 WARN  [org.jboss.as.ee] (MSC service thread 1-3) JBAS011071: Invalid signature for method initializeTagLibrary annotated with javax.annotation.PostConstruct on class grails.artefact.TagLibrary$Trait$Helper, signature must be 'void methodName(InvocationContext ctx)'
2016-05-04 14:08:13,130 WARN  [org.jboss.as.ee] (MSC service thread 1-5) JBAS011006: Not installing optional component grails.async.web.AsyncGrailsWebRequest due to an exception (enable DEBUG log level to see the cause)
2016-05-04 14:08:13,130 WARN  [org.jboss.as.ee] (MSC service thread 1-5) JBAS011006: Not installing optional component org.springframework.http.server.ServletServerHttpAsyncRequestControl due to an exception (enable DEBUG log level to see the cause)
2016-05-04 14:08:13,131 WARN  [org.jboss.as.ee] (MSC service thread 1-5) JBAS011006: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to an exception (enable DEBUG log level to see the cause)
2016-05-04 14:08:13,151 WARN  [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016012: Deployment deployment "helloWorld.war" contains CDI annotations but beans.xml was not found.

this answer中所述,您必须将此配置添加到application.yml:

grails:
    web:
        servlet:
            path: /*