Vaadin 在 NetBeans 中编译小部件(插件)

发布于 2024-12-10 23:33:42 字数 8664 浏览 0 评论 0原文

我正在按照提供的说明进行操作,但无法正常工作。我收到此错误:

INFO: Widgetsets found from classpath:
com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:Z:/vaadin/vaadin-6.7.1.jar!/
org.vaadin.peter.contextmenu.ContextmenuWidgetset in jar:file:Z:/NetBeans/Xinco/2.01.xx/XincoLibs/ContextMenu3.1.0.jar!/

getAvailableWidgetSets
INFO: Search took 12ms
Exception in thread "main" java.io.IOException: The filename, directory name, or volume     label syntax is incorrect
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:414)
at java.io.File.getCanonicalPath(File.java:589)
at com.vaadin.terminal.gwt.widgetsetutils.WidgetSetBuilder.updateWidgetSet(WidgetSetBuilder.java:79)
at com.vaadin.terminal.gwt.widgetsetutils.WidgetSetBuilder.main(WidgetSetBuilder.java:52)

我发现了相关错误,但已报告很长时间而尚未修复。除了自己检查/修改代码之外还有什么想法吗?

编辑:仔细查看输出,我注意到了这个错误:

Compiling module org.vaadin.peter.contextmenu.ContextmenuWidgetset
Validating newly compiled units
  [ERROR] Errors in 'file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/Vaadin%20Addons/ContextMenu3-1-0/org/vaadin/peter/contextmenu/client/ui/VContextMenu.java'
     [ERROR] Line 1: The declared package "org.vaadin.peter.contextmenu.client.ui" does not match the expected package "ContextMenu3-1-0.org.vaadin.peter.contextmenu.client.ui"
     [ERROR] Line 5: The import org.vaadin.peter.contextmenu.client cannot be resolved
     [ERROR] Line 125: VMenuItem cannot be resolved to a type
     [ERROR] Line 174: VMenuItem cannot be resolved to a type
  [ERROR] Errors in 'file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/Vaadin%20Addons/ContextMenu3-1-0/org/vaadin/peter/contextmenu/client/ui/VMenu.java'
     [ERROR] Line 1: The declared package "org.vaadin.peter.contextmenu.client.ui" does not match the expected package "ContextMenu3-1-0.org.vaadin.peter.contextmenu.client.ui"
     [ERROR] Line 219: The method itemClicked(VMenuItem) from the type VContextMenu refers to the missing type VMenuItem
     [ERROR] Line 229: The method itemClicked(VMenuItem) from the type VContextMenu refers to the missing type VMenuItem
     [ERROR] Line 239: The method itemClicked(VMenuItem) from the type VContextMenu refers to the missing type VMenuItem
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/com/google/gwt/editor/client/EditorDriver.java'
     [ERROR] Line 20: The import javax.validation.ConstraintViolation cannot be resolved
     [ERROR] Line 97: ConstraintViolation cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/com/google/gwt/editor/client/impl/AbstractSimpleBeanEditorDriver.java'
     [ERROR] Line 28: Name clash: The method setConstraintViolations(Iterable<ConstraintViolation<?>>) of type BaseEditorDriver<T,E> has the same erasure as setConstraintViolations(Iterable<ConstraintViolation<?>>) of type EditorDriver<T> but does not override it
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/com/google/gwt/editor/client/impl/BaseEditorDriver.java'
     [ERROR] Line 31: The import javax.validation.ConstraintViolation cannot be resolved
     [ERROR] Line 67: ConstraintViolation cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/com/google/gwt/editor/client/impl/SimpleViolation.java'
     [ERROR] Line 25: The import javax.validation.ConstraintViolation cannot be resolved
     [ERROR] Line 40: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 43: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 44: Missing code implementation in the compiler
     [ERROR] Line 49: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 49: Missing code implementation in the compiler
     [ERROR] Line 70: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 72: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 73: ConstraintViolation<?> cannot be resolved to a type
     [ERROR] Line 77: ConstraintViolation<capture#2-of ?> cannot be resolved to a type
     [ERROR] Line 81: ConstraintViolation<capture#3-of ?> cannot be resolved to a type
     [ERROR] Line 89: ConstraintViolation<capture#4-of ?> cannot be resolved to a type
     [ERROR] Line 93: ConstraintViolation<capture#5-of ?> cannot be resolved to a type
     [ERROR] Line 98: ConstraintViolation cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/com/google/gwt/editor/client/testing/MockSimpleBeanEditorDriver.java'
     [ERROR] Line 26: The import javax.validation.ConstraintViolation cannot be resolved
     [ERROR] Line 35: The type MockSimpleBeanEditorDriver<T,E> must implement the inherited abstract method EditorDriver<T>.setConstraintViolations(Iterable<ConstraintViolation<?>>)
     [ERROR] Line 107: Name clash: The method setConstraintViolations(Iterable<ConstraintViolation<?>>) of type MockSimpleBeanEditorDriver<T,E> has the same erasure as setConstraintViolations(Iterable<ConstraintViolation<?>>) of type EditorDriver<T> but does not override it
     [ERROR] Line 108: ConstraintViolation cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/javax/validation/super/javax/validation/Configuration.java'
     [ERROR] Line 93: TraversableResolver cannot be resolved to a type
     [ERROR] Line 105: ConstraintValidatorFactory cannot be resolved to a type
     [ERROR] Line 182: TraversableResolver cannot be resolved to a type
     [ERROR] Line 182: No source code is available for type TraversableResolver; did you forget to inherit a required module?
     [ERROR] Line 194: ConstraintValidatorFactory cannot be resolved to a type
     [ERROR] Line 194: No source code is available for type ConstraintValidatorFactory; did you forget to inherit a required module?
     [ERROR] Line 202: ValidatorFactory cannot be resolved to a type
     [ERROR] Line 202: No source code is available for type ValidatorFactory; did you forget to inherit a required module?
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/javax/validation/ConstraintViolationException_CustomFieldSerializer.java'
     [ERROR] Line 30: ConstraintViolationException cannot be resolved to a type
     [ERROR] Line 34: ConstraintViolationException cannot be resolved to a type
     [ERROR] Line 34: No source code is available for type ConstraintViolationException; did you forget to inherit a required module?
     [ERROR] Line 39: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 39: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 40: ConstraintViolationException cannot be resolved to a type
     [ERROR] Line 44: ConstraintViolationException cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/javax/validation/super/javax/validation/MessageInterpolator.java'
     [ERROR] Line 21: The import javax.validation.metadata cannot be resolved
     [ERROR] Line 66: ConstraintDescriptor cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/javax/validation/super/javax/validation/constraints/Pattern.java'
     [ERROR] Line 30: The import javax.validation.Constraint cannot be resolved
     [ERROR] Line 31: The import javax.validation.Payload cannot be resolved
     [ERROR] Line 49: Constraint cannot be resolved to a type
     [ERROR] Line 49: The attribute validatedBy is undefined for the annotation type Constraint
     [ERROR] Line 75: Payload cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/javax/validation/super/javax/validation/spi/ConfigurationState.java'
     [ERROR] Line 22: The import javax.validation.ConstraintValidatorFactory cannot be resolved
     [ERROR] Line 24: The import javax.validation.TraversableResolver cannot be resolved
     [ERROR] Line 93: ConstraintValidatorFactory cannot be resolved to a type
     [ERROR] Line 107: TraversableResolver cannot be resolved to a type

