shenyu icon indicating copy to clipboard operation
shenyu copied to clipboard

add a springcloud rule data ,and then delete it,call server will report 500 exception

Open hlcen66 opened this issue 2 years ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

image

image

Expected Behavior

1

Steps To Reproduce

1

Environment

ShenYu version(s):2.5.0

Debug logs

java.lang.NullPointerException: null at org.apache.shenyu.plugin.springcloud.SpringCloudPlugin.doExecute(SpringCloudPlugin.java:76) Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Error has been observed at the following site(s): *__checkpoint ⇢ org.apache.shenyu.web.configuration.ErrorHandlerConfiguration$1 [DefaultWebFilterChain] *__checkpoint ⇢ org.apache.shenyu.web.filter.FileSizeFilter [DefaultWebFilterChain] *__checkpoint ⇢ org.apache.shenyu.web.filter.CrossFilter [DefaultWebFilterChain] *__checkpoint ⇢ org.springframework.security.web.server.authorization.AuthorizationWebFilter [DefaultWebFilterChain] *__checkpoint ⇢ org.springframework.security.web.server.authorization.ExceptionTranslationWebFilter [DefaultWebFilterChain] *__checkpoint ⇢ org.springframework.security.web.server.authentication.logout.LogoutWebFilter [DefaultWebFilterChain] *__checkpoint ⇢ org.springframework.security.web.server.savedrequest.ServerRequestCacheWebFilter [DefaultWebFilterChain] *__checkpoint ⇢ org.springframework.security.web.server.context.SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain] *__checkpoint ⇢ org.springframework.security.web.server.context.ReactorContextWebFilter [DefaultWebFilterChain] *__checkpoint ⇢ org.springframework.security.web.server.header.HttpHeaderWriterWebFilter [DefaultWebFilterChain] *__checkpoint ⇢ org.springframework.security.config.web.server.ServerHttpSecurity$ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain] *__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain] *__checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain] *__checkpoint ⇢ HTTP GET "/order-base/order/list" [ExceptionHandlingWebHandler] Original Stack Trace: at org.apache.shenyu.plugin.springcloud.SpringCloudPlugin.doExecute(SpringCloudPlugin.java:76) at org.apache.shenyu.plugin.base.AbstractShenyuPlugin.execute(AbstractShenyuPlugin.java:117) at org.apache.shenyu.web.handler.ShenyuWebHandler$DefaultShenyuPluginChain.lambda$execute$0(ShenyuWebHandler.java:221)

Anything else?

11

hlcen66 avatar Sep 14 '22 06:09 hlcen66

whats mean?

and then delete it?

yu199195 avatar Sep 14 '22 07:09 yu199195

whats mean?

and then delete it?

step 1:add a rule.

image

step2:delete the rule we just added image

step3:ask server image

hlcen66 avatar Sep 14 '22 08:09 hlcen66

I tested it, because the exception caused by the same Rule Name

yunlongn avatar Sep 14 '22 10:09 yunlongn

image It is caused by the code here, and the changes here are more involved. It is recommended to avoid duplicate rule names when using them.

yunlongn avatar Sep 14 '22 10:09 yunlongn

@yunlongn maybe used ruleData.getId() , and used String.join()

yu199195 avatar Sep 14 '22 10:09 yu199195

I will submit another issue for another problem,this issue will be closed.

hlcen66 avatar Sep 15 '22 01:09 hlcen66

see this issue pls,thk. #3945

hlcen66 avatar Sep 15 '22 01:09 hlcen66