为啥我在运行 mvn clean install 时出现 errorRebind 结果“javax.validation.ValidatorFactory”必须是一个类?
Posted
技术标签:
【中文标题】为啥我在运行 mvn clean install 时出现 errorRebind 结果“javax.validation.ValidatorFactory”必须是一个类?【英文标题】:Why I have errorRebind result 'javax.validation.ValidatorFactory' must be a class when i run mvn clean install?为什么我在运行 mvn clean install 时出现 errorRebind 结果“javax.validation.ValidatorFactory”必须是一个类? 【发布时间】:2017-01-25 09:01:00 【问题描述】:我正在开发一个 GWT 应用程序。当我运行 mvn clean install 时出现此错误:
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/pgoran/.m2/repository/com/google/gwt/gwt-user/2.4.0/gwt-user-2.4.0.jar!/com/google/gwt/validation/client/spi/GwtValidationProvider.java'
[INFO] [ERROR] Line 39: Rebind result 'javax.validation.ValidatorFactory' must be a class
[INFO] [ERROR] Errors in 'jar:file:/C:/Users/pgoran/.m2/repository/com/google/gwt/gwt-user/2.4.0/gwt-user-2.4.0.jar!/com/google/gwt/validation/client/BaseMessageInterpolator.java'
[INFO] [ERROR] Line 96: Rebind result 'com.google.gwt.validation.client.ProviderValidationMessageResolver' must be a class
[INFO] [ERROR] Cannot proceed due to previous errors
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40.149 s
[INFO] Finished at: 2017-01-25T09:44:03+01:00
[INFO] Final Memory: 46M/427M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.4.0:compile (default) on project kapua-console: Command [[
[ERROR] C:\Program Files\Java\jdk1.8.0_77\jre\bin\java -Xmx2048m -XX:+UseParallelGC -classpath C:\Users\pgoran\Desktop\kapua\console\src\main\java;C:\Users\pgoran\Desktop\kapua\console\target\generated-sources\gwt;C:\Users\pgoran\Desktop\kapua\console\target\generated-sources\annotations;C:\Users\pgoran\Desktop\kapua\console\src\main\resources;C:\Users\pgoran\Desktop\kapua\console\target\classes;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-guice\0.2.0-SNAPSHOT\kapua-guice-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-commons\0.2.0-SNAPSHOT\kapua-commons-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\persistence\eclipselink\2.6.3\eclipselink-2.6.3.jar;C:\Users\pgoran\.m2\repository\org\eclipse\persistence\javax.persistence\2.1.1\javax.persistence-2.1.1.jar;C:\Users\pgoran\.m2\repository\org\eclipse\persistence\commonj.sdo\2.1.1\commonj.sdo-2.1.1.jar;C:\Users\pgoran\.m2\repository\com\h2database\h2\1.4.192\h2-1.4.192.jar;C:\Users\pgoran\.m2\repository\com\google\inject\guice\4.1.0\guice-4.1.0.jar;C:\Users\pgoran\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\pgoran\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\pgoran\.m2\repository\com\google\guava\guava\19.0\guava-19.0.jar;C:\Users\pgoran\.m2\repository\commons-configuration\commons-configuration\1.9\commons-configuration-1.9.jar;C:\Users\pgoran\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-account-internal\0.2.0-SNAPSHOT\kapua-account-internal-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-account-api\0.2.0-SNAPSHOT\kapua-account-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-service-api\0.2.0-SNAPSHOT\kapua-service-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\io\dropwizard\metrics\metrics-core\3.1.2\metrics-core-3.1.2.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-security-authorization-api\0.2.0-SNAPSHOT\kapua-security-authorization-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-registry-internal\0.2.0-SNAPSHOT\kapua-device-registry-internal-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-call-api\0.2.0-SNAPSHOT\kapua-device-call-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-registry-api\0.2.0-SNAPSHOT\kapua-device-registry-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-message-internal\0.2.0-SNAPSHOT\kapua-message-internal-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\com\sun\xml\bind\jaxb-impl\2.2.5\jaxb-impl-2.2.5.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-user-internal\0.2.0-SNAPSHOT\kapua-user-internal-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-user-api\0.2.0-SNAPSHOT\kapua-user-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-security-shiro\0.2.0-SNAPSHOT\kapua-security-shiro-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-security-authentication-api\0.2.0-SNAPSHOT\kapua-security-authentication-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\apache\shiro\shiro-core\1.2.3\shiro-core-1.2.3.jar;C:\Users\pgoran\.m2\repository\commons-beanutils\commons-beanutils\1.8.3\commons-beanutils-1.8.3.jar;C:\Users\pgoran\.m2\repository\org\springframework\security\spring-security-core\4.1.3.RELEASE\spring-security-core-4.1.3.RELEASE.jar;C:\Users\pgoran\.m2\repository\org\springframework\spring-aop\4.3.2.RELEASE\spring-aop-4.3.2.RELEASE.jar;C:\Users\pgoran\.m2\repository\org\springframework\spring-beans\4.3.2.RELEASE\spring-beans-4.3.2.RELEASE.jar;C:\Users\pgoran\.m2\repository\org\springframework\spring-context\4.3.2.RELEASE\spring-context-4.3.2.RELEASE.jar;C:\Users\pgoran\.m2\repository\org\springframework\spring-core\4.3.2.RELEASE\spring-core-4.3.2.RELEASE.jar;C:\Users\pgoran\.m2\repository\org\springframework\spring-expression\4.3.2.RELEASE\spring-expression-4.3.2.RELEASE.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-call-kura\0.2.0-SNAPSHOT\kapua-device-call-kura-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-transport-api\0.2.0-SNAPSHOT\kapua-transport-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\apache\commons\commons-pool2\2.3\commons-pool2-2.3.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-translator-api\0.2.0-SNAPSHOT\kapua-translator-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\paho\org.eclipse.paho.client.mqttv3\1.1.0\org.eclipse.paho.client.mqttv3-1.1.0.jar;C:\Users\pgoran\.m2\repository\com\google\protobuf\protobuf-java\2.6.1\protobuf-java-2.6.1.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-api\0.2.0-SNAPSHOT\kapua-device-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-message-api\0.2.0-SNAPSHOT\kapua-message-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-commons\0.2.0-SNAPSHOT\kapua-device-commons-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-bundle-internal\0.2.0-SNAPSHOT\kapua-device-bundle-internal-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-bundle-api\0.2.0-SNAPSHOT\kapua-device-bundle-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-command-internal\0.2.0-SNAPSHOT\kapua-device-command-internal-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-command-api\0.2.0-SNAPSHOT\kapua-device-command-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-configuration-internal\0.2.0-SNAPSHOT\kapua-device-configuration-internal-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-configuration-api\0.2.0-SNAPSHOT\kapua-device-configuration-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\joda-time\joda-time\2.9.4\joda-time-2.9.4.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-packages-internal\0.2.0-SNAPSHOT\kapua-device-packages-internal-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-device-packages-api\0.2.0-SNAPSHOT\kapua-device-packages-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-datastore-api\0.2.0-SNAPSHOT\kapua-datastore-api-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-datastore-internal\0.2.0-SNAPSHOT\kapua-datastore-internal-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\elasticsearch\elasticsearch\2.3.4\elasticsearch-2.3.4.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-core\5.5.0\lucene-core-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-backward-codecs\5.5.0\lucene-backward-codecs-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-analyzers-common\5.5.0\lucene-analyzers-common-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-queries\5.5.0\lucene-queries-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-memory\5.5.0\lucene-memory-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-highlighter\5.5.0\lucene-highlighter-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-queryparser\5.5.0\lucene-queryparser-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-sandbox\5.5.0\lucene-sandbox-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-suggest\5.5.0\lucene-suggest-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-misc\5.5.0\lucene-misc-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-join\5.5.0\lucene-join-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-grouping\5.5.0\lucene-grouping-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-spatial\5.5.0\lucene-spatial-5.5.0.jar;C:\Users\pgoran\.m2\repository\org\apache\lucene\lucene-spatial3d\5.5.0\lucene-spatial3d-5.5.0.jar;C:\Users\pgoran\.m2\repository\com\spatial4j\spatial4j\0.5\spatial4j-0.5.jar;C:\Users\pgoran\.m2\repository\org\elasticsearch\securesm\1.0\securesm-1.0.jar;C:\Users\pgoran\.m2\repository\com\carrotsearch\hppc\0.7.1\hppc-0.7.1.jar;C:\Users\pgoran\.m2\repository\org\joda\joda-convert\1.2\joda-convert-1.2.jar;C:\Users\pgoran\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.6.6\jackson-core-2.6.6.jar;C:\Users\pgoran\.m2\repository\com\fasterxml\jackson\dataformat\jackson-dataformat-smile\2.6.6\jackson-dataformat-smile-2.6.6.jar;C:\Users\pgoran\.m2\repository\com\fasterxml\jackson\dataformat\jackson-dataformat-yaml\2.6.6\jackson-dataformat-yaml-2.6.6.jar;C:\Users\pgoran\.m2\repository\org\yaml\snakeyaml\1.15\snakeyaml-1.15.jar;C:\Users\pgoran\.m2\repository\com\fasterxml\jackson\dataformat\jackson-dataformat-cbor\2.6.6\jackson-dataformat-cbor-2.6.6.jar;C:\Users\pgoran\.m2\repository\io\netty\netty\3.10.5.Final\netty-3.10.5.Final.jar;C:\Users\pgoran\.m2\repository\com\ning\compress-lzf\1.0.2\compress-lzf-1.0.2.jar;C:\Users\pgoran\.m2\repository\com\tdunning\t-digest\3.0\t-digest-3.0.jar;C:\Users\pgoran\.m2\repository\org\hdrhistogram\HdrHistogram\2.1.6\HdrHistogram-2.1.6.jar;C:\Users\pgoran\.m2\repository\commons-cli\commons-cli\1.3.1\commons-cli-1.3.1.jar;C:\Users\pgoran\.m2\repository\com\twitter\jsr166e\1.1.0\jsr166e-1.1.0.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-translator-kura-mqtt\0.2.0-SNAPSHOT\kapua-translator-kura-mqtt-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-translator-kapua-kura\0.2.0-SNAPSHOT\kapua-translator-kapua-kura-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\org\eclipse\persistence\org.eclipse.persistence.moxy\2.6.3\org.eclipse.persistence.moxy-2.6.3.jar;C:\Users\pgoran\.m2\repository\org\eclipse\persistence\org.eclipse.persistence.core\2.6.3\org.eclipse.persistence.core-2.6.3.jar;C:\Users\pgoran\.m2\repository\org\eclipse\persistence\org.eclipse.persistence.asm\2.6.3\org.eclipse.persistence.asm-2.6.3.jar;C:\Users\pgoran\.m2\repository\org\glassfish\javax.json\1.0.4\javax.json-1.0.4.jar;C:\Users\pgoran\.m2\repository\org\eclipse\kapua\kapua-transport-mqtt\0.2.0-SNAPSHOT\kapua-transport-mqtt-0.2.0-SNAPSHOT.jar;C:\Users\pgoran\.m2\repository\com\google\gwt\gwt-user\2.4.0\gwt-user-2.4.0.jar;C:\Users\pgoran\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar;C:\Users\pgoran\.m2\repository\com\extjs\gxt\2.2.5\gxt-2.2.5.jar;C:\Users\pgoran\.m2\repository\com\allen-sauer\gwt\log\gwt-log\3.1.8\gwt-log-3.1.8.jar;C:\Users\pgoran\.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\pgoran\.m2\repository\commons-fileupload\commons-fileupload\1.2.2\commons-fileupload-1.2.2.jar;C:\Users\pgoran\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\pgoran\.m2\repository\commons-codec\commons-codec\1.9\commons-codec-1.9.jar;C:\Users\pgoran\.m2\repository\org\apache\sanselan\sanselan\0.97-incubator\sanselan-0.97-incubator.jar;C:\Users\pgoran\.m2\repository\org\apache\velocity\velocity\1.7\velocity-1.7.jar;C:\Users\pgoran\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\pgoran\.m2\repository\commons-lang\commons-lang\2.4\commons-lang-2.4.jar;C:\Users\pgoran\.m2\repository\org\apache\shiro\shiro-web\1.2.3\shiro-web-1.2.3.jar;C:\Users\pgoran\.m2\repository\org\apache\poi\poi\3.7\poi-3.7.jar;C:\Users\pgoran\.m2\repository\org\apache\poi\poi-ooxml\3.7\poi-ooxml-3.7.jar;C:\Users\pgoran\.m2\repository\org\apache\poi\poi-ooxml-schemas\3.7\poi-ooxml-schemas-3.7.jar;C:\Users\pgoran\.m2\repository\org\apache\xmlbeans\xmlbeans\2.3.0\xmlbeans-2.3.0.jar;C:\Users\pgoran\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\pgoran\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0\geronimo-stax-api_1.0_spec-1.0.jar;C:\Users\pgoran\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\pgoran\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar;C:\Users\pgoran\.m2\repository\com\opencsv\opencsv\3.7\opencsv-3.7.jar;C:\Users\pgoran\.m2\repository\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;C:\Users\pgoran\.m2\repository\org\gwtopenmaps\openlayers\gwt-openlayers-client\0.9\gwt-openlayers-client-0.9.jar;C:\Users\pgoran\.m2\repository\org\mortbay\jetty\jetty-util\6.1.26\jetty-util-6.1.26.jar;C:\Users\pgoran\.m2\repository\org\slf4j\slf4j-log4j12\1.7.2\slf4j-log4j12-1.7.2.jar;C:\Users\pgoran\.m2\repository\org\slf4j\slf4j-api\1.7.2\slf4j-api-1.7.2.jar;C:\Users\pgoran\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\pgoran\.m2\repository\com\google\gwt\gwt-user\2.4.0\gwt-user-2.4.0.jar;C:\Users\pgoran\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\Users\pgoran\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar;C:\Users\pgoran\.m2\repository\com\google\gwt\gwt-dev\2.4.0\gwt-dev-2.4.0.jar com.google.gwt.dev.Compiler -gen C:\Users\pgoran\Desktop\kapua\console\target\.generated -logLevel INFO -style OBF -war C:\Users\pgoran\Desktop\kapua\console\target -localWorkers 4 -draftCompile -optimize 9 org.eclipse.kapua.app.console.console
[ERROR] ]] failed with status 1
我在某处读到问题可能是我们实例化了异步接口,我会在我正在做的地方给你我的部分代码:
private ConfigurationEntityServiceAsync configurationEntityServiceAsync = GWT.create(ConfigurationEntityService.class);
这是扩展 RemoteService 的接口(再次,我说我不确定这与接口是否对这个错误很重要):
@RemoteServiceRelativePath("goran")
public interface ConfigurationEntityService extends RemoteService
public GWTConfiguration create(GWTConfigurationCreator gwtConfigurationCreator)
throws GwtKapuaException;
public GWTConfiguration find(String id) throws GwtKapuaException;
public ListLoadResult<GWTConfiguration> findAll() throws GwtKapuaException;
public GWTConfiguration update(GWTConfiguration configuration) throws GwtKapuaException;
public void delete(String id) throws GwtKapuaException;
有人可以帮助我吗?提前致谢。
【问题讨论】:
当 GWT 编译器运行时,javax.validation.ValidatorFactory
在类路径上吗?
不,它不在类路径中。
【参考方案1】:
确保在运行编译器时 GWT 需要的所有类都在类路径中。 GWT 需要检查类字节码以生成必要的 javascript。
【讨论】:
到昨天一切正常,我什么都没改,真不知道为什么会出现这个问题。 @Atenica 检查您的版本控制是否有您不记得的所有更改 :-) 其中一个破坏了您的项目。 好吧,我没有版本控制 :) 在这种情况下,您现在知道为什么应该考虑它了 :-)【参考方案2】:问题已解决 这个问题非常愚蠢。在生成 ConfigurationEntityServiceAsync 接口后,我添加了更新和删除方法,当我添加此方法时,我选择了选项“在 ConfigurationEntityServiceAsync 中生成删除和更新方法”,并且 Eclipse 没有刷新方法 ConfigurationEntityServiceAsync config= GWT.create(ConfigurationEntityService.class)我的客户端类,所以我删除了我的类广告中的那部分,再次写了它,就是这样!
【讨论】:
以上是关于为啥我在运行 mvn clean install 时出现 errorRebind 结果“javax.validation.ValidatorFactory”必须是一个类?的主要内容,如果未能解决你的问题,请参考以下文章
“mvn clean install”和“mvn clean verify install”有啥区别?
Springboot - 包括 JPA 依赖项并运行“mvn clean install”失败,HikariPool-1 - 池初始化期间出现异常
“mvn clean install”与“mvn install”有何不同?