Requested resource not found error

I’ve faced the next problem.
I have a vaadin application which works perfectly ok after deployment, then after few days I see this in log:

16:25:28,584 INFO [com.vaadin.server.VaadinServlet]
(http–0.0.0.0-443-1) Requested resource
[/VAADIN/widgetsets/en.myapp.AppWidgetSet/en.myapp.AppWidgetSet.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.
16:25:28,584 INFO [com.vaadin.server.VaadinServlet]
(http–0.0.0.0-443-5) Requested resource
[/VAADIN/themes/mytheme/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.

And consequently client side doesn’t work. There were no restarts during those days.
And I’m confused that after initial start of jboss UI works, but after sometime I get this problem and the required static files are at the expected place.

I searched in the internet, however in all topics this error occures just after start and is reproduced easily, which is not my case.

What could be the the source of this error? What could affect the Vaadin Servlet suddently not to find the nocache.js and styles.css where they actually are?
After restart of jboss UI works again.

Thank you.

A pure guess: it’s a JBoss bug that keeps File references open after they aren’t used anymore, eventually exceeding the number of files allowed (no new references can be created).

Have you tried running JBoss with debug logging? You should get much more information using that.

No, when it happened logging wasn’t in debug mode, now I’ve changed to debug but it didn’t reproduce yet (it happened after few weeks of working without restart ).

Thank you, I’ll wait for more logs.

Hello !
Finally the problem reproduced and here are the debug logs.
Could you help to indicate the problem, please ?

12:21:35,776 INFO [com.vaadin.server.VaadinServlet]
(http–0.0.0.0-443-1) Requested resource
[/VAADIN/themes/mytheme/icon.ico] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
12:21:35,779 DEBUG [org.apache.tomcat.util.http.Cookies]
(http–0.0.0.0-443-1) Cookies: Parsing b: JSESSIONID=+qADR2JhQNgbNxGE0DpNZfT3.undefined; __utma=241266590.1425859180.1413802520.1418895651.1418978119.12; __utmz=241266590.1413802520.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
12:21:35,779 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase]
(http–0.0.0.0-443-1) Security checking request GET /myapp/VAADIN/themes/mytheme/styles.css
12:21:35,779 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase]
(http–0.0.0.0-443-1) We have cached auth type FORM for principal GenericPrincipal[ADMIN(Viewer,)]

12:21:35,779 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[Vaadin application]
’ against GET /VAADIN/themes/mytheme/styles.css → false
12:21:35,780 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/themes/mytheme/styles.css → false
12:21:35,780 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/themes/mytheme/styles.css → false
12:21:35,780 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[Vaadin application]
’ against GET /VAADIN/themes/mytheme/styles.css → false
12:21:35,780 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/themes/mytheme/styles.css → false
12:21:35,780 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/themes/mytheme/styles.css → false
12:21:35,781 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[Vaadin application]
’ against GET /VAADIN/themes/mytheme/styles.css → false
12:21:35,781 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/themes/mytheme/styles.css → false
12:21:35,781 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/themes/mytheme/styles.css → false
12:21:35,781 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[Vaadin application]
’ against GET /VAADIN/themes/mytheme/styles.css → false
12:21:35,781 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/themes/mytheme/styles.css → false
12:21:35,782 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/themes/mytheme/styles.css → false
12:21:35,782 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) No applicable constraint located
12:21:35,782 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase]
(http–0.0.0.0-443-1) Not subject to any constraint
12:21:35,782 INFO [com.vaadin.server.VaadinServlet]
(http–0.0.0.0-443-1) Requested resource
[/VAADIN/themes/mytheme/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.
12:21:35,814 DEBUG [org.apache.tomcat.util.http.Cookies]
(http–0.0.0.0-443-2) Cookies: Parsing b: JSESSIONID=+qADR2JhQNgbNxGE0DpNZfT3.undefined; __utma=241266590.1425859180.1413802520.1418895651.1418978119.12; __utmz=241266590.1413802520.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
12:21:35,815 DEBUG [org.apache.tomcat.util.http.Cookies]
(http–0.0.0.0-443-1) Cookies: Parsing b: JSESSIONID=+qADR2JhQNgbNxGE0DpNZfT3.undefined; __utma=241266590.1425859180.1413802520.1418895651.1418978119.12; __utmz=241266590.1413802520.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
12:21:35,815 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase]
(http–0.0.0.0-443-2) Security checking request GET /myapp/VAADIN/widgetsets/en.myapp.AppWidgetSet/en.myapp.AppWidgetSet.nocache.js
12:21:35,815 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase]
(http–0.0.0.0-443-1) Security checking request POST /myapp/secure/
12:21:35,816 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase]
(http–0.0.0.0-443-2) We have cached auth type FORM for principal GenericPrincipal[ADMIN(Viewer,)]

12:21:35,816 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase]
(http–0.0.0.0-443-1) We have cached auth type FORM for principal GenericPrincipal[ADMIN(Viewer,)]

12:21:35,816 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-2) Checking constraint 'SecurityConstraint[Vaadin application]
’ against GET /VAADIN/widgetsets/en.myapp.AppWidgetSet/en.myapp.AppWidgetSet.nocache.js → false
12:21:35,816 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[Vaadin application]
’ against POST /secure/ → true
12:21:35,816 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-2) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/widgetsets/en.myapp.AppWidgetSet/en.myapp.AppWidgetSet.nocache.js → false
12:21:35,817 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[null]
’ against POST /secure/ → false
12:21:35,817 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-2) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/widgetsets/en.myapp.AppWidgetSet/en.myapp.AppWidgetSet.nocache.js → false
12:21:35,817 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[null]
’ against POST /secure/ → false
12:21:35,817 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-2) Checking constraint 'SecurityConstraint[Vaadin application]
’ against GET /VAADIN/widgetsets/en.myapp.AppWidgetSet/en.myapp.AppWidgetSet.nocache.js → false
12:21:35,817 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[Vaadin application]
’ against POST /secure/ → true
12:21:35,818 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-2) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/widgetsets/en.myapp.AppWidgetSet/en.myapp.AppWidgetSet.nocache.js → false
12:21:35,818 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[null]
’ against POST /secure/ → false
12:21:35,818 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-2) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/widgetsets/en.myapp.AppWidgetSet/en.myapp.AppWidgetSet.nocache.js → false
12:21:35,818 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) Checking constraint 'SecurityConstraint[null]
’ against POST /secure/ → false
12:21:35,819 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-2) Checking constraint 'SecurityConstraint[Vaadin application]
’ against GET /VAADIN/widgetsets/en.myapp.AppWidgetSet/en.myapp.AppWidgetSet.nocache.js → false
12:21:35,819 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase]
(http–0.0.0.0-443-1) Calling hasUserDataPermission()
12:21:35,819 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-2) Checking constraint 'SecurityConstraint[null]
’ against GET /VAADIN/widgetsets/en.myapp.AppWidgetSet/en.myapp.AppWidgetSet.nocache.js → false
12:21:35,819 DEBUG [org.apache.catalina.realm.RealmBase]
(http–0.0.0.0-443-1) User data constraint has no restrictions

I want to mention that I use jaas form based authentication with jsp page, maybe the caching problem lies there…

Yes, as the logs say, JBoss security blocks access to all static files; why, I have no idea.

Anna,

Any chance you resolved this problem? I’m facing exactly the same issue but using Jetty not JBoss and no container level security enabled. Same symptoms: the app works fine for a few days and then get the resource not found error.