marmot-z opened a new issue, #15106:
URL: https://github.com/apache/dubbo/issues/15106

   
   ### Discussed in https://github.com/apache/dubbo/discussions/15105
   
   <div type='discussions-op-text'>
   
   <sup>Originally posted by **marmot-z** February  5, 2025</sup>
   ### Pre-check
   
   - [X] I am sure that all the content I provide is in English.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Details
   
   [In a commit in dubbo 3.x](https://github.com/apache/dubbo/pull/11950), 
after upgrading snakeyaml from 1.x to 2.x, the following exception will occur 
after starting spring boot starter 2.1.x: 
   
   ```
   java.lang.NoSuchMethodError: org.yaml.snakeyaml.constructor.Constructor: 
method <init>()V not found
   at 
org.springframework.boot.env.OriginTrackedYamlLoader$OriginTrackingConstructor.<init>(OriginTrackedYamlLoader.java:82)
   at 
org.springframework.boot.env.OriginTrackedYamlLoader$OriginTrackingConstructor.<init>(OriginTrackedYamlLoader.java:82)
   at 
org.springframework.boot.env.OriginTrackedYamlLoader.createYaml(OriginTrackedYamlLoader.java:64)
   at 
org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:132)
   at 
org.springframework.boot.env.OriginTrackedYamlLoader.load(OriginTrackedYamlLoader.java:75)
   at 
org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:50)
   ....
   ```
   
   The reason is that some obsolete methods were removed in snakeyaml 2.x, 
which caused spring boot to fail to load the corresponding method when it 
started. [This issue also mentioned 
it](https://github.com/apache/dubbo/pull/12399). 
   
   The solution I can think of is to upgrade the spring boot version to 3.0.x 
to ensure that the snakeyaml versions used by dubbo and spring boot are 
compatible. However, upgrading the spring boot version has a wide range of 
impacts. I would like to ask if there are other solutions besides this? 🙏🙏🙏 
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   </div>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to