Note that there are some explanatory texts on larger screens.

plurals
  1. POgetting - error with jsf2 "...backup for factory javax.faces.context.FacesContextFactory". in grails plugin project
    text
    copied!<p>running grails 2.01, and tomcat in dev mode (normal STS developer download)</p> <p>i tried to run the jsf plugin but it wouldnt work in grails 2</p> <p>so for instruction for me ive tried to build my own local plugin, build it as native v2 plugin and and learn about plugin projects on the way. Been deconstructing (slowly ) the grails jsf2 plugin and rebuilding it the hard way bit by bit and learn as i go</p> <p>my problem is as follows - i've built my plugin locally - called it 'wwjsf'</p> <p>i've completed the doWithWebDescriptor closure - but when i run the plugin i get an error with - and the server wont render an .xhtml files - any such request gives same error.</p> <p>I have included the latest mojarra jsf 2.1.7 api/impl files into my build path for the project - heres the error on default tomcat embedded in grails 2.01</p> <pre><code>Message: Could not find backup for factory javax.faces.context.FacesContextFactory. Line | Method -&gt;&gt; 1008 | getFactory in javax.faces.FactoryFinder$FactoryManager - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 343 | getFactory in javax.faces.FactoryFinder | 302 | init . . . in javax.faces.webapp.FacesServlet | 303 | innerRun in java.util.concurrent.FutureTask$Sync | 138 | run . . . in java.util.concurrent.FutureTask | 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run . . . in '' ^ 662 | run in java.lang.Thread | Error 2012-04-04 18:32:55,748 [pool-6-thread-1] ERROR [localhost].[/wwjsf] - Servlet /wwjsf threw load() exception Message: Could not find backup for factory javax.faces.context.FacesContextFactory. Line | Method -&gt;&gt; 1008 | getFactory in javax.faces.FactoryFinder$FactoryManager - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 343 | getFactory in javax.faces.FactoryFinder | 302 | init . . . in javax.faces.webapp.FacesServlet | 303 | innerRun in java.util.concurrent.FutureTask$Sync | 138 | run . . . in java.util.concurrent.FutureTask | 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run . . . in '' ^ 662 | run in java.lang.Thread | Server running. Browse to http://localhost:8080/wwjsf </code></pre> <p>i have done a dump of the web.xml as finalised in the closure to have a peek. I looked up the error up on google and it said you had to have the facesConfigureListener set - which i have, and i have checked the faces server element in the xml and i think it looks good.</p> <p>in addition i have put an empty faces-config.xml under the WEB-INF (i'll worry about how to create that in a project that uses the plugin later), and as some of the google warnings said i have to have the jsf files in the WEB-INF/lib directory - i manually created that /lib and copied my jsf 2.1.7 api/impl jars into it as well - belt and braces</p> <p>how do i get rid of this error in the embedded tomcat server ? Kind of stuck now till i can get passed this problem</p> <p>Help from anyone on the dev forum would be hugely appreciated (apologies first part doesnt want to format even though i have put four spaces before the each row ...) final web.xml config looks like :</p> <pre class="lang-xml prettyprint-override"><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org /2001/XMLSchema-instance" metadata-complete="true" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt; &lt;display-name&gt;/wwjsf-development-null&lt;/display-name&gt; &lt;context-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;com.sun.faces.validateXml&lt;/param-name&gt; &lt;param-value&gt;false&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;com.sun.faces.verifyObjects&lt;/param-name&gt; &lt;param-value&gt;false&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;javax.faces.application.CONFIG_FILES&lt;/param-name&gt; &lt;param-value&gt;C:\Users\802518659\Documents\grails-workspace\wwjsf\web-app\WEB-INF\faces-config.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt; &lt;param-value&gt;server&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;javax.faces.FACELETS_RESOURCE_RESOLVER&lt;/param-name&gt; &lt;param-value&gt;com.softwood.grails.jsf.facelets.GrailsResourceResolver&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;javax.faces.PROJECT_STAGE&lt;/param-name&gt; &lt;param-value&gt;Production&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;javax.faces.DEFAULT_SUFFIX&lt;/param-name&gt; &lt;param-value&gt;.xhtml&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;javax.faces.REFRESH_PERIOD&lt;/param-name&gt; &lt;param-value&gt;0&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;webAppRootKey&lt;/param-name&gt; &lt;param-value&gt;wwjsf-development-null&lt;/param-value&gt; &lt;/context-param&gt; &lt;filter&gt; &lt;filter-name&gt;sitemesh&lt;/filter-name&gt; &lt;filter-class&gt;org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter&gt; &lt;filter-name&gt;charEncodingFilter&lt;/filter-name&gt; &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt; &lt;init-param&gt; &lt;param-name&gt;targetBeanName&lt;/param-name&gt; &lt;param-value&gt;characterEncodingFilter&lt;/param-value&gt; &lt;/init-param&gt; &lt;init-param&gt; &lt;param-name&gt;targetFilterLifecycle&lt;/param-name&gt; &lt;param-value&gt;true&lt;/param-value&gt; &lt;/init-param&gt; &lt;/filter&gt; &lt;filter&gt; &lt;filter-name&gt;urlMapping&lt;/filter-name&gt; &lt;filter-class&gt;org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter&gt; &lt;filter-name&gt;hiddenHttpMethod&lt;/filter-name&gt; &lt;filter-class&gt;org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter&gt; &lt;filter-name&gt;grailsWebRequest&lt;/filter-name&gt; &lt;filter-class&gt;org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;charEncodingFilter&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/filter-mapping&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;hiddenHttpMethod&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt; &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt; &lt;/filter-mapping&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;grailsWebRequest&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt; &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt; &lt;dispatcher&gt;ERROR&lt;/dispatcher&gt; &lt;/filter-mapping&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;sitemesh&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt; &lt;dispatcher&gt;ERROR&lt;/dispatcher&gt; &lt;/filter-mapping&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;urlMapping&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt; &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt; &lt;/filter-mapping&gt; &lt;listener&gt; &lt;listener-class&gt;org.codehaus.groovy.grails.plugins.log4j.web.util.Log4jConfigListener&lt;/listener-class&gt; &lt;/listener&gt; &lt;listener&gt; &lt;listener-class&gt;com.sun.faces.config.ConfigureListener&lt;/listener-class&gt; &lt;/listener&gt; &lt;listener&gt; &lt;listener-class&gt;org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener&lt;/listener-class&gt; &lt;/listener&gt; &lt;servlet&gt; &lt;servlet-name&gt;H2Console&lt;/servlet-name&gt; &lt;servlet-class&gt;org.h2.server.web.WebServlet&lt;/servlet-class&gt; &lt;init-param&gt; &lt;param-name&gt;-webAllowOthers&lt;/param-name&gt; &lt;param-value&gt;true&lt;/param-value&gt; &lt;/init-param&gt; &lt;load-on-startup&gt;2&lt;/load-on-startup&gt; &lt;/servlet&gt; &lt;servlet&gt; &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt; &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;H2Console&lt;/servlet-name&gt; &lt;url-pattern&gt;/dbconsole/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt; &lt;url-pattern&gt;*.xhtml&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;servlet&gt; &lt;servlet-name&gt;grails&lt;/servlet-name&gt; &lt;servlet-class&gt;org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet&lt;/servlet-class&gt; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; &lt;/servlet&gt; &lt;servlet&gt; &lt;servlet-name&gt;gsp&lt;/servlet-name&gt; &lt;servlet-class&gt;org.codehaus.groovy.grails.web.pages.GroovyPagesServlet&lt;/servlet-class&gt; &lt;init-param&gt; &lt;description&gt; Allows developers to view the intermediate source code, when they pass a spillGroovy argument in the URL. &lt;/description&gt; &lt;param-name&gt;showSource&lt;/param-name&gt; &lt;param-value&gt;1&lt;/param-value&gt; &lt;/init-param&gt; &lt;/servlet&gt; &lt;servlet&gt; &lt;servlet-name&gt;grails-errorhandler&lt;/servlet-name&gt; &lt;servlet-class&gt;org.codehaus.groovy.grails.web.servlet.ErrorHandlingServlet&lt;/servlet-class&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;gsp&lt;/servlet-name&gt; &lt;url-pattern&gt;*.gsp&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;grails-errorhandler&lt;/servlet-name&gt; &lt;url-pattern&gt;/grails-errorhandler&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;grails&lt;/servlet-name&gt; &lt;url-pattern&gt;*.dispatch&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.html&lt;/welcome-file&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;welcome-file&gt;index.gsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;error-page&gt; &lt;error-code&gt;500&lt;/error-code&gt; &lt;location&gt;/grails-errorhandler&lt;/location&gt; &lt;/error-page&gt; &lt;jsp-config&gt; &lt;taglib&gt; &lt;taglib-uri&gt;http://java.sun.com/jsp/jstl/core&lt;/taglib-uri&gt; &lt;taglib-location&gt;/WEB-INF/tld/c.tld&lt;/taglib-location&gt; &lt;/taglib&gt; &lt;taglib&gt; &lt;taglib-uri&gt;http://java.sun.com/jsp/jstl/fmt&lt;/taglib-uri&gt; &lt;taglib-location&gt;/WEB-INF/tld/fmt.tld&lt;/taglib-location&gt; &lt;/taglib&gt; &lt;taglib&gt; &lt;taglib-uri&gt;http://www.springframework.org/tags&lt;/taglib-uri&gt; &lt;taglib-location&gt;/WEB-INF/tld/spring.tld&lt;/taglib-location&gt; &lt;/taglib&gt; &lt;taglib&gt; &lt;taglib-uri&gt;http://grails.codehaus.org/tags&lt;/taglib-uri&gt; &lt;taglib-location&gt;/WEB-INF/tld/grails.tld&lt;/taglib-location&gt; &lt;/taglib&gt; &lt;/jsp-config&gt; &lt;/web-app&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload