部署在JBoss上的grails应用程序未找到404状态资源

部署在JBoss上的grails应用程序未找到404状态资源,grails,jboss,web.xml,Grails,Jboss,Web.xml,在JBoss4.2上成功部署GrailsWar 但是 给出一个404错误。我尝试了许多不同的途径来访问资源,但都没有成功 message /hello-0.1/ description The requested resource (/hello-0.1/) is not available. 使用grails run应用程序在本地运行良好,如下所示: http://localhost:8080/hello/hello/index 我觉得我需要在web.xml或jboss-web.xml中设

在JBoss4.2上成功部署GrailsWar

但是

给出一个404错误。我尝试了许多不同的途径来访问资源,但都没有成功

message /hello-0.1/
description The requested resource (/hello-0.1/) is not available.
使用grails run应用程序在本地运行良好,如下所示:

http://localhost:8080/hello/hello/index
我觉得我需要在web.xml或jboss-web.xml中设置它

<jboss-web>
        <context-root>hello-0.1</context-root>  
        <loader-repository>
            com.hello:archive=hello-0.1.war
            <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
        </loader-repository>
</jboss-web>

在本地,您似乎已将上下文根配置为
/hello
。当您部署到JBoss时,您的
JBoss web.xml
告诉JBoss对
上下文根使用
hello-0.1


您需要使您的上下文根在
Config.groovy
中匹配,这将有
grails.app.context
(或
application.properties
中的
app.context
)和
jboss web.xml
中的
上下文根目录中匹配。您是否构建了war并将其放到部署目录中?不需要黑客。从文档中:

JBoss4.2

部署到JBoss 4.2非常简单,只需启动JBoss,然后将WAR文件放入JBoss_HOME/server/default/deploy目录(或要部署到的相关概要文件)。JBoss将自动部署Grails应用程序,然后可以通过以下方式访问该应用程序:

http://localhost:8080/myapp-0.1


另一个应用程序在JBoss上成功运行。我在主机8080上看到了JBoss主页,但是没有一个JBoss管理工作会像web或xms控制台/server/default/work/JBoss.web/localhost/hello-0.1/那样返回404,没有org文件夹,只有tldCache.ser成功部署了web和JMX控制台您确定web服务器在端口8080上运行而不是在端口80上吗?或者可能有两台不同的服务器在不同的端口上运行?我尝试将所有内容(战争中的xml)都更改为hello-0.1和hello。。。还有404。你是说BuildConfig.groovy吗?不是,要么
Config.groovy
要么
application.properties
将所有内容从hello-0.1更改为hello。将app.context=“hello”和context root添加为hello。仍然得到404,没有服务器错误,并且工作目录/localhost/hello为空。我希望它能这么简单。不管有没有黑客,它都不起作用。具体来说,你指的是什么黑客?删除log4jjar并添加jboss-web.xml使其部署时除了404未找到页面之外没有任何错误
http://localhost:8080/hello/hello/index
<jboss-web>
        <context-root>hello-0.1</context-root>  
        <loader-repository>
            com.hello:archive=hello-0.1.war
            <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
        </loader-repository>
</jboss-web>
2013-02-25 06:09:26,179 INFO  [org.jboss.web.tomcat.service.TomcatDeployer] deploy, ctxPath=/hello, warUrl=.../tmp/deploy/tmp8355669251173232249hello-exp.war/
2013-02-25 06:09:26,179 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] AbstractWebContainer.parseWebAppDescriptors, Begin
2013-02-25 06:09:26,180 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] Creating ENC using ClassLoader: java.net.FactoryURLClassLoader@1731334
2013-02-25 06:09:26,180 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] ..org.jboss.mx.loading.UnifiedClassLoader3@b98fe1{ url=file:../jboss-4.2.3.GA/server/default/tmp/deploy/tmp8355669251173232249hello-exp.war/ ,addedOrder=31}
2013-02-25 06:09:26,180 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] ..org.jboss.system.server.NoAnnotationURLClassLoader@1dd7056
2013-02-25 06:09:26,180 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] ..sun.misc.Launcher$AppClassLoader@cac268
2013-02-25 06:09:26,180 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] ..sun.misc.Launcher$ExtClassLoader@1a16869
2013-02-25 06:09:26,181 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] Unable to retrieve orbjavax.management.InstanceNotFoundException: jboss:service=CorbaORB is not registered.
2013-02-25 06:09:26,181 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] Linked java:comp/UserTransaction to JNDI name: UserTransaction
2013-02-25 06:09:26,181 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] addEnvEntries
2013-02-25 06:09:26,181 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] linkResourceEnvRefs
2013-02-25 06:09:26,181 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] linkResourceRefs
2013-02-25 06:09:26,181 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] linkMessageDestinationRefs
2013-02-25 06:09:26,181 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] linkEjbRefs
2013-02-25 06:09:26,181 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] linkEjbLocalRefs
2013-02-25 06:09:26,181 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] linkServiceRefs
2013-02-25 06:09:26,181 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] linkSecurityDomain
2013-02-25 06:09:26,181 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] No security-domain given, using default: java:/jaas/other
2013-02-25 06:09:26,181 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] Linking security/securityMgr to JNDI name: java:/jaas/other
2013-02-25 06:09:26,182 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] AbstractWebContainer.parseWebAppDescriptors, End
2013-02-25 06:09:26,193 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] Using session cookies default setting
2013-02-25 06:09:26,453 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] ConfigureListener.contextInitialized(/hello)
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.displayConfiguration' - DISABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.validateXml' - DISABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.verifyObjects' - DISABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.forceLoadConfiguration' - DISABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.enableHtmlTagLibValidator' - DISABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.preferXHTML' - DISABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.compressViewState' - ENABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.compressJavaScript' - ENABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.externalizeJavaScript' - DISABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.sendPoweredByHeader' - ENABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.enableJSStyleHiding' - DISABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.enableScriptsInAttributeValues' - ENABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.writeStateAtFormEnd' - ENABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.enableLazyBeanValidation' - ENABLED
2013-02-25 06:09:26,454 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.enabledLoadBundle11Compatibility' - DISABLED
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.enableRestoreView11Compatibility' - DISABLED
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.serializeServerState' - DISABLED
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.enableViewStateIdRendering' - ENABLED
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.registerConverterPropertyEditors' - DISABLED
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.disableUnicodeEscaping' - DISABLED
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1021: [/hello] Configuration option 'com.sun.faces.developmentMode' - DISABLED
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1018: [/hello] Configuration option 'javax.faces.STATE_SAVING_METHOD' set to 'server'
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1018: [/hello] Configuration option 'javax.faces.DEFAULT_SUFFIX' set to '.jsp'
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1018: [/hello] Configuration option 'com.sun.faces.numberOfViewsInSession' set to '15'
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1018: [/hello] Configuration option 'com.sun.faces.numberOfLogicalViews' set to '15'
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1018: [/hello] Configuration option 'com.sun.faces.injectionProvider' set to 'org.jboss.web.jsf.integration.injection.JBossInjectionProvider'
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1018: [/hello] Configuration option 'com.sun.faces.responseBufferSize' set to '1024'
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1018: [/hello] Configuration option 'com.sun.faces.clientStateWriteBufferSize' set to '8192'
2013-02-25 06:09:26,455 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] JSF1018: [/hello] Configuration option 'com.sun.faces.expressionFactory' set to 'com.sun.el.ExpressionFactoryImpl'
2013-02-25 06:09:26,461 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] No FacesServlet found in deployment descriptor - bypassing configuration