You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "shnuwl007 (via GitHub)" <gi...@apache.org> on 2023/05/06 02:52:56 UTC
[GitHub] [shenyu] shnuwl007 opened a new issue, #4616: [BUG] divide plugin will throw JsonSyntaxException after use "single handle" for multiSelectorHandle in divide configuration
shnuwl007 opened a new issue, #4616:
URL: https://github.com/apache/shenyu/issues/4616
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current Behavior
<img width="960" alt="error" src="https://user-images.githubusercontent.com/100743411/236594385-b326ce20-7115-4b0f-b511-debdf38cbf98.png">
<img width="960" alt="divide" src="https://user-images.githubusercontent.com/100743411/236594387-965eb255-371d-4c30-8287-341b86e88d9f.png">
### Expected Behavior
_No response_
### Steps To Reproduce
1. "BasicConfig" --> "Plugin" , edit divide plugin, select "single handle" for multiSelectorHandle.
2. "PluginList" --> "Proxy", Add one new selector for "Divide", then there will be throw the exception.
### Environment
```markdown
ShenYu version(s):2.5.1
```
### Debug logs
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
at com.google.gson.Gson.fromJson(Gson.java:1003)
at com.google.gson.Gson.fromJson(Gson.java:956)
at com.google.gson.Gson.fromJson(Gson.java:905)
at org.apache.shenyu.common.utils.GsonUtils.fromList(GsonUtils.java:159)
at org.apache.shenyu.admin.utils.SelectorUtil.buildDivideUpstream(SelectorUtil.java:64)
at org.apache.shenyu.admin.service.impl.UpstreamCheckService.onSelectorCreated(UpstreamCheckService.java:373)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:229)
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
at org.apache.shenyu.admin.service.publish.SelectorEventPublisher.publish(SelectorEventPublisher.java:114)
at org.apache.shenyu.admin.service.publish.SelectorEventPublisher.onCreated(SelectorEventPublisher.java:63)
at org.apache.shenyu.admin.service.impl.SelectorServiceImpl.create(SelectorServiceImpl.java:162)
at org.apache.shenyu.admin.service.SelectorService.createOrUpdate(SelectorService.java:74)
at org.apache.shenyu.admin.service.impl.SelectorServiceImpl.createOrUpdate(SelectorServiceImpl.java:152)
at org.apache.shenyu.admin.service.impl.SelectorServiceImpl$$FastClassBySpringCGLIB$$20b2533e.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
at org.apache.shenyu.admin.service.impl.SelectorServiceImpl$$EnhancerBySpringCGLIB$$23f48c42.createOrUpdate(<generated>)
at org.apache.shenyu.admin.service.impl.SelectorServiceImpl$$FastClassBySpringCGLIB$$20b2533e.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
at org.apache.shenyu.admin.service.impl.SelectorServiceImpl$$EnhancerBySpringCGLIB$$7b3d6dbe.createOrUpdate(<generated>)
at org.apache.shenyu.admin.controller.SelectorController.createSelector(SelectorController.java:107)
at org.apache.shenyu.admin.controller.SelectorController$$FastClassBySpringCGLIB$$edbe1bb0.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:123)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
at org.apache.shenyu.admin.aspect.PrintApiLogAspect.logAround(PrintApiLogAspect.java:64)
... 86 common frames omitted
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:350)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:80)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
at com.google.gson.Gson.fromJson(Gson.java:991)
... 146 common frames omitted
### 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: notifications-unsubscribe@shenyu.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [BUG] divide plugin will throw JsonSyntaxException after use "single handle" for multiSelectorHandle in divide configuration [shenyu]
Posted by "yu199195 (via GitHub)" <gi...@apache.org>.
yu199195 closed issue #4616: [BUG] divide plugin will throw JsonSyntaxException after use "single handle" for multiSelectorHandle in divide configuration
URL: https://github.com/apache/shenyu/issues/4616
--
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: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shenyu] yu199195 commented on issue #4616: [BUG] divide plugin will throw JsonSyntaxException after use "single handle" for multiSelectorHandle in divide configuration
Posted by "yu199195 (via GitHub)" <gi...@apache.org>.
yu199195 commented on issue #4616:
URL: https://github.com/apache/shenyu/issues/4616#issuecomment-1537024338
not select this
> , select "single handle" for multiSelectorHandle.
--
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: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org