Deploying Vaadin App in Openshift

2019-08-08 19:27发布

I just created my first Vaadin application. The application works fine on my local server.

I want to upload this app to Openshift.

I followed the instructions here: https://www.openshift.com/kb/kb-e1088-how-to-deploy-pre-compiled-java-applications-war-and-ear-files-onto-your-openshift-gear

The app has been uploaded, but the only thing that is displayed is text. No panels or CSS or anything.

Does anyone have any idea why this is happening?

Thank you!

Console:

Jul 01, 2014 8:39:50 AM com.vaadin.server.VaadinServlet serveOnTheFlyCompiledScss

WARNING: Scss file VAADIN/themes/test/styles.scss exists but ScssStylesheet was
not able to find it

Jul 01, 2014 8:39:50 AM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN

INFO: Requested resource [/VAADIN/themes/test/styles.css] not found from filesystem 
or through class loader. Add widgetset and/or theme JAR to your classpath or
add files to WebContent/VAADIN folder.

1条回答
Ridiculous、
2楼-- · 2019-08-08 20:12

I experienced a similar problem when I tried to deploy a Vaadin application in openshift. It doesn’t matter if you have production mode equals to false, openshift is not compiling the scss to css.

The only way to make the theme work is precompiling the scss and then deploy. To do that you can use the Eclipse plugin or do it through the command line. You can find more information about it here: https://vaadin.com/book/es/-/page/themes.sass.html

查看更多
登录 后发表回答