gpt4 book ai didi

grails - 部署在JBoss上的grails应用提供了404状态资源未找到

转载 作者:行者123 更新时间:2023-12-02 14:34:51 24 4
gpt4 key购买 nike

成功地在JBoss 4.2上部署了grails war (遵循了所有的技巧使其发挥作用)

INFO  [org.jboss.web.tomcat.service.TomcatDeployer] deploy, ctxPath=/hello-0.1, warUrl=.../tmp/deploy/tmp2535731769294056658hello-0.1-exp.war/
WARN [javax.enterprise.resource.webcontainer.jsf.config] Unable to process deployment descriptor for context '/hello-0.1'


http://myhostname:8080/hello-0.1/

给出404错误。我尝试了许多不同的途径来找到资源,但无济于事
message /hello-0.1/
description The requested resource (/hello-0.1/) is not available.

它在这里使用grails run-app在本地运行良好:
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>

日志
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

最佳答案

在本地看来,您已将上下文根配置为/hello。当您部署到JBoss时,jboss-web.xml告诉JBoss使用hello-0.1作为context-root

您需要在Config.groovygrails.app.context中都具有app.context(或application.properties中的context-root)和jboss-web.xml中的上下文根匹配。

关于grails - 部署在JBoss上的grails应用提供了404状态资源未找到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14966066/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com