2011-12-02 106 views
3

我一直在6.7.2上开发相​​当长一段时间,昨天我注意到我的应用程序的怪异外观版本。我去调试版本,发现这个:Vaadin警告:widgetset版本6.7.2似乎不匹配主题版本

Starting Vaadin client side engine. Widgetset: Xinco 
Widget set is built on version: 6.7.2 
Warning: widgetset version 6.7.2 does not seem to match theme version 
Starting application xincovaadin-1652339780 
Vaadin application servlet version: 6.7.2 
Application version: NONVERSIONED 
inserting load indicator 
Making UIDL Request with params: init 
Server visit took 30ms 
JSON parsing took 0ms 
Assuming CSS loading is not complete, postponing render phase. (.v-loading-indicator height == 0) 

我该如何解决这个问题?我尝试重建我的小部件没有运气。上面的第11行重复了很多次。

参见:https://vaadin.com/forum/-/message_boards/view_message/953384

编辑:

从萤火虫:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"> 
<style type="text/css"> 
<link href="/xinco/VAADIN/themes/xinco/favicon.ico" type="image/vnd.microsoft.icon" rel="shortcut icon"> 
<link href="/xinco/VAADIN/themes/xinco/favicon.ico" type="image/vnd.microsoft.icon" rel="icon"> 
<title>Xinco</title> 
<link rel="stylesheet" type="text/css" href="/xinco/VAADIN/themes/xinco/styles.css"> 
<link rel="stylesheet" href="http://localhost:8084/xinco/VAADIN/widgetsets/Xinco/easyuploads.css"> 
<link rel="stylesheet" href="http://localhost:8084/xinco/VAADIN/widgetsets/Xinco/expandingtextarea/expandingtextarea.css"> 
<link rel="stylesheet" href="http://localhost:8084/xinco/VAADIN/widgetsets/Xinco/stepper/stepper.css"> 
</head> 
<body class="v-generated-body v-ff v-ff8 v-ff80 v-gecko v-win" scroll="auto"> 
<script type="text/javascript"> 
<iframe id="__gwt_historyFrame" src="javascript:false" style="position:absolute;width:0;height:0;border:0;overflow:hidden;" tabindex="-1"> 
<script src="/xinco/VAADIN/widgetsets/Xinco/Xinco.nocache.js?1323124855776" language="javascript"> 
<script src="http://localhost:8084/xinco/VAADIN/widgetsets/Xinco/swfupload.js" language="javascript"> 
<script defer="defer"> 
<script type="text/javascript"> 
<script type="text/javascript"> 
<div id="xincovaadin-1652339780" class="v-app v-theme-xinco v-app-Xinco"> 
<noscript>You have to enable javascript in your browser to use an application built with Vaadin.</noscript> 
<iframe id="Xinco" src="javascript:''" style="position: absolute; width: 0pt; height: 0pt; border: medium none;" tabindex="-1"> 
</body> 
</html> 

