강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

dkvmxkcl님의 프로필 이미지
dkvmxkcl

작성한 질문수

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

ErrorDecoder를 이용한 예외 처리

어느 부분에서 에러가 발생하는지 모르겠어요..

작성

·

436

0

이것저것 에러는 잡았는데 정확히 어디서 에러가 발생해서 안되는지 모르겠습니다.
 
2022-06-08 00:52:56.897 WARN 1532 --- [ restartedMain] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2022-06-08 00:52:57.389 WARN 1532 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : Unable to start LiveReload server 2022-06-08 00:52:57.540 INFO 1532 --- [ restartedMain] o.s.c.openfeign.FeignClientFactoryBean : For 'order-service' URL not provided. Will try picking an instance via load-balancing. 2022-06-08 00:52:58.184 INFO 1532 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@24caec5a, org.springframework.security.web.context.SecurityContextPersistenceFilter@d9e9a64, org.springframework.security.web.header.HeaderWriterFilter@7e87d99f, org.springframework.security.web.authentication.logout.LogoutFilter@65879726, com.example.userservice.security.AuthenticationFilter@796d03f1, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@91adcab, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@224e4c1, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@227c9777, org.springframework.security.web.session.SessionManagementFilter@15c61b3f, org.springframework.security.web.access.ExceptionTranslationFilter@569dde37, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@2c7bf90a] 2022-06-08 00:53:03.870 WARN 1532 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthEndpointWebMvcHandlerMapping' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointWebExtensionConfiguration$MvcAdditionalHealthEndpointPathsConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.servlet.AdditionalHealthEndpointPathsWebMvcHandlerMapping]: Factory method 'healthEndpointWebMvcHandlerMapping' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionsEndpoint' defined in class path resource [org/springframework/cloud/function/context/config/FunctionsEndpointAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionsEndpoint' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionCatalog' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionCatalog' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avroSchemaMessageConverter' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser 2022-06-08 00:53:03.904 INFO 1532 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2022-06-08 00:53:04.061 INFO 1532 --- [ restartedMain] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down' 2022-06-08 00:53:04.084 WARN 1532 --- [ restartedMain] o.s.b.f.support.DisposableBeanAdapter : Invocation of destroy method failed on bean with name 'inMemoryDatabaseShutdownExecutor': org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-176] 2022-06-08 00:53:04.085 INFO 1532 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2022-06-08 00:53:04.103 INFO 1532 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. 2022-06-08 00:53:04.116 INFO 1532 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2022-06-08 00:53:04.387 INFO 1532 --- [ restartedMain] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2022-06-08 00:53:04.560 ERROR 1532 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthEndpointWebMvcHandlerMapping' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointWebExtensionConfiguration$MvcAdditionalHealthEndpointPathsConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.servlet.AdditionalHealthEndpointPathsWebMvcHandlerMapping]: Factory method 'healthEndpointWebMvcHandlerMapping' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionsEndpoint' defined in class path resource [org/springframework/cloud/function/context/config/FunctionsEndpointAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionsEndpoint' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionCatalog' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionCatalog' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avroSchemaMessageConverter' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.19.jar:5.3.19] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.19.jar:5.3.19] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.7.jar:2.6.7] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[spring-boot-2.6.7.jar:2.6.7] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415) ~[spring-boot-2.6.7.jar:2.6.7] at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) ~[spring-boot-2.6.7.jar:2.6.7] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-2.6.7.jar:2.6.7] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-2.6.7.jar:2.6.7] at com.example.userservice.UserServiceApplication.main(UserServiceApplication.java:19) ~[classes/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.6.7.jar:2.6.7] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.servlet.AdditionalHealthEndpointPathsWebMvcHandlerMapping]: Factory method 'healthEndpointWebMvcHandlerMapping' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionsEndpoint' defined in class path resource [org/springframework/cloud/function/context/config/FunctionsEndpointAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionsEndpoint' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionCatalog' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionCatalog' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avroSchemaMessageConverter' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.19.jar:5.3.19] ... 24 common frames omitted Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionsEndpoint' defined in class path resource [org/springframework/cloud/function/context/config/FunctionsEndpointAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionsEndpoint' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionCatalog' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionCatalog' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avroSchemaMessageConverter' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154) ~[spring-context-5.3.19.jar:5.3.19] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.lambda$createEndpointBean$1(EndpointDiscoverer.java:145) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer$EndpointBean.getBean(EndpointDiscoverer.java:447) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.getFilterEndpoint(EndpointDiscoverer.java:307) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.isFilterMatch(EndpointDiscoverer.java:295) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.isEndpointFiltered(EndpointDiscoverer.java:270) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.isEndpointExposed(EndpointDiscoverer.java:254) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.convertToEndpoints(EndpointDiscoverer.java:181) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.discoverEndpoints(EndpointDiscoverer.java:125) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.getEndpoints(EndpointDiscoverer.java:117) ~[spring-boot-actuator-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointWebExtensionConfiguration.getHealthEndpoint(HealthEndpointWebExtensionConfiguration.java:80) ~[spring-boot-actuator-autoconfigure-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointWebExtensionConfiguration.access$000(HealthEndpointWebExtensionConfiguration.java:70) ~[spring-boot-actuator-autoconfigure-2.6.7.jar:2.6.7] at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointWebExtensionConfiguration$MvcAdditionalHealthEndpointPathsConfiguration.healthEndpointWebMvcHandlerMapping(HealthEndpointWebExtensionConfiguration.java:92) ~[spring-boot-actuator-autoconfigure-2.6.7.jar:2.6.7] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.19.jar:5.3.19] ... 25 common frames omitted Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'functionCatalog' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.class]: Unsatisfied dependency expressed through method 'functionCatalog' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avroSchemaMessageConverter' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.19.jar:5.3.19] ... 52 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avroSchemaMessageConverter' defined in class path resource [org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1607) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1571) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1460) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1347) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.19.jar:5.3.19] ... 66 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter]: Factory method 'avroSchemaMessageConverter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.19.jar:5.3.19] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.19.jar:5.3.19] ... 83 common frames omitted Caused by: java.lang.NoClassDefFoundError: org/apache/avro/Schema$Parser at org.springframework.cloud.function.context.converter.avro.AbstractAvroMessageConverter.<init>(AbstractAvroMessageConverter.java:52) ~[spring-cloud-function-context-3.2.4.jar:3.2.4] at org.springframework.cloud.function.context.converter.avro.AbstractAvroMessageConverter.<init>(AbstractAvroMessageConverter.java:56) ~[spring-cloud-function-context-3.2.4.jar:3.2.4] at org.springframework.cloud.function.context.converter.avro.AvroSchemaMessageConverter.<init>(AvroSchemaMessageConverter.java:53) ~[spring-cloud-function-context-3.2.4.jar:3.2.4] at org.springframework.cloud.function.context.config.ContextFunctionCatalogAutoConfiguration$AvroSchemaMessageConverterConfiguration.avroSchemaMessageConverter(ContextFunctionCatalogAutoConfiguration.java:180) ~[spring-cloud-function-context-3.2.4.jar:3.2.4] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.19.jar:5.3.19] ... 84 common frames omitted Caused by: java.lang.ClassNotFoundException: org.apache.avro.Schema$Parser at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na] ... 93 common frames omitted

답변 1

0

Dowon Lee님의 프로필 이미지
Dowon Lee
지식공유자

안녕하세요, 이도원입니다. 

먼저 답변이 늦어 죄송합니다. 올려주신 에러 로그를 가지고 전체 원인을 파악하는게 쉽지 않지만, 로그 상단에 표시되어 있는 다음과 같은 에러메시지가 있어 몇가지 확인해 볼 만한 사항을 작성해 봅니다. 

For 'order-service' URL not provided. Will try picking an instance via load-balancing.
...
Error creating bean with name 'healthEndpointWebMvcHandlerMapping' defined
...

1.  order-service가 Service Discovery에 등록되어 있는지 확인. user-service나 apigateway-service에서 order-service를 호출할 때, lb://로 호출한다면, Service Discovery에 등록된 order-service라는 이름을 검색한 다음 해당 서비스로 이동하기 때문에, Service Discovery에 order-service라는 instance가 등록되어 있는지 확인 

2. RestTemplate을 이용하여 호출할 경우, user-service의 RestTemplate을 빈으로 등록할 때, @LoadBalanced 어노테이션이 추가되어 있는지 확인 

@Bean
@LoadBalanced
public RestTemplate getRestTemplate() {
return new RestTemplate();
}

위 2가지 경우를 확인하셨는데로 오류가 발생하신다면, 어떤 부분을 실행하실 때 발생한 오류인지 하고 해당 코드를 공유해 주시면, 오류를 찾는데 도움이 될 것 같습니다. 

감사합니다. 

dkvmxkcl님의 프로필 이미지
dkvmxkcl

작성한 질문수

질문하기