English 中文(简体)
Grail with JSF2: WAR 不能在Tomcat 6上运行
原标题:Grails with JSF2: WAR cannot run on Tomcat 6

I m using the jsf2 plugin for my app. Running the app with "run-app" it works fine.

但是,当我把战争用在清白的第六号时,出现这一错误:

com.sun.faces.config.ConfigurationException: 
  Source Document: web.xml
  Cause: Unable to create a new instance of  org.doc4web.grails.jsf.facelets.GrailsResourceResolver : org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named  groovyPageResourceLoader  is defined
    at com.sun.faces.facelets.util.ReflectionUtil.decorateInstance(ReflectionUtil.java:252)
    at com.sun.faces.application.ApplicationAssociate.createFaceletFactory(ApplicationAssociate.java:582)
    at com.sun.faces.application.ApplicationAssociate.<init>(ApplicationAssociate.java:215)
    at com.sun.faces.application.ApplicationImpl.<init>(ApplicationImpl.java:209)
    at com.sun.faces.application.ApplicationFactoryImpl.getApplication(ApplicationFactoryImpl.java:107)
    at com.sun.faces.config.processor.AbstractConfigProcessor.getApplication(AbstractConfigProcessor.java:130)
    at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:252)
    at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
    at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)
    at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
    at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:223)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:335)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:223)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named  groovyPageResourceLoader  is defined
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:527)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1083)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:266)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075)
    at org.doc4web.grails.jsf.facelets.GrailsResourceResolver.<init>(GrailsResourceResolver.java:34)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at com.sun.faces.facelets.util.ReflectionUtil.decorateInstance(ReflectionUtil.java:233)
    ... 36 more

www.un.org/Depts/DGACM/index_spanish.htm 额外信息:

我不得不向Tomcat lib 记号复印件。 否则,无法找到javax.faces.application.ApplicationFactory

问题回答

http://code.google.com/p/jsf4g/“rel=“nofollow”>jsf4g

The jsf2 plugin will not work in production mode because the reference to the value groovyPageResourceLoader is available only in development mode Ref- grails-1.x

幸运的粉碎板有固定,但不会为需要固定装置的Grails2.x工作。





相关问题
Tomcat´s server.xml dynamic configuration

My web application uses the same database configuration as the application XYZ. I have a resource declaration for a context in server.xml, so I have a duplicated configuration (once for web ...

session transfer issue from Tomcat to ASP.Net

I am using Tomcat to host JSP and using IIS 7.0 to host aspx (C# + .Net 3.5 + VSTS 2008), and I have some session transfer issue from JSP page to ASPX page. JSP page is in one domain and all other ...

JSP exception - class not found (tomcat)

I m setting up an existing application on a new Tomcat 5.5 server connecting to a Postgres database (running on Debian Lenny). When I access it I get a series of stack traces with the following root ...

热门标签