estou com o seguinte erro
com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException
GRAVE: Error Rendering View[/login.xhtml]
javax.faces.FacesException: Error loading css, cannot find "theme.css" resource of "primefaces-" library
at org.primefaces.renderkit.HeadRenderer.encodeCSS(HeadRenderer.java:149)
at org.primefaces.renderkit.HeadRenderer.encodeBegin(HeadRenderer.java:81)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:865)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
xhtml
<h:outputStylesheet library="primefaces-#{temaBean.tema}"
name="theme.css" />
<div id="cabecalho">
<h:graphicImage library="img" name="logo.png" />
<h:form>
<h:panelGrid columns="2" cellpadding="40">
<p:themeSwitcher value="#{temaBean.tema}"
style="position: absolute; right: 10px;">
<f:selectItems value="#{temaBean.temas}" />
<p:ajax />
</p:themeSwitcher>
</h:panelGrid>
</h:form>
<p:growl id="growl" showDetail="true" autoUpdate="true" sticky="true" />
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:web="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>livraria-2</display-name>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>#{temaBean.tema}</param-value>
</context-param>
</web-app>
TemaBean
package br.com.caelum.livraria.bean;
import java.util.Arrays;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
@ManagedBean
@SessionScoped
public class TemaBean {
private String tema = "vader";
public String getTema() {
return tema;
}
public void setTema(String tema) {
this.tema = tema;
}
public List getTemas() {
return Arrays.asList("afterdark", "afternoon", "afterwork", "black-tie", "blitzer", "bluesky", "bootstrap",
"casablanca", "cruze", "cupertino", "dark-hive", "delta", "dot-luv", "eggplant", "excite-bike", "flick",
"glass-x", "home", "hot-sneaks", "humanity", "le-frog", "midnight", "mint-choc", "overcast",
"pepper-grinder", "redmond", "rocket", "sam", "smoothness", "south-street", "start", "sunny",
"swanky-purse", "trontastic", "ui-darkness", "ui-lightness", "vader");
}
}