Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';GWT应用程序中的t和自定义bean验证程序(编译器错误)_Gwt_Bean Validation_Gwt2_Gwt Gin - Fatal编程技术网

Can';GWT应用程序中的t和自定义bean验证程序(编译器错误)

Can';GWT应用程序中的t和自定义bean验证程序(编译器错误),gwt,bean-validation,gwt2,gwt-gin,Gwt,Bean Validation,Gwt2,Gwt Gin,你们能帮我把GWT应用程序(GWT2.4)中的GIN和定制bean验证器结合起来吗 GWT编译器给了我以下错误: Rebind result 'javax.validation.ValidatorFactory' must be a class Rebind result 'com.google.gwt.validation.client.ProviderValidationMessageResolver' must be a class 我的琴酒模块是这样的 @GinModules(Clie

你们能帮我把GWT应用程序(GWT2.4)中的GIN和定制bean验证器结合起来吗

GWT编译器给了我以下错误:

Rebind result 'javax.validation.ValidatorFactory' must be a class
Rebind result 'com.google.gwt.validation.client.ProviderValidationMessageResolver' must be a class
我的琴酒模块是这样的

@GinModules(ClientGinModule.class)
public interface ClientGinjector extends Ginjector
{
    NewOrderView getOrderView();
}
其中
NewOrderView
只是扩展了
Composite

在模块的
.gwt.xml
中,我有以下说明

<replace-with class="com.mine.courierApp.client.validation.ClientValidatorFactory">
    <when-type-is class="javax.validation.ValidatorFactory"/>
</replace-with>
<replace-with class="com.mine.courierApp.client.validation.ClientValidationMessagesResolver">
    <when-type-is class="com.google.gwt.validation.client.UserValidationMessagesResolver"/>
</replace-with>
尽管错误信息变得更大了,但这并没有起到任何作用:

Rebind result 'javax.validation.ValidatorFactory' must be a class
Rebind result 'javax.validation.ValidatorFactory' must be a class
Cannot proceed due to previous errors
Rebind result 'com.google.gwt.validation.client.ProviderValidationMessageResolver' must be a class
更新:详细的GWT编译器输出:

   [ERROR] Errors in 'jar:file:/C:/work/externals/gwt/gwt-user.jar!/com/google/gwt/validation/client/BaseMessageInterpolator.java'
      [ERROR] Line 96:  Rebind result 'com.google.gwt.validation.client.ProviderValidationMessageResolver' must be a class
   [ERROR] Errors in 'jar:file:/C:/work/externals/gwt/gwt-user.jar!/com/google/gwt/validation/client/GwtValidatorContext.java'
      [ERROR] Line 36:  Rebind result 'javax.validation.ValidatorFactory' must be a class
   [ERROR] Errors in 'jar:file:/C:/work/externals/gwt/gwt-user.jar!/com/google/gwt/validation/client/spi/GwtValidationProvider.java'
      [ERROR] Line 39:  Rebind result 'javax.validation.ValidatorFactory' must be a class
   [ERROR] Cannot proceed due to previous errors

我该怎么办?

结果我不得不定义

<replace-with class="com.mine.courierApp.client.validation.ClientValidatorFactory">
    <when-type-is class="javax.validation.ValidatorFactory"/>
</replace-with>
<replace-with class="com.mine.courierApp.client.validation.ClientValidationMessagesResolver">
    <when-type-is class="com.google.gwt.validation.client.UserValidationMessagesResolver"/>
</replace-with>

在所有gwt模块中,甚至在那些根本不使用验证的模块中

<replace-with class="com.mine.courierApp.client.validation.ClientValidatorFactory">
    <when-type-is class="javax.validation.ValidatorFactory"/>
</replace-with>
<replace-with class="com.mine.courierApp.client.validation.ClientValidationMessagesResolver">
    <when-type-is class="com.google.gwt.validation.client.UserValidationMessagesResolver"/>
</replace-with>