升级到spring boot 4.2.0无法启动
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- java, spring-boot
- Domaine
- backend
Piste de recherche
Start from com.ctrip.framework.apollo.spring.boot.ApolloApplicationContextInitializer, named in the stack trace. Read how it is registered and where it depends on org.springframework.boot.env.EnvironmentPostProcessor, which is missing under Spring Boot 4.2.0. Reproduce with a minimal Spring Boot 4.2.0 app using the Apollo client, then check the Spring Boot 4 migration notes for the replacement API. Done means the application starts with Apollo enabled without the NoClassDefFoundError.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
- 我已经检查过discussions
- 我已经搜索过issues
- 我已经仔细检查过FAQ
描述bug
简洁明了地描述一下bug
复现
通过如下步骤可以复现:
期望
简介明了地描述你希望正常情况下应该发生什么
截图
如果可以,附上截图来描述你的问题
额外的细节和日志
Exception in thread "main" java.lang.IllegalArgumentException: Unable to instantiate factory class [com.ctrip.framework.apollo.spring.boot.ApolloApplicationContextInitializer] for factory type [org.springframework.context.ApplicationContextInitializer]
at org.springframework.core.io.support.SpringFactoriesLoader$FailureHandler.lambda$throwing$0(SpringFactoriesLoader.java:632)
at org.springframework.core.io.support.SpringFactoriesLoader$FailureHandler.lambda$handleMessage$0(SpringFactoriesLoader.java:656)
at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:225)
at org.springframework.core.io.support.SpringFactoriesLoader.load(SpringFactoriesLoader.java:201)
at org.springframework.core.io.support.SpringFactoriesLoader.load(SpringFactoriesLoader.java:157)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:458)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:454)
at org.springframework.boot.SpringApplication.(SpringApplication.java:269)
at org.springframework.boot.SpringApplication.(SpringApplication.java:248)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
at cn.dbn.userCenter.web.AppMainKt.main(AppMain.kt:12)
Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/env/EnvironmentPostProcessor
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:962)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:144)
Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/env/EnvironmentPostProcessor
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:776)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:691)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:620)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:578)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:490)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:547)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:308)
at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:218)
... 9 more
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.env.EnvironmentPostProcessor
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.env.EnvironmentPostProcessor
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:490)
... 21 more
- 版本:
- 错误日志
- 配置:
- 平台和操作系统
- Langage dominant
- Java
- Étoiles
- 64
- Forks
- 87
- Merge moyen
- 2 h 59 min
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apolloconfig/apollo-java
-
希望有一个可以关闭特定Config资源的apiOuvertediscussion feature request help wanted
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
apolloconfig/apollo-java#107 · 4 commentaires ·
Toutes les issues de apolloconfig/apollo-java
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
bloxbean/yaci-store#1445 ·
Les mainteneurs répondent en général sous 1 jour
-
图片灯箱过长的话底部carousel滑动没有惯性Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
-
Spare PermissionOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 63/100
Etar-Group/Etar-Calendar#2234 ·
Les mainteneurs répondent en général sous 1 jour
-
[BUG] MCP resources-as-tools drops invocation context when listing templatesPeut-être pris @CryoThrust l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
langchain4j/langchain4j#7320 ·
Les mainteneurs répondent en général sous 1 jour