paxxie2 opened a new issue, #15361:
URL: https://github.com/apache/dubbo/issues/15361

   ### Pre-check
   
   - [x] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo 3.3.1 , java 17, mac 15.3.2
   
   ### Steps to reproduce this issue
   
   I new a pull request about proto,  Unit Test On ubuntu-latest execute 
failed, see 
https://github.com/apache/dubbo/actions/runs/14910545315/job/41883681545?pr=15360
 .
   Key log:
   ```
    [INFO] Running org.apache.dubbo.rpc.protocol.dubbo.MultiThreadTest
   15:58:33.683 |-INFO  [main] bo.remoting.transport.netty4.NettyServer:69  -|  
[DUBBO] Start NettyServer bind /0.0.0.0:31715, export /127.0.0.1:31715, dubbo 
version: 3.3.4-SNAPSHOT, current host: 10.1.0.186
   15:58:33.687 |-INFO  [main] bo.remoting.transport.netty4.NettyClient:278 -|  
[DUBBO] Successfully connect to server /10.1.0.186:31715 from NettyClient 
10.1.0.186 using dubbo version 3.3.4-SNAPSHOT, channel is NettyChannel 
[channel=[id: 0xb9a4cf08, L:/10.1.0.186:54996 - R:/10.1.0.186:31715]], dubbo 
version: 3.3.4-SNAPSHOT, current host: 10.1.0.186
   15:58:33.687 |-INFO  [main] bo.remoting.transport.netty4.NettyClient:95  -|  
[DUBBO] Start NettyClient /10.1.0.186 connect to the server /10.1.0.186:31715, 
dubbo version: 3.3.4-SNAPSHOT, current host: 10.1.0.186
   15:58:33.687 |-INFO  [NettyClientWorker-44-1] 
ting.transport.netty4.NettyClientHandler:64  -|  [DUBBO] The connection [id: 
0xb9a4cf08, L:/10.1.0.186:54996 - R:/10.1.0.186:31715] of 10.1.0.186:54996 -> 
10.1.0.186:31715 is established., dubbo version: 3.3.4-SNAPSHOT, current host: 
10.1.0.186
   15:58:33.688 |-INFO  [NettyServerWorker-43-1] 
ting.transport.netty4.NettyServerHandler:84  -|  [DUBBO] The connection [id: 
0xf8f9d072, L:/10.1.0.186:31715 - R:/10.1.0.186:54996] of 10.1.0.186:54996 -> 
10.1.0.186:31715 is established., dubbo version: 3.3.4-SNAPSHOT, current host: 
10.1.0.186
   15:58:33.692 |-WARN  [main]    org.apache.dubbo.rpc.support.RpcUtils:    -|  
[DUBBO] Not found class TestService, cause: TestService, dubbo version: 
3.3.4-SNAPSHOT, current host: 10.1.0.186, error code: 0-8. This may be caused 
by , go to https://dubbo.apache.org/faq/0/8 to find instructions. 
   java.lang.ClassNotFoundException: TestService
        at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
 ~[?:?]
        at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
 ~[?:?]
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) 
~[?:?]
        at java.base/java.lang.Class.forName0(Native Method) ~[?:?]
        at java.base/java.lang.Class.forName(Class.java:534) ~[?:?]
        at java.base/java.lang.Class.forName(Class.java:513) ~[?:?]
        at 
org.apache.dubbo.common.utils.ReflectUtils.name2class(ReflectUtils.java:791) 
~[dubbo-common-3.3.4-SNAPSHOT.jar:3.3.4-SNAPSHOT]
        at 
org.apache.dubbo.common.utils.ReflectUtils.forName(ReflectUtils.java:696) 
~[dubbo-common-3.3.4-SNAPSHOT.jar:3.3.4-SNAPSHOT]
        ... 96 more
   Wrapped by: java.lang.IllegalStateException: Not found class TestService, 
cause: TestService
   ```
   
org.apache.dubbo.rpc.protocol.dubbo.MultiThreadTest#testDubboMultiThreadInvoke
   ```
       @Test
       void testDubboMultiThreadInvoke() throws Exception {
           ApplicationModel.defaultModel()
                   .getDefaultModule()
                   .getServiceRepository()
                   .registerService("TestService", DemoService.class);
           int port = NetUtils.getAvailablePort();
           Exporter<?> rpcExporter = protocol.export(proxy.getInvoker(
                   new DemoServiceImpl(), DemoService.class, 
URL.valueOf("dubbo://127.0.0.1:" + port + "/TestService")));
   
           final AtomicInteger counter = new AtomicInteger();
           final DemoService service = proxy.getProxy(
                   protocol.refer(DemoService.class, 
URL.valueOf("dubbo://127.0.0.1:" + port + "/TestService")));
           Assertions.assertEquals(service.getSize(new String[] {"123", "456", 
"789"}), 3);
   
           final StringBuffer sb = new StringBuffer();
           for (int i = 0; i < 1024 * 64 + 32; i++) sb.append('A');
           Assertions.assertEquals(sb.toString(), service.echo(sb.toString()));
   
           ExecutorService exec = Executors.newFixedThreadPool(10);
           for (int i = 0; i < 10; i++) {
               final int fi = i;
               exec.execute(new Runnable() {
                   public void run() {
                       for (int i = 0; i < 30; i++) {
                           System.out.println(fi + ":" + 
counter.getAndIncrement());
                           Assertions.assertEquals(service.echo(sb.toString()), 
sb.toString());
                       }
                   }
               });
           }
           exec.shutdown();
           exec.awaitTermination(10, TimeUnit.SECONDS);
           rpcExporter.unexport();
       }
   ```
   
   ### What you expected to happen
   
   I expect new a pull request about proto success.
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [x] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to