Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong state for SentinelResource annotation #74

Closed
zhoujinpen opened this issue Aug 20, 2018 · 10 comments · Fixed by #111
Closed

Wrong state for SentinelResource annotation #74

zhoujinpen opened this issue Aug 20, 2018 · 10 comments · Fixed by #111
Assignees
Labels
area/annotation Issues or PRs related to annotation support kind/bug Category issues or prs related to bug.
Milestone

Comments

@zhoujinpen
Copy link

我项目中引入sentinel,通过@SentinelResource注解的方式去监控接口的,但是调用该接口时报java.lang.IllegalStateException: Wrong state for SentinelResource annotation这个错误,请问这是什么原因引起的?

@sczyh30
Copy link
Member

sczyh30 commented Aug 20, 2018

Hi, can you provide a code snippet where you used @SentinelResource annotation?

@sczyh30
Copy link
Member

sczyh30 commented Aug 22, 2018

And which version of Spring Boot your project is using?

@zhoujinpen
Copy link
Author

springboot 1.5.3 sentinel-core 0.2.0

@zhoujinpen
Copy link
Author

image

@zhoujinpen
Copy link
Author

把这个方法改造了下,就可以了,不过在demo里面是没问题的

@sczyh30
Copy link
Member

sczyh30 commented Aug 24, 2018

This may be related to #79 (occurs with Spring Boot 1.x). We'll check it.

@sczyh30 sczyh30 added the kind/bug Category issues or prs related to bug. label Aug 26, 2018
@sczyh30 sczyh30 self-assigned this Aug 26, 2018
@sczyh30 sczyh30 added this to the 0.2.0 milestone Aug 26, 2018
@sczyh30 sczyh30 added the area/annotation Issues or PRs related to annotation support label Jan 10, 2019
@fanyuanjin
Copy link

目前还是报java.lang.IllegalStateException: Wrong state for SentinelResource annotation错误
版本号:sentinel-annotation-aspectj-1.7.1.jar
spring-boot-2.2.5.RELEASE.jar

@jasonjoo2010
Copy link
Collaborator

目前还是报java.lang.IllegalStateException: Wrong state for SentinelResource annotation错误
版本号:sentinel-annotation-aspectj-1.7.1.jar
spring-boot-2.2.5.RELEASE.jar

hi
能提供一个重现的演示项目地址吗?

@guyulong
Copy link

guyulong commented Sep 8, 2020

目前还是报java.lang.IllegalStateException: Wrong state for SentinelResource annotation错误
版本号:sentinel-annotation-aspectj-1.7.1.jar
spring-boot-2.2.5.RELEASE.jar

hi
能提供一个重现的演示项目地址吗?
springboot 2.1.11.RELEASE
springcloud Greenwich.SR4
alibaba.cloud nacos-discovery 2.1.2.RELEASE
sentinel-annotation-aspectj 1.7.2 1.8.0 都试过 也是出现了这个问题 获取注解为null
image
image

@guyulong
Copy link

guyulong commented Sep 8, 2020

通过feign调用会这样, 如果直接写controller的话不会出现null的情况

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/annotation Issues or PRs related to annotation support kind/bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants