<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.6.2</li>
<li>Operating System version: docker</li>
<li>Java version: 18</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">服务端开启了validate=true , 依赖也加入了，但是<code class="notranslate">org.hibernate.validator.engine.ConfigurationImpl</code> 都没有这个类，服务调用都时候弄了这个类。</p>
<p dir="auto">已经查阅过的链接<br>
<a href="https://blog.csdn.net/hengyunabc/article/details/71513509" rel="nofollow">https://blog.csdn.net/hengyunabc/article/details/71513509</a></p>
<ol dir="auto">
<li>validate=true</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Failed to invoke remote method: stopNotifyJob, provider: dubbo://10.4.3.136:30001/com.raycloud.notify.api.service.NotifyJobRequest?application=demo-docker&amp;application.version=1.0.0ValidationAutoConfiguration&amp;check=false&amp;dubbo=2.6.2&amp;interface=com.xxxxx.xxxx.xxx.service.xxxxx&amp;methods=xxxx,xxx,xxx&amp;pid=56&amp;register.ip=10.0.0.72&amp;revision=2.0.1&amp;side=consumer&amp;timeout=20000&amp;timestamp=1574320167228&amp;version=2.0.1-vpc, cause: com.alibaba.dubbo.rpc.RpcException: Could not initialize class org.hibernate.validator.engine.ConfigurationImpl
com.alibaba.dubbo.rpc.RpcException: Could not initialize class org.hibernate.validator.engine.ConfigurationImpl
	at com.alibaba.dubbo.validation.filter.ValidationFilter.invoke(ValidationFilter.java:54)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:64)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:42)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:78)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.raycloud.dubbo.rpc.filter.DubboConcurrentMonitor.invoke(DubboConcurrentMonitor.java:58)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.raycloud.eagle.trace.dubbo.DubboInvokeMonitorFilter.invoke(DubboInvokeMonitorFilter.java:78)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:60)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:112)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:38)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:108)
	at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:84)
	at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:170)
	at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:52)
	at com.alibaba.dubbo.remoting.transport.dispather.ChannelEventRunnable.run(ChannelEventRunnable.java:82)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.engine.ConfigurationImpl
	at org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:41)
	at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:269)
	at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:111)
	at com.alibaba.dubbo.validation.support.jvalidation.JValidator.&lt;init&gt;(JValidator.java:86)
	at com.alibaba.dubbo.validation.support.jvalidation.JValidation.createValidator(JValidation.java:31)
	at com.alibaba.dubbo.validation.support.AbstractValidation.getValidator(AbstractValidation.java:38)
	at com.alibaba.dubbo.validation.Validation$Adpative.getValidator(Validation$Adpative.java)
	at com.alibaba.dubbo.validation.filter.ValidationFilter.invoke(ValidationFilter.java:47)
	... 29 more"><pre class="notranslate"><code class="notranslate">Failed to invoke remote method: stopNotifyJob, provider: dubbo://10.4.3.136:30001/com.raycloud.notify.api.service.NotifyJobRequest?application=demo-docker&amp;application.version=1.0.0ValidationAutoConfiguration&amp;check=false&amp;dubbo=2.6.2&amp;interface=com.xxxxx.xxxx.xxx.service.xxxxx&amp;methods=xxxx,xxx,xxx&amp;pid=56&amp;register.ip=10.0.0.72&amp;revision=2.0.1&amp;side=consumer&amp;timeout=20000&amp;timestamp=1574320167228&amp;version=2.0.1-vpc, cause: com.alibaba.dubbo.rpc.RpcException: Could not initialize class org.hibernate.validator.engine.ConfigurationImpl