这是我所看到的在看网页的源文件时:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
<style type="text/css">html, body {height:100%;margin:0;}</style><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="/xinco/VAADIN/themes/xinco/favicon.ico" /><link rel="icon" type="image/vnd.microsoft.icon" href="/xinco/VAADIN/themes/xinco/favicon.ico" /><title>Xinco</title> 
</head> 
<body scroll="auto" class="v-generated-body"> 
<script type="text/javascript"> 
//<![CDATA[ 
if(!vaadin || !vaadin.vaadinConfigurations) { 
if(!vaadin) { var vaadin = {}} 
vaadin.vaadinConfigurations = {}; 
if (!vaadin.themesLoaded) { vaadin.themesLoaded = {}; } 
vaadin.debug = true; 
document.write('<iframe tabIndex="-1" id="__gwt_historyFrame" style="position:absolute;width:0;height:0;border:0;overflow:hidden;" src="javascript:false"></iframe>'); 
document.write("<script language='javascript' src='/xinco/VAADIN/widgetsets/Xinco/Xinco.nocache.js?1323183529006'><\/script>"); 
} 
vaadin.vaadinConfigurations["xincovaadin-1652339780"] = {appUri:'/xinco/vaadin', standalone: true, themeUri:"/xinco/VAADIN/themes/xinco", versionInfo : {vaadinVersion:"6.7.2",applicationVersion:"NONVERSIONED"},"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}}; 
//]]> 
</script> 
<script type="text/javascript"> 
//<![CDATA[ 
if(!vaadin.themesLoaded['xinco']) { 
var stylesheet = document.createElement('link'); 
stylesheet.setAttribute('rel', 'stylesheet'); 
stylesheet.setAttribute('type', 'text/css'); 
stylesheet.setAttribute('href', '/xinco/VAADIN/themes/xinco/styles.css'); 
document.getElementsByTagName('head')[0].appendChild(stylesheet); 
vaadin.themesLoaded['xinco'] = true; 
} 
//]]> 
</script> 
<script type="text/javascript"> 
//<![CDATA[ 
setTimeout('if (typeof Xinco == "undefined") {alert("Failed to load the widgetset: /xinco/VAADIN/widgetsets/Xinco/Xinco.nocache.js?1323183529006")};',15000); 
//]]> 
</script> 
<div id="xincovaadin-1652339780" class="v-app v-theme-xinco v-app-Xinco" ><div class="v-app-loading"></div></div> 
<noscript>You have to enable javascript in your browser to use an application built with Vaadin.</noscript></body> 
</html> 

源代码可以从fr下载om here。该项目是一个NetBeans项目。

回答

4

你使用哪个主题?假设它是一个自定义主题,如果您使用默认主题,错误消息会消失吗?

还要确保:

  • 清理您的项目和应用程序服务器,并重建项目
  • 您没有两个不同版本的Vaadin JAR在你的WEB-INF/lib目录目录
  • 您还没有复制从旧Vaadin JAR主题目录到VAADIN/themes目录
  • 你(假定)的自定义主题不继承任何旧的主题
  • 如果您在浏览器中检查加载的css文件(当我尝试此操作时Firebug派上用场),styles.css(或其中一个styles.css)包含以下开头部分:

    .v-theme-版本:在{ 内容:“6_7_2”; } .v-theme-version-6_7_2 { display:none; }

我设法生产出此错误的唯一方法就是继承从另一个Vaadin版本的主题自定义主题。

更新: 我检查了你的项目,我想我知道什么是错的。 web.xml中的servlet映射应该读取/ VAADIN/*而不是/ vaadin/*。如果您将主题从您的vaadin.jar复制到项目中的VAADIN /主题,它应该在没有此更改的情况下工作。通常情况下,您还应该复制Vaadin widgetset,但由于您使用的是自定义的widgetset,因此不必执行此操作。

来源:https://vaadin.com/book/-/page/application.environment.html#section.web.web-xml

+0

我有一个自定义主题。我正在导入@import“../chameleon/styles.css”;自定义主题几乎为空,只需添加一个fav图标即可。我查看了我的自定义style.css文件,并且它没有任何地方有6_7_2。我没有Vaadin jar的多个副本,我唯一的主题是我的vaadin-chameleon-theme-1.1.0.jar。我的style.css文件是由chamaleon主题应用程序生成的。 – javydreamercsw

+0

它被命名为style.css或styles.css?它应该是后者。您的导入看起来很好。您是否通过查看HTML源代码来检查浏览器中的6_7_2? – miq

+0

您的自定义styles.css中不应该有6_7_2零件,除非它不是从其他主题继承而是从零开始创建的。您也可以尝试删除vaadin-chameleon-theme-1.1.0.jar。当我在2个操作系统中下载相同的自定义主题时,我注意到一个有趣的事情;在Windows 7中,我获得了my-chameleon.jar,README.txt和vaadin-chameleon-theme-1.1.0.jar,但在Linux Mint中,我只获得了my-chameleon.jar。尝试下载Firebug并检查CSS是否已加载。你应该看到这样的东西:http://dl.dropbox.com/u/9481707/custom_theme.png – miq

0

你是否从vaadin.jar提取了VAADIN/themes文件夹,以便它静态地提供服务?在这种情况下,您需要使用Vaadin 6.7.2的内容更新该目录。

或者,您是否在VAADIN /主题下创建了与您正在使用的Vaadin主题同名的文件夹?

+0

1)我没有提取Vaadin /主题从罐子文件夹中。 2)是的,我做到了。自定义主题几乎为空,只需添加一个fav图标即可。我的style.css文件是由chamaleon主题应用程序生成的。 – javydreamercsw

+0

您的主题文件夹的名称是什么,并且styles.css顶部的导入如何显示? –

+0

这个名字是新科。导入是:@import“../chameleon/styles.css”; – javydreamercsw