nocache.js Not Found

Hello,

I have had to recreate my development environment and now an Eclipse Maven Vaadin 8.1.0 project that previously worked correctly is exhibiting a problem when the first web page is supposed to load:

2019-08-27 22:52:20.244:INFO:oejs.Server:main: Started @1755ms
Aug 27, 2019 10:52:25 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource 
[/VAADIN/widgetsets/ws99c22c5d4a274880e082343cb6f2097e/ws99c22c5d4a274880e082343cb6f2097e.nocache.js] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.

This happens whether I run from Eclipse or I create a runnable jar.

I can see that the missing file is included in the runnable jar that I created in my old development environment, but not in the runnable jar I created in my new development environment.

When I recreated my development environment I switched from Eclipse Neon for JEE to Eclipse 2019-06 for JEE. I also switched from an older version of Java to 11.0.4.

I am not using any custom widgets. I am using the Vaadin context menu, and my POM also has a reference to Vaadin CDI although I am not sure I am using it.

My eclipse project includes a file:

/appliances/target/generated-sources/wscdn/AppWidgetset.java

which contains, among other things:

@Override
public String getWidgetsetName() {
return “ws99c22c5d4a274880e082343cb6f2097e”;
}

I would appreciate any suggestions for resolving this issue.

Thanks.

-Dan

You need to recompile your widgetset as you changed your development environment.

Hi Tatu,

Resolved with your help. Thanks.

-Dan

Hi Tatu,

The problem I am experiencing now is closely related to the problem with which you already helped me, so I thought I would continue this discussion. I hope you don’t mind.

My application runs properly from Eclipse and I can connect to it and use it that way, but when I package it up as a runnable jar and use the runnable jar as the server I encounter the same issue I saw in Eclipse before recompiling the widget set:

dan@psl64b1:~/appliancesjar$ java -jar ./appliances.jar /home/dan/appliances.properties
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
2019-09-28 18:22:26.195:INFO::main: Logging initialized @1597ms
2019-09-28 18:22:26.365:INFO:oejs.Server:main: jetty-9.3.16.v20170120
2019-09-28 18:22:26.550:INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /SME/appliances, did not find org.eclipse.jetty.jsp.JettyJspServlet
2019-09-28 18:22:26.633:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@5d99c6b5{/SME/appliances,file:///home/dan/appliancesjar/,AVAILABLE}
2019-09-28 18:22:27.075:INFO:oejus.SslContextFactory:main: x509=X509@1583741e(server-alias,h=[],w=[]
) for SslContextFactory@5b367418(file:///home/dan/keystore.jks,null)
2019-09-28 18:22:27.270:INFO:oejs.AbstractConnector:main: Started ServerConnector@4ed5eb72{SSL,[ssl, http/1.1]
}{0.0.0.0:8090}
2019-09-28 18:22:27.271:INFO:oejs.Server:main: Started @2674ms
Sep 28, 2019 6:22:44 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource 
[/VAADIN/widgetsets/ws99c22c5d4a274880e082343cb6f2097e/ws99c22c5d4a274880e082343cb6f2097e.nocache.js] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.

I have found the missing file in my dev. environment:

dan@psl64b1:~$ pwd
/home/dan
dan@psl64b1:~$ ls -l ./repos/appliances/SMECustomerAppliances/appliances/target/classes/VAADIN/widgetsets/ws99c22c5d4a274880e082343cb6f2097e/
total 1584
-rw-r--r-- 1 dan dan    7752 Sep 29 07:48 333A66D5307B1C8C9935C59A877F1993.cache.eot
-rw-r--r-- 1 dan dan    7664 Sep 29 07:48 51DCB1D3F3D956ACC80F89D3CF0AC5BE.cache.woff
-rw-r--r-- 1 dan dan 1179488 Sep 29 07:48 C53B0F535B2EB53B19A1D3E3471F3A75.cache.js
-rw-r--r-- 1 dan dan  340643 Sep 29 07:48 C53B0F535B2EB53B19A1D3E3471F3A75.cache.js.gz
-rw-r--r-- 1 dan dan   21402 Sep 29 07:48 C81F8CA7CA7012F31BDE883DF6C99E61.cache.svg
-rw-r--r-- 1 dan dan      43 Sep 29 07:48 clear.cache.gif
-rw-r--r-- 1 dan dan    1161 Sep 29 07:48 compilation-mappings.txt
-rw-r--r-- 1 dan dan    7588 Sep 29 07:48 D03281BC3FDB49177B485D1DC10A13C4.cache.ttf
drwxr-xr-x 3 dan dan    4096 Sep 29 07:48 deferredjs
-rw-r--r-- 1 dan dan   15021 Sep 29 07:48 ws99c22c5d4a274880e082343cb6f2097e.devmode.js
-rw-r--r-- 1 dan dan    4666 Sep 29 07:48 ws99c22c5d4a274880e082343cb6f2097e.devmode.js.gz
-rw-r--r-- 1 dan dan    7704 Sep 29 07:48 ws99c22c5d4a274880e082343cb6f2097e.nocache.js
-rw-r--r-- 1 dan dan    2969 Sep 29 07:48 ws99c22c5d4a274880e082343cb6f2097e.nocache.js.gz
dan@psl64b1:~$ 

It is not in my jar:

dan@psl64b1:~/appliancesjar$ jar -tvf appliances.jar | grep ws99
dan@psl64b1:~/appliancesjar$ 

I have noticed that my project and jar contain a VAADIN/themes directory but not a VAADIN/widgetset directory:

dan@psl64b1:~/appliancesjar$ jar -tvf appliances.jar | grep VAADIN
     0 Sat Sep 14 17:01:14 BST 2019 resources/VAADIN/
     0 Sat Sep 14 17:01:14 BST 2019 resources/VAADIN/themes/
     0 Sat Sep 14 17:01:14 BST 2019 resources/VAADIN/themes/mytheme/
   230 Sat Sep 14 19:13:56 BST 2019 resources/VAADIN/themes/mytheme/addons.scss
 32988 Sat Sep 14 17:01:14 BST 2019 resources/VAADIN/themes/mytheme/favicon.ico
  1335 Sat Sep 14 17:01:14 BST 2019 resources/VAADIN/themes/mytheme/mytheme.scss
343812 Sat Sep 14 19:13:28 BST 2019 resources/VAADIN/themes/mytheme/styles.css
   255 Sat Sep 14 17:01:14 BST 2019 resources/VAADIN/themes/mytheme/styles.scss
dan@psl64b1:~/appliancesjar$

I guess this may be a build problem and not a Vaadin problem.

Thanks very much for your help.

-Dan