2013-02-19 29 views
1

部署Grails的戰爭在JBoss 4.2成功地(以下所有的黑客,使其工作)Grails的給予404狀態的資源未找到

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運行的應用程序的位置:

http://localhost:8080/hello/hello/index 

我有一種感覺的東西,我需要在網絡設置.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: [email protected] 
2013-02-25 06:09:26,180 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] [email protected]{ 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] [email protected] 
2013-02-25 06:09:26,180 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] [email protected] 
2013-02-25 06:09:26,180 DEBUG [org.jboss.web.tomcat.service.TomcatDeployer] [email protected] 
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 
+0

有JBoss上成功運行一個其他應用程序。我在主機8080看到JBoss主頁,但沒有一個JBoss管理工作全部返回404,例如web或xms控制檯 – Jabda 2013-02-19 20:27:16

+0

/server/default/work/jboss.web/localhost/hello-0.1/沒有org文件夾只有tldCache .ser – Jabda 2013-02-19 22:00:13

+0

成功部署了web和JMX控制檯 – Jabda 2013-02-19 22:34:50

回答

1

在本地看來,您的上下文根目錄配置爲/hello。當你部署到JBoss時,你的jboss-web.xml告訴JBoss使用hello-0.1作爲context-root

你需要讓你的上下文根的比賽中都Config.groovy,這將有jboss-web.xml(在application.propertiesapp.contextgrails.app.contextcontext-root

+0

我試着改變一切(戰爭中的XML)到你好-0.1,也是你好......仍然得到404。你的意思是BuildConfig.groovy? – Jabda 2013-02-19 22:27:56

+0

不是,'Config.groovy'或'application.properties' – doelleri 2013-02-19 22:36:16

+0

改變了從hello-0.1到hello的一切。添加app.context =「hello」和context-root爲hello。仍然得到404,沒有服務器錯誤和工作目錄/本地主機/你好是空的 – Jabda 2013-02-19 22:57:33

1

您是否構建了戰爭並將其放置在部署目錄中?沒有黑客需要。從文檔:

的JBoss 4.2

部署到JBoss的4.2是微不足道的,只是啓動的JBoss然後刪除WAR文件到JBOSS_HOME /服務器/ default/deploy目錄的目錄(或要相關的配置文件部署到)。 JBoss會自動部署Grails應用程序然後將通過類似訪問:

http://localhost:8080/myapp-0.1

http://grails.org/Deployment#JBoss%204.2

+0

我希望這很容易。它沒有工作,無論有沒有黑客 – Jabda 2013-02-25 21:59:25

+0

你指的是什麼黑客,具體是什麼? – 2013-02-25 22:02:18

+0

刪除log4j jar並添加jboss-web.xml使其無錯部署,但404未找到頁面除外 – Jabda 2013-02-25 22:11:32

相關問題