1

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.
user3702643
  • 1,465
  • 5
  • 21
  • 48
  • i had a similar problem recently in a grails using forked execution. i can not tell you what is causing this, but as you are deploying your prod server anywhay: when vaadin runs production mode it wont compile SASS files anyway and you would have to provide the build css files. – cfrick Jul 01 '14 at 14:08
  • But the thing is I am getting this problem despite setting production mode = false in my code. – user3702643 Jul 01 '14 at 14:34
  • what i mean is, that you should compile the css for deploying. once your app runs in production mode, sass compilation will not work. – cfrick Jul 01 '14 at 14:52
  • Oh I see. Do you have any good links that teach how to do this with Vaadin? – user3702643 Jul 01 '14 at 15:02
  • 1
    check https://vaadin.com/book/vaadin7/-/page/themes.sass.html `Compiling SASS Themes` – cfrick Jul 01 '14 at 15:17

1 Answers1

4

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

Fabri Pautasso
  • 485
  • 6
  • 17