我刚从vaadin 7.7.7升级到vaadin 8.3.0。我已经向服务器,主题和客户端添加了兼容包。我可以运行“clean install”或“vaadin:update-widgetset install”,但是当我尝试在eclipse中编译时,使用vaadin widgetset我会遇到很多错误。有很多,我只剪了大部分失败的一部分。
[INFO] Tracing compile failure path for type 'javaemul.internal.HashCodes'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/com/google/gwt/emul/javaemul/internal/HashCodes.java'
[INFO] [ERROR] Line 25: The method getStringHashCode(String) in the type HashCodes is not applicable for the arguments (Object)
[INFO] [ERROR] Line 29: The method hashCode() in the type Boolean is not applicable for the arguments (boolean)
[INFO] Tracing compile failure path for type 'com.vaadin.client.communication.AtmospherePushConnection'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/vaadin/vaadin-client/8.3.1/vaadin-client-8.3.1.jar!/com/vaadin/client/communication/AtmospherePushConnection.java'
[INFO] [ERROR] Line 159: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 153: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 183: Lambda expressions are allowed only at source level 1.8 or above
[INFO] Tracing compile failure path for type 'com.vaadin.client.componentlocator.VaadinFinderLocatorStrategy'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/vaadin/vaadin-client/8.3.1/vaadin-client-8.3.1.jar!/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java'
[INFO] [ERROR] Line 679: Method references are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 674: Method references are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 672: The method stream(Integer[]) is undefined for the type Arrays
[INFO] [ERROR] Line 676: The method stream(Integer[]) is undefined for the type Arrays
[INFO] Tracing compile failure path for type 'com.vaadin.client.ui.VMenuBar'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/vaadin/vaadin-client/8.3.1/vaadin-client-8.3.1.jar!/com/vaadin/client/ui/VMenuBar.java'
[INFO] [ERROR] Line 112: Lambda expressions are allowed only at source level 1.8 or above
[INFO] Tracing compile failure path for type 'com.vaadin.client.widgets.Grid'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/vaadin/vaadin-client/8.3.1/vaadin-client-8.3.1.jar!/com/vaadin/client/widgets/Grid.java'
[INFO] [ERROR] Line 2954: Method references are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 6253: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 3887: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 6571: The method addColumnsSkipSelectionColumnCheck(Collection<Grid.Column<?,T>>, int) in the type Grid<T> is not applicable for the arguments (Set<C>, int)
[INFO] [ERROR] Line 6594: The method forEach((<no type> col) -> {}) is undefined for the type Collection<Grid.Column<?,T>>
[INFO] [ERROR] Line 1033: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 8021: The method addColumnsSkipSelectionColumnCheck(Collection<Grid.Column<?,T>>, int) in the type Grid<T> is not applicable for the arguments (Set<Grid<T>.SelectionColumn>, int)
[INFO] [ERROR] Line 3897: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 6251: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 2957: Method references are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 4026: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 2339: The method getCell(Element) in the type RowContainer is not applicable for the arguments (JavaScriptObject)
[INFO] [ERROR] Line 5988: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 1459: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 3811: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 4074: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 3356: Method references are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 6508: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 8682: Method references are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 1466: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 2946: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 1822: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 1061: The type Grid<T>.EditorRequestImpl<T> must implement the inherited abstract method EditorHandler.EditorRequest<T>.failure(String, Collection<Grid.Column<?,T>>)
[INFO] [ERROR] Line 6594: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 949: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 4558: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 8681: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 6277: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 6247: The method setSelectionModel(SelectionModel<T>) in the type Grid<T> is not applicable for the arguments (SelectionModel.NoSelectionModel<Object>)
[INFO] [ERROR] Line 6591: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 3338: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 1891: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 8681: The method stream() is undefined for the type List<Grid.Column<?,T>>
[INFO] [ERROR] Line 8977: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 6579: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 6591: The method stream() is undefined for the type Collection<Grid.Column<?,T>>
[INFO] [ERROR] Line 1608: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 592: Type mismatch: cannot convert from ArrayList<Grid.Column<?,capture#36-of ?>> to List<Grid.Column<?,?>>
[INFO] [ERROR] Line 6579: The method forEach((<no type> col) -> {}) is undefined for the type Collection<Grid.Column<?,T>>
[INFO] [ERROR] Line 8273: Lambda expressions are allowed only at source level 1.8 or above
[INFO] Tracing compile failure path for type 'java.util.function.IntConsumer'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/com/google/gwt/emul/java/util/function/IntConsumer.java'
[INFO] [ERROR] Line 29: Default methods are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 33: Cannot refer to the non-final local variable after defined in an enclosing scope
[INFO] [ERROR] Line 31: Lambda expressions are allowed only at source level 1.8 or above
[INFO] Tracing compile failure path for type 'com.vaadin.client.ui.tabsheet.TabsheetConnector'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/vaadin/vaadin-client/8.3.1/vaadin-client-8.3.1.jar!/com/vaadin/client/ui/tabsheet/TabsheetConnector.java'
[INFO] [ERROR] Line 37: Lambda expressions are allowed only at source level 1.8 or above
[INFO] Tracing compile failure path for type 'com.vaadin.client.ui.textfield.ValueChangeHandler'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/vaadin/vaadin-client/8.3.1/vaadin-client-8.3.1.jar!/com/vaadin/client/ui/textfield/ValueChangeHandler.java'
[INFO] [ERROR] Line 48: Lambda expressions are allowed only at source level 1.8 or above
[INFO] Tracing compile failure path for type 'com.vaadin.shared.ui.dnd.criteria.Criterion'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/vaadin/vaadin-shared/8.3.1/vaadin-shared-8.3.1.jar!/com/vaadin/shared/ui/dnd/criteria/Criterion.java'
[INFO] [ERROR] Line 180: Method references are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 175: The method stream() is undefined for the type Collection<Payload>
[INFO] [ERROR] Line 180: Type mismatch: cannot convert from Object to boolean
[INFO] [ERROR] Line 176: Lambda expressions are allowed only at source level 1.8 or above
[INFO] Tracing compile failure path for type 'java.util.Optional'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/com/google/gwt/emul/java/util/Optional.java'
[INFO] [ERROR] Line 45: Type mismatch: cannot convert from Optional<capture#2-of ? extends Object> to Optional<T>
[INFO] [ERROR] Line 82: Type mismatch: cannot convert from Optional<capture#9-of ? extends U> to Optional<U>
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/com/google/gwt/emul/java/util/function/Consumer.java'
[INFO] [ERROR] Line 33: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 31: Default methods are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 35: Cannot refer to the non-final local variable after defined in an enclosing scope
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/com/google/gwt/emul/java/util/function/Predicate.java'
[INFO] [ERROR] Line 46: Default methods are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 32: The target type of this expression must be a functional interface
[INFO] [ERROR] Line 31: Static methods are allowed in interfaces only at source level 1.8 or above
[INFO] [ERROR] Line 48: Cannot refer to the non-final local variable other defined in an enclosing scope
[INFO] [ERROR] Line 43: Cannot refer to the non-final local variable other defined in an enclosing scope
[INFO] [ERROR] Line 31: Illegal modifier for the interface method isEqual; only public & abstract are permitted
[INFO] [ERROR] Line 41: Default methods are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 37: Default methods are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 48: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 32: Method references are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 38: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 43: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/com/google/gwt/emul/java/util/function/Function.java'
[INFO] [ERROR] Line 38: Cannot refer to the non-final local variable after defined in an enclosing scope
[INFO] [ERROR] Line 30: Static methods are allowed in interfaces only at source level 1.8 or above
[INFO] [ERROR] Line 41: Default methods are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 31: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 36: Default methods are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 43: Cannot refer to the non-final local variable before defined in an enclosing scope
[INFO] [ERROR] Line 30: Illegal modifier for the interface method identity; only public & abstract are permitted
[INFO] [ERROR] Line 38: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 43: Lambda expressions are allowed only at source level 1.8 or above
[INFO] Tracing compile failure path for type 'java.io.ByteArrayOutputStream'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/google/gwt/gwt-user/2.8.2/gwt-user-2.8.2.jar!/com/google/gwt/emul/java/io/ByteArrayOutputStream.java'
[INFO] [ERROR] Line 196: The method write(byte[], int, int) of type ByteArrayOutputStream must override or implement a supertype method
[INFO] [ERROR] Line 214: The method write(int) of type ByteArrayOutputStream must override or implement a supertype method
[INFO] [ERROR] Line 82: The method close() is undefined for the type OutputStream
[INFO] [ERROR] Line 76: The method close() of type ByteArrayOutputStream must override or implement a supertype method
[INFO] [ERROR] Line 231: The method write(byte[], int, int) is undefined for the type OutputStream
[INFO] Tracing compile failure path for type 'com.vaadin.client.extensions.javascriptmanager.JavaScriptManagerConnector'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/vaadin/vaadin-client/8.3.1/vaadin-client-8.3.1.jar!/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java'
[INFO] [ERROR] Line 41: Lambda expressions are allowed only at source level 1.8 or above
[INFO] Finding entry point classes
[INFO] Tracing compile failure path for type 'com.vaadin.client.ApplicationConfiguration'
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/cristian.lopez/.m2/repository/com/vaadin/vaadin-client/8.3.1/vaadin-client-8.3.1.jar!/com/vaadin/client/ApplicationConfiguration.java'
[INFO] [ERROR] Line 466: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Line 710: Lambda expressions are allowed only at source level 1.8 or above
[INFO] [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.517 s
[INFO] Finished at: 2018-02-14T16:47:06+01:00
[INFO] Final Memory: 18M/434M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:8.3.1:compile (default-cli) on project selektron_Rotapick_TestDB: Command [[
[ERROR] C:\Program Files\Java\jdk1.8.0_111\jre\bin\java -Xmx1G -Dgwt.persistentunitcache=false com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war C:\Users\cristian.lopez\workspace\vaadin_Rotapick_8_Compatibility\target\classes\VAADIN\widgetsets -localWorkers 4 -failOnError -XfragmentCount -1 -sourceLevel auto -gen C:\Users\cristian.lopez\workspace\vaadin_Rotapick_8_Compatibility\target\.generated de.psb_gmbh.visualtools.Visualtools
[ERROR] ]] failed with status 1
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
我已经在我的UI类中添加了@Widgetset(“com.vaadin.v7.Vaadin7WidgetSet”)
在我的pom中,这就是我所拥有的。
<packaging>war</packaging>
<version>1.00.02</version>
<name>selektron</name>
<prerequisites>
<maven>3</maven>
</prerequisites>
<properties>
<vaadin.version>8.3.1</vaadin.version>
<vaadin.plugin.version>8.3.1</vaadin.plugin.version>
<jetty.plugin.version>9.3.9.v20160517</jetty.plugin.version>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<vaadin.widgetset.mode>local</vaadin.widgetset.mode>
</properties>
正如您所看到的,在每个错误或几乎每一个错误中,它都表示“仅在源级别1.8或更高级别允许使用Lambda表达式”。
我希望有人有一个想法
答案 0 :(得分:1)
谢谢大家的快速回答。
我发现vaadin 8和gwt在2.8下的lambda表达式存在问题所以我需要将我的gwt依赖项从2.7.0升级到2.8.0(enter link description here )