theme.css problem

Post Reply
UnderRatedDeveloper
Posts: 2
Joined: 20 Mar 2019, 03:46

20 Mar 2019, 23:54

Hello friends,

Code: Select all

javax.faces.FacesException: Error loading css, cannot find "theme.css" resource of "primefaces-roma-" 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:864)
	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:456)
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
	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:647)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
I use Tomcat 8 and jdk8

the pom.xml file has the following dependencies (Added theme jar to local maven)

Code: Select all

<dependencies>
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.faces</artifactId>
            <version>2.2.8</version>
        </dependency>
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>6.2</version>
        </dependency>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.testk.roma</groupId>
            <artifactId>primefaces-roma</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
if I modify the web.xml, I get a page without styles but functional.

Code: Select all

<context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>roma-#{guestPreferences.theme}</param-value>
    </context-param>
Do you have any idea what's going on?
Thanks in advance.

aragorn
Posts: 3718
Joined: 29 Jun 2013, 12:38

21 Mar 2019, 09:21

Do you have guestPreferences.java file in your project? If yes, please check #{guestPreferences.theme} value

UnderRatedDeveloper
Posts: 2
Joined: 20 Mar 2019, 03:46

21 Mar 2019, 14:17

Thank you for answering aragorn,

That was precisely it, after reviewing the documentation I realized.

Thank you very much.

aragorn
Posts: 3718
Joined: 29 Jun 2013, 12:38

22 Mar 2019, 07:50

Glad to hear, thanks a lot !

Best Regards,

Post Reply

Return to “Roma - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest