Yes, that's my problem. from the document, consumer can enable or disable validation itself.
On Wed, Mar 7, 2018 at 3:41 PM jun liu <[email protected]> wrote: > Hi Sunshow, Ian > > I think i have reproduced this problem, the key point is: When we switch > param validation on on provider side, all consumer projects need to add > necessary dependencies explicitly (param validation was force opened on > consumer side). This means provider and consumer are bind together. Is this > exactly your problem, sunshow? > > Should we change this behavior? > > >> I think it is reasonable to check validation conditions on consumer side > >> before params passed to provider side as this can be more efficient. If > we > >> keep it this way, we will meet the problem in your case: all consumers > have > >> to be aware of provider side validation configurations, for example when > >> provider opened validation check, consumer side have to add necessary > >> dependencies. > > > Best regards, > Jun Liu > > > On 7 Mar 2018, at 2:44 PM, Ian Luo <[email protected]> wrote: > > > > Hi Sunshow, > > > > Could you pls. attach a test case to reproduce the issue you described > > here? I'd like to further investigate once I receive the reproducer. > > > > Thanks, > > -Ian. > > > > > > On Wed, Mar 7, 2018 at 2:14 PM, Sunshow <[email protected]> wrote: > > > >> ATT. > >> > >> this case consumer leads to throw > >> > >> Caused by: java.lang.NoClassDefFoundError: javax/validation/Validation > >> > >> even while calling no validation method, unless add all validation > >> dependencies to consumer, > >> > >> that's not awesome, consumer side check should be activated by consumer > >> self. > >> > >> one more question about ValidationFilter: > >> > >> why the condition check is isNotEmpty: > >> ConfigUtils.isNotEmpty(invoker.getUrl().getMethodParameter(invocation. > >> getMethodName(), > >> Constants.VALIDATION_KEY)) > >> > >> and previous version check true or false: > >> if (invoker.getUrl().getMethodParameter(invocation.getMethodName(), > >> Constants.VALIDATION_KEY, false)) > >> > >> > >> Below is the reply from @ken.lj: > >> > >> > >> I think it is reasonable to check validation conditions on consumer side > >> before params passed to provider side as this can be more efficient. If > we > >> keep it this way, we will meet the problem in your case: all consumers > have > >> to be aware of provider side validation configurations, for example when > >> provider opened validation check, consumer side have to add necessary > >> dependencies. > >> > >> Please, send this problem to [email protected], and subscribe to > this > >> email address <https://github.com/alibaba/dubbo/issues/1393>. We can > >> decide > >> which way to go after a full discussion. > >> > >