我发现这篇关于这个问题的文章指出了库不匹配,但我正在使用 Vaadin SCM 中的 jar 来获得正确的版本:https://vaadin.com/forum/-/message_boards/view_message/384826

I'm following the provided instructions but is not working. I'm getting this error:

INFO: Widgetsets found from classpath:
com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:Z:/vaadin/vaadin-6.7.1.jar!/
org.vaadin.peter.contextmenu.ContextmenuWidgetset in jar:file:Z:/NetBeans/Xinco/2.01.xx/XincoLibs/ContextMenu3.1.0.jar!/

getAvailableWidgetSets
INFO: Search took 12ms
Exception in thread "main" java.io.IOException: The filename, directory name, or volume     label syntax is incorrect
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:414)
at java.io.File.getCanonicalPath(File.java:589)
at com.vaadin.terminal.gwt.widgetsetutils.WidgetSetBuilder.updateWidgetSet(WidgetSetBuilder.java:79)
at com.vaadin.terminal.gwt.widgetsetutils.WidgetSetBuilder.main(WidgetSetBuilder.java:52)

I found a related bug but it's been reported for a long time without fix yet. Any ideas besides checking/modifying the code myself?

Edit: Looking closer at the output I noticed this errors:

Compiling module org.vaadin.peter.contextmenu.ContextmenuWidgetset
Validating newly compiled units
  [ERROR] Errors in 'file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/Vaadin%20Addons/ContextMenu3-1-0/org/vaadin/peter/contextmenu/client/ui/VContextMenu.java'
     [ERROR] Line 1: The declared package "org.vaadin.peter.contextmenu.client.ui" does not match the expected package "ContextMenu3-1-0.org.vaadin.peter.contextmenu.client.ui"
     [ERROR] Line 5: The import org.vaadin.peter.contextmenu.client cannot be resolved
     [ERROR] Line 125: VMenuItem cannot be resolved to a type
     [ERROR] Line 174: VMenuItem cannot be resolved to a type
  [ERROR] Errors in 'file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/Vaadin%20Addons/ContextMenu3-1-0/org/vaadin/peter/contextmenu/client/ui/VMenu.java'
     [ERROR] Line 1: The declared package "org.vaadin.peter.contextmenu.client.ui" does not match the expected package "ContextMenu3-1-0.org.vaadin.peter.contextmenu.client.ui"
     [ERROR] Line 219: The method itemClicked(VMenuItem) from the type VContextMenu refers to the missing type VMenuItem
     [ERROR] Line 229: The method itemClicked(VMenuItem) from the type VContextMenu refers to the missing type VMenuItem
     [ERROR] Line 239: The method itemClicked(VMenuItem) from the type VContextMenu refers to the missing type VMenuItem
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/com/google/gwt/editor/client/EditorDriver.java'
     [ERROR] Line 20: The import javax.validation.ConstraintViolation cannot be resolved
     [ERROR] Line 97: ConstraintViolation cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/com/google/gwt/editor/client/impl/AbstractSimpleBeanEditorDriver.java'
     [ERROR] Line 28: Name clash: The method setConstraintViolations(Iterable<ConstraintViolation<?>>) of type BaseEditorDriver<T,E> has the same erasure as setConstraintViolations(Iterable<ConstraintViolation<?>>) of type EditorDriver<T> but does not override it
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/com/google/gwt/editor/client/impl/BaseEditorDriver.java'
     [ERROR] Line 31: The import javax.validation.ConstraintViolation cannot be resolved
     [ERROR] Line 67: ConstraintViolation cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/com/google/gwt/editor/client/impl/SimpleViolation.java'
     [ERROR] Line 25: The import javax.validation.ConstraintViolation cannot be resolved
     [ERROR] Line 40: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 43: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 44: Missing code implementation in the compiler
     [ERROR] Line 49: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 49: Missing code implementation in the compiler
     [ERROR] Line 70: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 72: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 73: ConstraintViolation<?> cannot be resolved to a type
     [ERROR] Line 77: ConstraintViolation<capture#2-of ?> cannot be resolved to a type
     [ERROR] Line 81: ConstraintViolation<capture#3-of ?> cannot be resolved to a type
     [ERROR] Line 89: ConstraintViolation<capture#4-of ?> cannot be resolved to a type
     [ERROR] Line 93: ConstraintViolation<capture#5-of ?> cannot be resolved to a type
     [ERROR] Line 98: ConstraintViolation cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/com/google/gwt/editor/client/testing/MockSimpleBeanEditorDriver.java'
     [ERROR] Line 26: The import javax.validation.ConstraintViolation cannot be resolved
     [ERROR] Line 35: The type MockSimpleBeanEditorDriver<T,E> must implement the inherited abstract method EditorDriver<T>.setConstraintViolations(Iterable<ConstraintViolation<?>>)
     [ERROR] Line 107: Name clash: The method setConstraintViolations(Iterable<ConstraintViolation<?>>) of type MockSimpleBeanEditorDriver<T,E> has the same erasure as setConstraintViolations(Iterable<ConstraintViolation<?>>) of type EditorDriver<T> but does not override it
     [ERROR] Line 108: ConstraintViolation cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/javax/validation/super/javax/validation/Configuration.java'
     [ERROR] Line 93: TraversableResolver cannot be resolved to a type
     [ERROR] Line 105: ConstraintValidatorFactory cannot be resolved to a type
     [ERROR] Line 182: TraversableResolver cannot be resolved to a type
     [ERROR] Line 182: No source code is available for type TraversableResolver; did you forget to inherit a required module?
     [ERROR] Line 194: ConstraintValidatorFactory cannot be resolved to a type
     [ERROR] Line 194: No source code is available for type ConstraintValidatorFactory; did you forget to inherit a required module?
     [ERROR] Line 202: ValidatorFactory cannot be resolved to a type
     [ERROR] Line 202: No source code is available for type ValidatorFactory; did you forget to inherit a required module?
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/javax/validation/ConstraintViolationException_CustomFieldSerializer.java'
     [ERROR] Line 30: ConstraintViolationException cannot be resolved to a type
     [ERROR] Line 34: ConstraintViolationException cannot be resolved to a type
     [ERROR] Line 34: No source code is available for type ConstraintViolationException; did you forget to inherit a required module?
     [ERROR] Line 39: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 39: ConstraintViolation cannot be resolved to a type
     [ERROR] Line 40: ConstraintViolationException cannot be resolved to a type
     [ERROR] Line 44: ConstraintViolationException cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/javax/validation/super/javax/validation/MessageInterpolator.java'
     [ERROR] Line 21: The import javax.validation.metadata cannot be resolved
     [ERROR] Line 66: ConstraintDescriptor cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/javax/validation/super/javax/validation/constraints/Pattern.java'
     [ERROR] Line 30: The import javax.validation.Constraint cannot be resolved
     [ERROR] Line 31: The import javax.validation.Payload cannot be resolved
     [ERROR] Line 49: Constraint cannot be resolved to a type
     [ERROR] Line 49: The attribute validatedBy is undefined for the annotation type Constraint
     [ERROR] Line 75: Payload cannot be resolved to a type
  [ERROR] Errors in 'jar:file:/Z:/NetBeans/Xinco/3.00.xx/XincoLibs/gwt-user.jar!/javax/validation/super/javax/validation/spi/ConfigurationState.java'
     [ERROR] Line 22: The import javax.validation.ConstraintValidatorFactory cannot be resolved
     [ERROR] Line 24: The import javax.validation.TraversableResolver cannot be resolved
     [ERROR] Line 93: ConstraintValidatorFactory cannot be resolved to a type
     [ERROR] Line 107: TraversableResolver cannot be resolved to a type

I found this post about this issue pointing out to be a library mismatch but I'm using jars from the Vaadin SCM for the correct release: https://vaadin.com/forum/-/message_boards/view_message/384826

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空‖城人不在 2024-12-17 23:33:42

问题终于解决了,希望能解决问题。之后必须将以下 jar 添加到项目中以便可以编译:

  1. validation-api-1.0.0.GA.jarvalidation
  2. -api-1.0.0.GA-sources.jar

Issue finally fixed, hopefully that does the trick. After that had to add the following jars to the project so it could be compiled:

  1. validation-api-1.0.0.GA.jar
  2. validation-api-1.0.0.GA-sources.jar
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文