dz005 opened a new issue #2446: 
jarslink做module隔离时,dubbo调用会抛ClassNotFoundException
URL: https://github.com/apache/incubator-dubbo/issues/2446
 
 
   用jarslink做module隔离时,dubbo调用会抛ClassNotFoundException.经查是ClassLoader不一致.
   
   ```
       public static Class<?> getReturnType(Invocation invocation) {
           try {
               if (invocation != null && invocation.getInvoker() != null
                       && invocation.getInvoker().getUrl() != null
                       && !invocation.getMethodName().startsWith("$")) {
                   String service = 
invocation.getInvoker().getUrl().getServiceInterface();
                   if (service != null && service.length() > 0) {
                       Class<?> cls = ReflectUtils.forName(service);
                       Method method = 
cls.getMethod(invocation.getMethodName(), invocation.getParameterTypes());
                       if (method.getReturnType() == void.class) {
                           return null;
                       }
                       return method.getReturnType();
                   }
               }
           } catch (Throwable t) {
               logger.warn(t.getMessage(), t);
           }
           return null;
       }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to