spring-cloud / spring-cloud-gateway

An API Gateway built on Spring Framework and Spring Boot providing routing and more.
http://cloud.spring.io
Apache License 2.0
4.53k stars 3.33k forks source link

Refresh routes error !!!, EL1005E: Type cannot be found 'org.springframework.util.StreamUtils' #2719

Closed glicine closed 7 months ago

glicine commented 2 years ago
org.springframework.expression.spel.SpelEvaluationException: EL1005E: Type cannot be found 'org.springframework.util.StreamUtils'
    at org.springframework.expression.spel.support.SimpleEvaluationContext.lambda$static$0(SimpleEvaluationContext.java:92)
    at org.springframework.expression.spel.ExpressionState.findType(ExpressionState.java:155)
    at org.springframework.expression.spel.ast.TypeReference.getValueInternal(TypeReference.java:69)
    at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:55)
    at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:91)
    at org.springframework.expression.spel.ast.ConstructorReference.createNewInstance(ConstructorReference.java:122)
    at org.springframework.expression.spel.ast.ConstructorReference.getValueInternal(ConstructorReference.java:108)
    at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:112)
    at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:273)
    at org.springframework.cloud.gateway.support.ShortcutConfigurable.getValue(ShortcutConfigurable.java:72)
    at org.springframework.cloud.gateway.support.ShortcutConfigurable$ShortcutType$1.normalize(ShortcutConfigurable.java:106)
    at org.springframework.cloud.gateway.support.ConfigurationService$ConfigurableBuilder.normalizeProperties(ConfigurationService.java:140)
    at org.springframework.cloud.gateway.support.ConfigurationService$AbstractBuilder.bind(ConfigurationService.java:241)
    at org.springframework.cloud.gateway.route.RouteDefinitionRouteLocator.loadGatewayFilters(RouteDefinitionRouteLocator.java:144)
    at org.springframework.cloud.gateway.route.RouteDefinitionRouteLocator.getFilters(RouteDefinitionRouteLocator.java:176)
    at org.springframework.cloud.gateway.route.RouteDefinitionRouteLocator.convertToRoute(RouteDefinitionRouteLocator.java:117)
    at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:106)
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.tryEmitScalar(FluxFlatMap.java:488)
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:421)
    at reactor.core.publisher.FluxMergeSequential$MergeSequentialMain.drain(FluxMergeSequential.java:432)
    at reactor.core.publisher.FluxMergeSequential$MergeSequentialMain.innerComplete(FluxMergeSequential.java:328)
    at reactor.core.publisher.FluxMergeSequential$MergeSequentialInner.onComplete(FluxMergeSequential.java:584)
    at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144)
    at reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onComplete(MonoFlatMapMany.java:260)
    at reactor.core.publisher.Operators.complete(Operators.java:137)
    at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:148)
    at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:87)
    at reactor.core.publisher.Flux.subscribe(Flux.java:8466)
    at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.onNext(MonoFlatMapMany.java:195)
    at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
    at reactor.core.publisher.MonoCollect$CollectSubscriber.onComplete(MonoCollect.java:160)
    at reactor.core.publisher.FluxFilter$FilterSubscriber.onComplete(FluxFilter.java:166)
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.checkTerminated(FluxFlatMap.java:846)
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:608)
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:588)
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.onComplete(FluxFlatMap.java:465)
    at reactor.core.publisher.FluxFilter$FilterSubscriber.onComplete(FluxFilter.java:166)
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.checkTerminated(FluxFlatMap.java:846)
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:608)
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.innerComplete(FluxFlatMap.java:894)
    at reactor.core.publisher.FluxFlatMap$FlatMapInner.onComplete(FluxFlatMap.java:997)
    at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1799)
    at reactor.core.publisher.MonoCollectList$MonoCollectListSubscriber.onComplete(MonoCollectList.java:129)
    at org.springframework.cloud.commons.publisher.FluxFirstNonEmptyEmitting$FirstNonEmptyEmittingSubscriber.onComplete(FluxFirstNonEmptyEmitting.java:325)
    at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.onComplete(FluxSubscribeOn.java:166)
    at reactor.core.publisher.FluxIterable$IterableSubscription.fastPath(FluxIterable.java:362)
    at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:227)
    at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.requestUpstream(FluxSubscribeOn.java:131)
    at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.onSubscribe(FluxSubscribeOn.java:124)
    at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:165)
    at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:87)
    at reactor.core.publisher.Flux.subscribe(Flux.java:8466)
    at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:200)
    at reactor.core.publisher.MonoFlatMapMany.subscribeOrReturn(MonoFlatMapMany.java:49)
    at reactor.core.publisher.Flux.subscribe(Flux.java:8452)
    at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:200)
    at reactor.core.publisher.MonoFlatMapMany.subscribeOrReturn(MonoFlatMapMany.java:49)
    at reactor.core.publisher.FluxFromMonoOperator.subscribe(FluxFromMonoOperator.java:76)
    at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.run(FluxSubscribeOn.java:194)
    at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84)
    at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    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)
springboot version: 2.7.2
springcloud version 2021.0.3
springcloud gateway version 3.1.3
nacos version:2.0.4

gateway routes configruation:

spring:
  cloud:
    gateway:
      default-filters:
        - StripPrefix=1 
      discovery:
        locator:
          lowerCaseServiceId: true
          enabled: true
      routes:
        - id: momo-auth
          uri: lb://momo-auth
          predicates:
            - Path=/auth/**
        - id: momo-live
          uri: lb://momo-live
          predicates:
            - Path=/live/**
yang105 commented 1 year ago

我遇到了同样的问题。请问解决了吗? springboot version: 2.6.6 springcloud version 2021.0.1 springcloud gateway version 3.1.1 nacos version:2.1.0

l42111996 commented 1 year ago

有解决方案吗?遇到了同样的问题

yao012 commented 1 year ago

springboot 2.6.4 spring.cloud 2021.0.1 springcloud gateway version 3.1.1 apollo config 遇到相同的问题,是否有解决方案?

qewsd commented 10 months ago

Don't you have an answer, there is a loop to report this error

spencergibb commented 8 months ago

If any of you can replicate this with Spring Boot 3.2 and Spring Cloud 2023.0.0, please take the time to provide a complete, minimal, verifiable sample (something that we can unzip attached to this issue or git clone, build, and deploy) that reproduces the problem.

spring-cloud-issues commented 7 months ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-cloud-issues commented 7 months ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.