facebook theme - exception

I am getting the following exception when trying the facebook theme example/


HTTP Status 500 - com.vaadin.server.ServiceException: com.haulmont.cuba.core.global.DevelopmentException: Unable to load theme constants for: 'facebook-theme.properties'

type Exception report

message com.vaadin.server.ServiceException: com.haulmont.cuba.core.global.DevelopmentException: Unable to load theme constants for: 'facebook-theme.properties'

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: com.vaadin.server.ServiceException: com.haulmont.cuba.core.global.DevelopmentException: Unable to load theme constants for: 'facebook-theme.properties'
	com.vaadin.server.VaadinServlet.service(VaadinServlet.java:371)
	com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:278)
	com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:187)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:108)
	com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:95)
root cause

com.vaadin.server.ServiceException: com.haulmont.cuba.core.global.DevelopmentException: Unable to load theme constants for: 'facebook-theme.properties'
	com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1479)
	com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1436)
	com.vaadin.server.VaadinServlet.service(VaadinServlet.java:369)
	com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:278)
	com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:187)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:108)
	com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:95)
root cause

com.haulmont.cuba.core.global.DevelopmentException: Unable to load theme constants for: 'facebook-theme.properties'
	com.haulmont.cuba.gui.theme.ThemeConstantsRepository.loadThemeProperties(ThemeConstantsRepository.java:100)
	com.haulmont.cuba.gui.theme.ThemeConstantsRepository.init(ThemeConstantsRepository.java:79)
	com.haulmont.cuba.gui.theme.ThemeConstantsRepository.checkInitialized(ThemeConstantsRepository.java:57)
	com.haulmont.cuba.gui.theme.ThemeConstantsRepository.getAvailableThemes(ThemeConstantsRepository.java:151)
	com.haulmont.cuba.web.sys.CubaUIProvider.getTheme(CubaUIProvider.java:60)
	com.vaadin.server.BootstrapHandler.getThemeName(BootstrapHandler.java:729)
	com.vaadin.server.communication.ServletBootstrapHandler.getThemeName(ServletBootstrapHandler.java:44)
	com.vaadin.server.BootstrapHandler.findAndEscapeThemeName(BootstrapHandler.java:739)
	com.vaadin.server.BootstrapHandler$BootstrapContext.getThemeName(BootstrapHandler.java:117)
	com.vaadin.server.BootstrapHandler.setupMainDiv(BootstrapHandler.java:501)
	com.vaadin.server.BootstrapHandler.synchronizedHandleRequest(BootstrapHandler.java:262)
	com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
	com.haulmont.cuba.web.sys.CubaVaadinServletService$CubaServletBootstrapHandler.handleRequest(CubaVaadinServletService.java:279)
	com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1424)
	com.vaadin.server.VaadinServlet.service(VaadinServlet.java:369)
	com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:278)
	com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:187)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:108)
	com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:95)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.35 logs.

Apache Tomcat/8.0.35

I have attached the app, not sure where did I made a mistake, thanks for any help.

demo-lookAndFeel.zip (10.6M)

Hi,

I Have looked at your project.

The exception occurs, by the reason the ‘‘facebook-theme.properties’’ file was not found.
As written in the documentation it should be created in the src directory of the web module. But in your project, it is located in the ‘’\com\company\demolookandfeel’’.

To solve the problem move the file to src, or specify the correct path to it in web-app.properties:


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

Regards.

Thank you.
Please note that, teh Studio is creating the extension of new theme under the location you see in my project. If that location is not appropriate or needs necessary update in web=app.properties, would you please update the studio accordingly?

fb_theme

Hi,

Studio intentionally generates theme extension in that location.
Since Platform 6.3, themes from application components are inherited by extension. So the created files should be put into a package: if to create them in the src folder, files with the same name (but from different components) will conflict during deployment to server.