com.alibaba.dubbo.rpc.RpcException: Could not initialize class org.hibernate.validator.engine.ConfigurationImpl
	at com.alibaba.dubbo.validation.filter.ValidationFilter.invoke(ValidationFilter.java:54)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:64)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:42)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:78)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.raycloud.dubbo.rpc.filter.DubboConcurrentMonitor.invoke(DubboConcurrentMonitor.java:58)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.raycloud.eagle.trace.dubbo.DubboInvokeMonitorFilter.invoke(DubboInvokeMonitorFilter.java:78)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:60)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:112)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:38)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:108)
	at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:84)
	at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:170)
	at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:52)
	at com.alibaba.dubbo.remoting.transport.dispather.ChannelEventRunnable.run(ChannelEventRunnable.java:82)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.engine.ConfigurationImpl
	at org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:41)
	at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:269)
	at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:111)
	at com.alibaba.dubbo.validation.support.jvalidation.JValidator.&lt;init&gt;(JValidator.java:86)
	at com.alibaba.dubbo.validation.support.jvalidation.JValidation.createValidator(JValidation.java:31)
	at com.alibaba.dubbo.validation.support.AbstractValidation.getValidator(AbstractValidation.java:38)
	at com.alibaba.dubbo.validation.Validation$Adpative.getValidator(Validation$Adpative.java)
	at com.alibaba.dubbo.validation.filter.ValidationFilter.invoke(ValidationFilter.java:47)
	... 29 more
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.3</li>
<li>Operating System version: macOS 10.15.1、任意Linux发行版</li>
<li>Java version: 1.8</li>
</ul>
<p dir="auto">参考<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="427559139" data-permission-text="Title is private" data-url="https://github.com/apache/dubbo/issues/3784" data-hovercard-type="issue" data-hovercard-url="/apache/dubbo/issues/3784/hovercard" href="https://github.com/apache/dubbo/issues/3784">#3784</a>，Version.parseInt未再判断字符串的合法性，也未做异常处理</p>
<p dir="auto">该bug还未修复。version从文件名获取，当文件名是dubbo-client.jar，解析得到version = "client" 时，isSupportResponseAttachment(Version.java:102) 中的代码块<br>
if (StringUtils.isEmpty(version)) {<br>
return false;<br>
}<br>
就失效了。<br>
后续Version.parseInt未再判断字符串的合法性，也未做异常处理。<br>
也就是会报错如下：<br>
11/28 15:03:45.504 WARN org.apache.dubbo.remoting.exchange.codec.ExchangeCodec [NettyServerWorker-6-7] [DUBBO] Fail to encode response: Response [id=0, version=client, status=20, event=false, error=null, result=AppResponse [value=cn.pengh.core.rpc.RpcResponse@49995603, exception=null]], send bad_response info instead, cause: For input string: "", dubbo version: 2.7.3, current host: 192.168.6.46<br>
java.lang.NumberFormatException: For input string: ""<br>
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.8.0_201]<br>
at java.lang.Integer.parseInt(Integer.java:592) ~[?:1.8.0_201]<br>
at java.lang.Integer.parseInt(Integer.java:615) ~[?:1.8.0_201]<br>
at org.apache.dubbo.common.Version.parseInt(Version.java:133) ~[dubbo-2.7.3.jar:2.7.3]<br>
at org.apache.dubbo.common.Version.getIntVersion(Version.java:118) ~[dubbo-2.7.3.jar:2.7.3]<br>
at org.apache.dubbo.common.Version.isSupportResponseAttachment(Version.java:102) ~[dubbo-2.7.3.jar:2.7.3]<br>
at org.apache.dubbo.rpc.protocol.dubbo.DubboCodec.encodeResponseData(DubboCodec.java:195) ~[dubbo-2.7.3.jar:2.7.3]<br>
at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encodeResponse(ExchangeCodec.java:283) [dubbo-2.7.3.jar:2.7.3]<br>
at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:71) [dubbo-2.7.3.jar:2.7.3]<br>
at org.apache.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:40) [dubbo-2.7.3.jar:2.7.3]<br>
at org.apache.dubbo.remoting.transport.netty4.NettyCodecAdapter$InternalEncoder.encode(NettyCodecAdapter.java:70) [dubbo-2.7.3.jar:2.7.3]<br>
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:716) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:708) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:791) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:701) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.handler.timeout.IdleStateHandler.write(IdleStateHandler.java:303) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:716) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:708) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:791) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:701) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:115) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at org.apache.dubbo.remoting.transport.netty4.NettyServerHandler.write(NettyServerHandler.java:103) [dubbo-2.7.3.jar:2.7.3]<br>
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:716) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:708) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext.access$1700(AbstractChannelHandlerContext.java:56) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1102) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1149) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1073) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:510) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:518) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-all-4.1.43.Final.jar:4.1.43.Final]<br>
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]</p>