Hi!
I’m using Vaadin 7.5.8 with Tomcat 8.0.23 which works fine.
Recently I encountered a startup problem with later Tomcat versions (8.0.23+).
Application loads vaadinPush.js & vaadinBootstrap.js fine, but vaadinBootstrap throws this error and the app fails to start (no visible errors on page, just endless loading indicator):
Vaadin push loaded
vaadinBootstrap.js?v=7.5.8:14 Vaadin bootstrap loaded
vaadinBootstrap.js?v=7.5.8:14 init application DC2WEB-2010233537 Object {theme: "dc2_webtheme", versionInfo: Object, widgetset: "fi.invian.domacare2.web.DesktopAppWidgetSet", comErrMsg: Object, authErrMsg: Object…}
vaadinBootstrap.js?v=7.5.8:14 loadTheme ./VAADIN/themes/dc2_webtheme 7.5.8
vaadinBootstrap.js?v=7.5.8:14 load widgetset ./VAADIN/widgetsets/fi.dc2.web.DesktopAppWidgetSet/fi.invian.domacare2.web.DesktopAppWidgetSet.nocache.js fi.invian.domacare2.web.DesktopAppWidgetSet
vaadinBootstrap.js?v=7.5.8:14 Fetching root config
vaadinBootstrap.js?v=7.5.8:14 sending request to https://localhost:9001/DC2_WEB/?debug&v-1446636770284
vaadinBootstrap.js?v=7.5.8:14 Got root config response <!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/qtip2/2.2.1/jquery.qtip.min.js"></script>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=11;chrome=1">
<style type="text/css">html, body {height:100%;margin:0;}</style>
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./VAADIN/themes/dc2_webtheme/favicon.ico">
<link rel="icon" type="image/vnd.microsoft.icon" href="./VAADIN/themes/dc2_webtheme/favicon.ico">
<meta name="viewport" content="user-scalable=no,initial-scale=1.0">
<meta name="msapplication-tap-highlight" content="no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
</head>
<body scroll="auto" class=" v-generated-body">
<div id="DC2WEB-2010233537" class=" v-app dc2_webtheme desktopapplication">
<div class=" v-app-loading"></div>
<noscript>
You have to enable javascript in your browser to use an application built with Vaadin.
</noscript>
</div>
<script type="text/javascript" src="./VAADIN/vaadinPush.debug.js?v=7.5.8"></script>
<script type="text/javascript" src="./VAADIN/vaadinBootstrap.js?v=7.5.8"></script>
<script type="text/javascript">//<![CDATA[
if (!window.vaadin) alert("Failed to load the bootstrap javascript: ./VAADIN/vaadinBootstrap.js?v=7.5.8");
if (typeof window.__gwtStatsEvent != 'function') {
vaadin.gwtStatsEvents = ;
window.__gwtStatsEvent = function(event) {vaadin.gwtStatsEvents.push(event); return true;};
}
vaadin.initApplication("DC2WEB-2010233537",{
"theme": "dc2_webtheme",
"versionInfo": {
"vaadinVersion": "7.5.8",
"atmosphereVersion": "2.2.7.vaadin1"
},
"widgetset": "fi.dc2.web.DesktopAppWidgetSet",
"comErrMsg": {
"caption": "Communication problem",
"message": "Take note of any unsaved data, and <u>click here</u> to continue.",
"url": null
},
"authErrMsg": {
"caption": "Authentication problem",
"message": "Take note of any unsaved data, and <u>click here</u> to continue.",
"url": null
},
"sessExpMsg": {
"caption": "Session Expired",
"message": "Take note of any unsaved data, and <u>click here</u> to continue.",
"url": null
},
"vaadinDir": "./VAADIN/",
"debug": true,
"standalone": true,
"heartbeatInterval": 300,
"serviceUrl": "."
,"widgetsetUrl":"./VAADIN/widgetsets/fi.dc2.web.DesktopAppWidgetSet/fi.dc2.web.DesktopAppWidgetSet.nocache.js","offlineEnabled":true});
//]]></script>
</body>
</html>
localhost/:1 Uncaught SyntaxError: Unexpected token <r.onreadystatechange @ vaadinBootstrap.js?v=7.5.8:159
vaadinBootstrap.js?v=7.5.8:14 Widgetset registered fi.dc2.web.DesktopAppWidgetSet
Further debugging reveals that error happens in JSON.parse():
var updatedConfig = JSON.parse(text);
text "<!DOCTYPE html>\n<html>\n <head>\n <script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js\"></script>\n <script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js\"></script>\n <script type=\"text/javascript\" src=\"//cdn.jsdelivr.net/qtip2/2.2.1/jquery.qtip.min.js\"></script>\n <script type=\"text/javascript\" src=\"//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js\"></script>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=11;chrome=1\">\n <style type=\"text/css\">html, body {height:100%;margin:0;}</style>\n <link rel=\"shortcut icon\" type=\"image/vnd.microsoft.icon\" href=\"./VAADIN/themes/dc2_webtheme/favicon.ico\">\n <link rel=\"icon\" type=\"image/vnd.microsoft.icon\" href=\"./VAADIN/themes/dc2_webtheme/favicon.ico\">\n <meta name=\"viewport\" content=\"user-scalable=no,initial-scale=1.0\">\n <meta name=\"msapplication-tap-highlight\" content=\"no\">\n <meta name=\"apple-mobile-web-app-capable\" content=\"yes\">\n <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">\n </head>\n <body scroll=\"auto\" class=\" v-generated-body\">\n <div id=\"DC2WEB-2010233537\" class=\" v-app dc2_webtheme desktopapplication\">\n <div class=\" v-app-loading\"></div>\n <noscript>\n You have to enable javascript in your browser to use an application built with Vaadin.\n </noscript>\n </div>\n <script type=\"text/javascript\" src=\"./VAADIN/vaadinPush.debug.js?v=7.5.8\"></script>\n <script type=\"text/javascript\" src=\"./VAADIN/vaadinBootstrap.js?v=7.5.8\"></script>\n <script type=\"text/javascript\">//<![CDATA[\nif (!window.vaadin) alert(\"Failed to load the bootstrap javascript: ./VAADIN/vaadinBootstrap.js?v=7.5.8\");\nif (typeof window.__gwtStatsEvent != 'function') {\nvaadin.gwtStatsEvents = ;\nwindow.__gwtStatsEvent = function(event) {vaadin.gwtStatsEvents.push(event); return true;};\n}\nvaadin.initApplication(\"DC2WEB-2010233537\",{\n \"theme\": \"dc2_webtheme\",\n \"versionInfo\": {\n \"vaadinVersion\": \"7.5.8\",\n \"atmosphereVersion\": \"2.2.7.vaadin1\"\n },\n \"widgetset\": \"fi.dc2.web.DesktopAppWidgetSet\",\n \"comErrMsg\": {\n \"caption\": \"Tiedonsiirto-ongelma\",\n \"message\": \"Ota tärkeät tiedot muistiin ja jatka painamalla <u>tästä</u>\",\n \"url\": null\n },\n \"authErrMsg\": {\n \"caption\": \"Autentikaatio-ongelma\",\n \"message\": \"Ota tärkeät tiedot muistiin ja jatka painamalla <u>tästä</u>\",\n \"url\": null\n },\n \"sessExpMsg\": {\n \"caption\": \"Istunto aikakatkaistu\",\n \"message\": \"Ota tärkeät tiedot muistiin ja jatka painamalla <u>tästä</u>\",\n \"url\": null\n },\n \"vaadinDir\": \"./VAADIN/\",\n \"debug\": true,\n \"standalone\": true,\n \"heartbeatInterval\": 300,\n \"serviceUrl\": \".\"\n,\"widgetsetUrl\":\"./VAADIN/widgetsets/fi.dc2.web.DesktopAppWidgetSet/fi.dc2.web.DesktopAppWidgetSet.nocache.js\",\"offlineEnabled\":true});\n//]
]></script>\n </body>\n</html>"
The payload contains the vaadin bootstrap HTML code…
I went through
Tomcat changelog
, but couldn’t pinpoint any exact cause.
I have tested that Tomcat 8.0.23 works fine, but 8.0.24 stops working
I also saw a
similar error
posted before, but disabling/reseting browser cache did not solve the issue.
Any pointers would be greatly appreciated!