Facebook theme exception

Hi friends,

I try to make this: https://doc.cuba-platform.com/manual-6.7/web_theme_creation.html

and, I did all in the same way.

But I get this kind of problem:

=================================================================
20:07:56.243 ERROR com.haulmont.cuba.web.AppUI - Unable to init ui
com.haulmont.cuba.core.global.DevelopmentException: Unable to load theme constants for: 'facebook-theme.properties'
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.loadThemeProperties(ThemeConstantsRepository.java:100) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.init(ThemeConstantsRepository.java:79) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.checkInitialized(ThemeConstantsRepository.java:57) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.getConstants(ThemeConstantsRepository.java:145) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.App.loadTheme(App.java:149) ~[cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.App.init(App.java:245) ~[cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.AppUI.init(AppUI.java:195) ~[cuba-web-6.7.6.jar:6.7.6]
        at com.vaadin.ui.UI.doInit(UI.java:693) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:216) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1436) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:361) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:301) [cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:192) [cuba-web-6.7.6.jar:6.7.6]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [servlet-api.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:8.5.21]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.21]
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.5.21]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.21]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.21]
        at com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:116) [cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:103) [cuba-web-6.7.6.jar:6.7.6]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.21]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.21]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.21]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [catalina.jar:8.5.21]
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.21]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [catalina.jar:8.5.21]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-coyote.jar:8.5.21]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.21]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote.jar:8.5.21]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-coyote.jar:8.5.21]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.21]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.21]
        at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]

does anybody have an idea why?

Would be happy to hear from you soon.

Regards

problem

HI,

It seems that there is an error in step 11:

cuba.themesConfig property should have the following value:

cuba.themeConfig = havana-theme.properties halo-theme.properties /com/company/application/web/facebook-theme.properties

Thank you for reporting this problem, will fix this manual page soon.

When I do like so; I get this kind of error:


WARNING:
=================================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.
=================================================================
22:00:55.515 ERROR com.haulmont.cuba.web.AppUI - Unable to init ui
com.haulmont.cuba.core.global.DevelopmentException: Unable to load theme constants for: '/com/company/application/web/facebook-theme.properties'
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.loadThemeProperties(ThemeConstantsRepository.java:100) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.init(ThemeConstantsRepository.java:79) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.checkInitialized(ThemeConstantsRepository.java:57) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.getConstants(ThemeConstantsRepository.java:145) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.App.loadTheme(App.java:149) ~[cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.App.init(App.java:245) ~[cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.AppUI.init(AppUI.java:195) ~[cuba-web-6.7.6.jar:6.7.6]
        at com.vaadin.ui.UI.doInit(UI.java:693) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:216) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1436) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:361) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:301) [cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:192) [cuba-web-6.7.6.jar:6.7.6]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [servlet-api.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:8.5.21]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.21]
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.5.21]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.21]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.21]
        at com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:116) [cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:103) [cuba-web-6.7.6.jar:6.7.6]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.21]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.21]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.21]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [catalina.jar:8.5.21]
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.21]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [catalina.jar:8.5.21]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-coyote.jar:8.5.21]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.21]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote.jar:8.5.21]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-coyote.jar:8.5.21]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.21]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.21]
        at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
22:00:58.758 ERROR com.haulmont.cuba.web.AppUI - Unable to init ui
com.haulmont.cuba.core.global.DevelopmentException: Unable to load theme constants for: '/com/company/application/web/facebook-theme.properties'
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.loadThemeProperties(ThemeConstantsRepository.java:100) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.init(ThemeConstantsRepository.java:79) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.checkInitialized(ThemeConstantsRepository.java:57) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.getConstants(ThemeConstantsRepository.java:145) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.App.loadTheme(App.java:149) ~[cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.App.init(App.java:245) ~[cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.AppUI.init(AppUI.java:195) ~[cuba-web-6.7.6.jar:6.7.6]
        at com.vaadin.ui.UI.doInit(UI.java:693) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:216) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1436) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:361) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:301) [cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:192) [cuba-web-6.7.6.jar:6.7.6]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [servlet-api.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:8.5.21]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.21]
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.5.21]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.21]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.21]
        at com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:116) [cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:103) [cuba-web-6.7.6.jar:6.7.6]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.21]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.21]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.21]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [catalina.jar:8.5.21]
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.21]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [catalina.jar:8.5.21]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-coyote.jar:8.5.21]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.21]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote.jar:8.5.21]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-coyote.jar:8.5.21]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.21]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.21]
        at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
22:01:00.286 ERROR com.haulmont.cuba.web.AppUI - Unable to init ui
com.haulmont.cuba.core.global.DevelopmentException: Unable to load theme constants for: '/com/company/application/web/facebook-theme.properties'
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.loadThemeProperties(ThemeConstantsRepository.java:100) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.init(ThemeConstantsRepository.java:79) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.checkInitialized(ThemeConstantsRepository.java:57) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.gui.theme.ThemeConstantsRepository.getConstants(ThemeConstantsRepository.java:145) ~[cuba-gui-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.App.loadTheme(App.java:149) ~[cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.App.init(App.java:245) ~[cuba-web-6.7.6.jar:6.7.6]
        at com.haulmont.cuba.web.AppUI.init(AppUI.java:195) ~[cuba-web-6.7.6.jar:6.7.6]
        at com.vaadin.ui.UI.doInit(UI.java:693) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:216) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1436) [vaadin-server-7.7.10.cuba.9.jar:7.7.10.cuba.9]
        at 

it works!

I had to change this name “application”

into “sales”

cuba.themeConfig = havana-theme.properties halo-theme.properties /com/company/sales/web/facebook-theme.properties

Thanks a lot

But I have another question…

I have my stylesheet in scss, functions, mixin and so on…

how can I use them for cuba?

Does anybody can give me some tipps? I have not so much knowledge about this kind of design

You can add your files to themes/facebook and include your SCSS into facebook-ext.scss file inside of the corresponding mixin.

Please use code blocks when you post a very long content such as stack traces. See also https://www.cuba-platform.com/discuss/guidelines

Ok, thanks, I will keep attention for the next post :slight_smile: