我知道有很多关于这个主题的帖子,但大多数人都是3-4岁或与我的问题无关。我甚至不知道是否有人使用vaadin 6(vaadin 7似乎很受欢迎)。
我尝试了很多东西(将依赖项添加到pom,vaadin版本从6.7.1升级到facet到项目)
我非常感谢任何想法,关于解决方案的想法,附上例外和pom.xml,如果需要更多信息,请不要犹豫。
我已经花了差不多一整天来解决这个问题:
异常
Starting GWT compiler
Compiling module applicLiquidator.applicLiquidator.gwt.AppWidgetSet
Validating newly compiled units
[ERROR] Errors in 'jar:file:/C:/Users/Boss/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-user-2.3.0.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:/C:/Users/Boss/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-user-2.3.0.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:/C:/Users/Boss/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-user-2.3.0.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:/C:/Users/Boss/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-user-2.3.0.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:/C:/Users/Boss/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-user-2.3.0.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:/C:/Users/Boss/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-user-2.3.0.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:/C:/Users/Boss/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-user-2.3.0.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:/C:/Users/Boss/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-user-2.3.0.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:/C:/Users/Boss/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-user-2.3.0.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:/C:/Users/Boss/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-user-2.3.0.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
Computing all possible rebind results for 'com.google.gwt.user.client.UserAgentAsserter'
Rebinding com.google.gwt.user.client.UserAgentAsserter
Checking rule <generate-with class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[WARN] Detected warnings related to 'com.google.gwt.editor.client.SimpleBeanEditorDriver'. Are validation-api-<version>.jar and validation-api-<version>-sources.jar on the classpath?
[WARN] Unknown type 'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in deferred binding rule
的pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>applicLiquidator</groupId>
<artifactId>applicLiquidator</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Vaadin JPAContainer Web Application</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<vaadin.version>6.8.13</vaadin.version>
<jpacontainer.version>2.0.0</jpacontainer.version>
<gwt.version>2.3.0</gwt.version>
<gwt.plugin.version>2.3.0-1</gwt.plugin.version>
</properties>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>EclipseLink Repo</id>
<url>http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>jpacontainer-addon-agpl-3.0</artifactId>
<version>${jpacontainer.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>customfield</artifactId>
<version>0.9.3</version>
</dependency>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>beanvalidation-addon</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>filteringtable</artifactId>
<version>0.8.4</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>popupbutton</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.160</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.2.0.Final</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>3.2</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-easymock</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>org.vaadin.addon</groupId>
<artifactId>confirmdialog</artifactId>
<version>1.2.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
答案 0 :(得分:0)
我觉得这是我读过的最强完全排除故障(简短和精确/专业)。我向所有似乎陷入某些问题的人推荐它:
在我的特定情况下,第一个问题是我的 web.xml 中有两个应用程序 :((和仅访问第二个没有' t在参数中设置小部件:(
无论如何,管理编译/依赖问题是为了从命令提示符安装和运行mvn获得解决方法。 (但是,相同的命令,但其他环境)