org.springframework.boot.env.EnvironmentPostProcessor is still used

オープン
#116 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java, spring-boot
領域
backend

調査の方向性

The failure is raised from org.springframework.cloud.bindings.boot.BindingFlattenedEnvironmentPostProcessor, which the stack trace shows being instantiated through SpringFactoriesLoader as an ApplicationListener. Start by finding where this class and its factory registration live in the repository, and check how it references the deprecated org.springframework.boot.env.EnvironmentPostProcessor. Done means the class loads and the binding tests pass against Spring Boot 4.2.0-M1, which is the version the reporter says is failing.

索引モデルが issue の本文から書いたものです。

説明

org.springframework.boot.env.EnvironmentPostProcessor is deprecated as of Spring Boot 4.0 but Spring Cloud bindings still use it. We're working on Spring Boot 4.2.0-M1 where this is scheduled for removal and our tests are now failing:


Calculating JVM memory based on 11610600K available memory |  
-- | --
For more information on this calculation, see https://paketo.io/docs/reference/java-reference/#memory-calculator |  
Calculated JVM Memory Configuration: -XX:MaxDirectMemorySize=10M -Xmx11227395K -XX:MaxMetaspaceSize=76004K -XX:ReservedCodeCacheSize=240M -Xss1M (Total Memory: 11610600K, Thread Count: 50, Loaded Class Count: 11005, Headroom: 0%) |  
Enabling Java Native Memory Tracking |  
Adding 121 container CA certificates to JVM truststore |  
Spring Cloud Bindings Enabled |  
Picked up JAVA_TOOL_OPTIONS: -Djava.security.properties=/layers/paketo-buildpacks_bellsoft-liberica/java-security-properties/java-security.properties -XX:+ExitOnOutOfMemoryError -XX:MaxDirectMemorySize=10M -Xmx11227395K -XX:MaxMetaspaceSize=76004K -XX:ReservedCodeCacheSize=240M -Xss1M -XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=summary -XX:+PrintNMTStatistics -Dorg.springframework.cloud.bindings.boot.enable=true |  
Exception in thread "main" java.lang.reflect.InvocationTargetException |  
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) |  
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) |  
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) |  
at java.base/java.lang.reflect.Method.invoke(Unknown Source) |  
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:106) |  
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) |  
at org.springframework.boot.loader.launch.WarLauncher.main(WarLauncher.java:53) |  
Caused by: java.lang.IllegalArgumentException: Unable to instantiate factory class [org.springframework.cloud.bindings.boot.BindingFlattenedEnvironmentPostProcessor] for factory type [org.springframework.context.ApplicationListener] |  
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:472) |  
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:468) |  
at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:282) |  
at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:260) |  
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365) |  
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) |  
at example.ExampleApplication.main(ExampleApplication.java:13) |  
... 7 more |  
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(Unknown Source) |  
at java.base/java.security.SecureClassLoader.defineClass(Unknown Source) |  
at java.base/java.net.URLClassLoader.defineClass(Unknown Source) |  
at java.base/java.net.URLClassLoader$1.run(Unknown Source) |  
at java.base/java.net.URLClassLoader$1.run(Unknown Source) |  
at java.base/java.security.AccessController.doPrivileged(Unknown Source) |  
at java.base/java.net.URLClassLoader.findClass(Unknown Source) |  
at java.base/java.lang.ClassLoader.loadClass(Unknown Source) |  
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.loadClass(JarUrlClassLoader.java:97) |  
at org.springframework.boot.loader.launch.LaunchedClassLoader.loadClass(LaunchedClassLoader.java:91) |  
at java.base/java.lang.ClassLoader.loadClass(Unknown Source) |  
at java.base/java.lang.Class.forName0(Native Method) |  
at java.base/java.lang.Class.forName(Unknown Source) |  
at org.springframework.util.ClassUtils.forName(ClassUtils.java:308) |  
at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:218) |  
... 16 more |  
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.env.EnvironmentPostProcessor |  
at java.base/java.net.URLClassLoader.findClass(Unknown Source) |  
at java.base/java.lang.ClassLoader.loadClass(Unknown Source) |  
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.loadClass(JarUrlClassLoader.java:97) |  
at org.springframework.boot.loader.launch.LaunchedClassLoader.loadClass(LaunchedClassLoader.java:91) |  
at java.base/java.lang.ClassLoader.loadClass(Unknown Source) |  
... 32 more |  

主要言語
Java
スター
50
フォーク
33
平均マージ
6日 2時間
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

spring-cloud/spring-cloud-bindings のほかの issue

spring-cloud/spring-cloud-bindings の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。