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

Broken Example #1154

Open
bsj0006 opened this issue Dec 23, 2024 · 1 comment
Open

Broken Example #1154

bsj0006 opened this issue Dec 23, 2024 · 1 comment
Labels
bug Something does not work as expected

Comments

@bsj0006
Copy link

bsj0006 commented Dec 23, 2024

The context

Trying to run the examples for the first time

The bug

Running ./gradlew :example:local-grpc-server:bootRun gives a ClassNotFoundException for HealthEndpointAutoConfiguration during startup. The application exits after throwing the exception.

Stacktrace and logs

Stacktrace is produced before application exits

java.lang.IllegalArgumentException: Could not find class [org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration]
        at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:355) ~[spring-core-6.1.6.jar:6.1.6]
        at org.springframework.core.annotation.TypeMappedAnnotation.adapt(TypeMappedAnnotation.java:466) ~[spring-core-6.1.6.jar:6.1.6]
        at org.springframework.core.annotation.TypeMappedAnnotation.getValue(TypeMappedAnnotation.java:391) ~[spring-core-6.1.6.jar:6.1.6]
        at org.springframework.core.annotation.TypeMappedAnnotation.asMap(TypeMappedAnnotation.java:278) ~[spring-core-6.1.6.jar:6.1.6]
        at org.springframework.core.annotation.AbstractMergedAnnotation.asAnnotationAttributes(AbstractMergedAnnotation.java:191) ~[spring-core-6.1.6.jar:6.1.6]
        at org.springframework.context.annotation.AnnotationBeanNameGenerator.determineBeanNameFromAnnotation(AnnotationBeanNameGenerator.java:144) ~[spring-context-6.1.6.jar:6.1.6]
        at org.springframework.context.annotation.AnnotationBeanNameGenerator.generateBeanName(AnnotationBeanNameGenerator.java:110) ~[spring-context-6.1.6.jar:6.1.6]
        at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.registerBeanDefinitionForImportedConfigurationClass(ConfigurationClassBeanDefinitionReader.java:160) ~[spring-context-6.1.6.jar:6.1.6]
        at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:141) ~[spring-context-6.1.6.jar:6.1.6]
        at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:120) ~[spring-context-6.1.6.jar:6.1.6]
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:428) ~[spring-context-6.1.6.jar:6.1.6]
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:289) ~[spring-context-6.1.6.jar:6.1.6]
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349) ~[spring-context-6.1.6.jar:6.1.6]
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:118) ~[spring-context-6.1.6.jar:6.1.6]
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:788) ~[spring-context-6.1.6.jar:6.1.6]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:606) ~[spring-context-6.1.6.jar:6.1.6]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.5.jar:3.2.5]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.5.jar:3.2.5]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.5.jar:3.2.5]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.5.jar:3.2.5]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.5.jar:3.2.5]
        at net.devh.boot.grpc.examples.local.server.LocalGrpcServerApplication.main(LocalGrpcServerApplication.java:30) ~[main/:na]
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[na:na]
        at java.base/java.lang.Class.forName0(Native Method) ~[na:na]
        at java.base/java.lang.Class.forName(Class.java:467) ~[na:na]
        at org.springframework.util.ClassUtils.forName(ClassUtils.java:304) ~[spring-core-6.1.6.jar:6.1.6]
        at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:345) ~[spring-core-6.1.6.jar:6.1.6]

Steps to Reproduce

Steps to reproduce the behavior:

  1. Clone repo
  2. cd to repo directory
  3. Run ./gradlew :example:local-grpc-server:bootRun
  4. See error

The application's environment

Which versions do you use?

  • grpc-spring-boot-starter: 3.1.0
  • Corretto JDK 17

Additional context

  • None
@bsj0006 bsj0006 added the bug Something does not work as expected label Dec 23, 2024
@bsj0006
Copy link
Author

bsj0006 commented Dec 23, 2024

Temporary Workarounds:

  • Disable health service in properties file.
  • Add actuator endpoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something does not work as expected
Projects
None yet
Development

No branches or pull requests

1 participant