wanghao123456 opened a new issue, #4520:
URL: https://github.com/apache/shenyu/issues/4520

   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Current Behavior
   
   When I click on the "synchronous sofa" button, the "unCacheSelectorData" and 
"unCacheRuleData" methods throw the following exception: 
"java.lang.StringIndexOutOfBoundsException".
   
   
![image](https://user-images.githubusercontent.com/23393153/228794663-921c0d4d-ec80-4457-97d8-9e1dd38fddd9.png)
   
   
   ### Expected Behavior
   
   _No response_
   
   ### Steps To Reproduce
   
   Reproducing the issue can be done by starting the "shenyu-examples-sofa" 
module and registering it to "shenyu", then clicking on the "synchronous sofa" 
button.
   
   ### Environment
   
   ```markdown
   ShenYu version(s):2.6.0
   zookeeper version(s):3.6.2
   Update as of 2023-3-30 17:39:56.
   ```
   
   
   ### Debug logs
   
   
![image](https://user-images.githubusercontent.com/23393153/228798017-257c727a-f628-4e1d-8a1c-a82f0ec3dbdf.png)
   
![image](https://user-images.githubusercontent.com/23393153/228798528-fa4821c2-5a7b-4ee9-ba4b-dad1bb016d51.png)
   
   
   
   2023-03-30 17:50:10 [Curator-TreeCache-4] ERROR 
org.apache.curator.framework.recipes.cache.TreeCache - 
   java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1931)
        at 
org.apache.shenyu.sync.data.zookeeper.ZookeeperSyncDataService$MetadataCacheListener.event(ZookeeperSyncDataService.java:249)
        at 
org.apache.shenyu.sync.data.zookeeper.ZookeeperSyncDataService$AbstractDataSyncListener.childEvent(ZookeeperSyncDataService.java:180)
        at 
org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:760)
        at 
org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:754)
        at 
org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:100)
        at 
org.apache.curator.shaded.com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
        at 
org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:92)
        at 
org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:753)
        at 
org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:75)
        at 
org.apache.curator.framework.recipes.cache.TreeCache$4.run(TreeCache.java:865)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
        at java.util.concurrent.FutureTask.run(FutureTask.java)
        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)
   2023-03-30 17:50:10 [Curator-TreeCache-2] ERROR 
org.apache.curator.framework.recipes.cache.TreeCache - 
   java.lang.StringIndexOutOfBoundsException: String index out of range: -6
        at java.lang.String.substring(String.java:1967)
        at 
org.apache.shenyu.sync.data.zookeeper.ZookeeperSyncDataService.unCacheRuleData(ZookeeperSyncDataService.java:128)
        at 
org.apache.shenyu.sync.data.zookeeper.ZookeeperSyncDataService.access$800(ZookeeperSyncDataService.java:50)
        at 
org.apache.shenyu.sync.data.zookeeper.ZookeeperSyncDataService$RuleCacheListener.event(ZookeeperSyncDataService.java:296)
        at 
org.apache.shenyu.sync.data.zookeeper.ZookeeperSyncDataService$AbstractDataSyncListener.childEvent(ZookeeperSyncDataService.java:180)
        at 
org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:760)
        at 
org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:754)
        at 
org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:100)
        at 
org.apache.curator.shaded.com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
        at 
org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:92)
        at 
org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:753)
        at 
org.apache.curator.framework.recipes.cache.TreeCache.access$1900(TreeCache.java:75)
        at 
org.apache.curator.framework.recipes.cache.TreeCache$4.run(TreeCache.java:865)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
        at java.util.concurrent.FutureTask.run(FutureTask.java)
        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)
   
   ### Anything else?
   
   _No response_


-- 
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]

Reply via email to