news 2026/1/29 5:07:32

SAP 的 JDK — SAP Machine | github.com/SAP/SapMachine 一个服务企业级开发的 Java JDK 版本

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
SAP 的 JDK — SAP Machine | github.com/SAP/SapMachine 一个服务企业级开发的 Java JDK 版本

启用 winstall 安装 SAP Machine

https://winstall.app/apps/SAP.SapMachine.21.JDK

winget install -e --id SAP.SapMachine.21.JDK

SAP 开源了 https://github.com/SAP/SapMachine

This project contains a downstream version of the OpenJDK project. It is used to build and maintain a SAP supported version of OpenJDK for SAP customers and partners who wish to use OpenJDK to run their applications.

We want to stress that this is clearly a "friendly fork". SAP is committed to ensuring the continued success of the Java platform.

More details about theSAP’s Engagement in the OpenJDK project,installation instructions,frequently asked questions,the maintenance and support statement, and more are available in the documentation.

该项目包含OpenJDK项目的下游版本,旨在为希望使用OpenJDK运行应用程序的SAP客户及合作伙伴构建和维护SAP支持的OpenJDK版本。

我们特别强调这属于"友好分支"。SAP致力于确保Java平台的持续成功。

关于SAP参与OpenJDK项目的详情、安装指南、常见问题解答、维护支持声明等内容,请参阅文档部分。

https://www.sap.com/about/company/innovation/open-source.html

Our commitments:

  • Consistent contributions

  • Championing open standards

  • Open-first approach

  • Nurturing open source ecosystems

  • Feedback-driven approach

How we engage:

  • Respectful engagement

  • Sustained support

  • Clear and fair licensing

Empowering our employees:

  • Encouraging open source participation

  • Continuous learning

  • Acknowledgment of excellence

  • InnerSource

JDK 21 Upgrade Learnings from SAP Commerce Version 2205

https://community.sap.com/t5/crm-and-cx-blog-posts-by-sap/sap-cc-jdk-21-upgrade/ba-p/14282138

We have successfully completed a JDK 21 upgrade from SAP Commerce version 2205 (previously on JDK 17). Sharing our learnings and resolutions encountered during the upgrade which may be helpful for similar implementations.

1. Automation Support Using OpenRewrite

SAP has provided customized OpenRewrite recipes to automate static code migrations. These greatly reduce manual effort.

👉Refer to SAP Note #3618495 (OpenRewrite automation guide) for detailed execution steps.

Outcome: Automates majority of standard class and package-level updates.

2. Manual Fixes Post-OpenRewrite Execution

Some library-level changes require manual fixes such as: - Assertion - Common.lang - RFCConstantsjakarta.jms

Action: Update imports and usage based on the upgraded libraries.

3. Server Startup & Initialization Issues

Several issues were observed during server startup and platform initialization. Details and solutions below.

Issue A — Spring Security Context Initialization Failure

Error:

Context initialization failed - Error creating bean with name 'org.springframework.security.filterChains'
NoSuchBeanDefinitionException: No bean named 'mvcHandlerMappingIntrospector' available.

Root Cause: Spring Security 6.x requires a shared ApplicationContext with Spring MVC when using MvcRequestMatcher.

Resolution:Update web.xml to ensure MVC config loads into the main context instead of DispatcherServlet.

Added MVC configuration into global context

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
WEB-INF/config/customextension-web-app-config.xml
WEB-INF/config/customextension-spring-mvc-config.xml
</param-value>
</context-param>

Cleared separate servlet context

<param-name>contextConfigLocation</param-name>
<param-value></param-value>

Outcome:Application started successfully.

Issue B — Invalid URL Pattern Mapping in Spring MVC

Error:

PatternParseException: No more pattern data allowed after {*...} or ** pattern element

Root Cause:Legacy wildcards like /**/something, /**, {*path} are not supported under PathPatternParser.

Solution:Switch back to AntPathMatcher in spring-mvc-config.xml.

<bean id="pathMatcher" class="org.springframework.util.AntPathMatcher" />
<mvc:annotation-driven>
<mvc:path-matching path-matcher="pathMatcher"/>
</mvc:annotation-driven>

Outcome:Legacy mappings restored, storefront initialized.

Issue C — Spring Security 6 Intercept-URL Failure

Error:

IllegalArgumentException: expressionString cannot be empty

Root Cause:Spring Security 6 does not allow intercept-url without an access expression.

Fix:Add default authorization

<security:intercept-url pattern="/**" access="permitAll()" />

Outcome:Security filter chain initialized successfully.

Issue D — AuditReportServices Impex Failure During UpdateSystem

Error:Deprecated password encoder triggered failure.

PBKDF2WithHmacSHA1SaltedPasswordEncoder is deprecated

Fix:Temporarily allow legacy password encoding

legacy.password.encoding.enabled=true

🔄Revert setting post-update if needed for backward compatibility.

Issue E — Ambiguous Mapping for “/” After Upgrade

Error:

IllegalStateException: Ambiguous handler methods mapped for '/'

Root Cause:Two controllers mapped to /.

Solution:Update default controller fallback

@RequestMapping(value = "/**", method = RequestMethod.GET)

Issue F — Spring 6 JSP BindTag Error

Error:Missing command model attribute.

Neither BindingResult nor plain target object for bean name 'command'

Resolution:Add required model attributes

@ModelAttribute("command")
public LoginForm commandLoginForm() { return new LoginForm(); }

Issue G — Security JSP authorize Tag Failure

Error:Missing ExpressionHandler

No visible WebSecurityExpressionHandler instance could be found

Fix:

<bean id="webSecurityExpressionHandler"
class="org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler"/>

Issue H — No Mapping for GET Warnings

Solution: Add explicit URL mappings where needed.

@RequestMapping("/search/")
@GetMapping("/quote-requests/")

Conclusion

JDK 21 + Spring 6 migration introduces strict compatibility constraints requiring updates in: - Spring MVC URL mapping - Spring Security configuration rules - Application context structure - JSP model binding - Password encoding framework

The above resolutions enabled successful storefront startup and full system initialization.

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/1/23 14:55:57

小白必看:什么是WiFi密码字典及其基本用法

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容&#xff1a; 创建一个交互式WiFi密码字典学习应用&#xff0c;通过简单示例演示密码字典的工作原理。要求包含基础知识讲解、简单字典生成演示和实际应用场景说明。使用HTMLJavaScript实现可视化…

作者头像 李华
网站建设 2026/1/27 9:17:33

传统调试 vs AI辅助:解决Internal Server Error的效率对比

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容&#xff1a; 构建一个对比工具&#xff0c;左侧展示传统调试步骤&#xff08;查看日志、手动排查等&#xff09;&#xff0c;右侧展示AI辅助调试流程&#xff08;自动分析、建议修复&#xff09…

作者头像 李华
网站建设 2026/1/8 22:12:17

系统迁移时如何处理Temp文件夹?专家建议

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容&#xff1a; 开发一个系统迁移辅助工具&#xff0c;专门处理Temp目录&#xff1a;1) 分析临时文件使用情况 2) 智能识别需要保留的文件 3) 生成迁移报告 4) 支持自定义过滤规则 5) 与主流迁移工…

作者头像 李华
网站建设 2026/1/26 21:14:20

姬无烦科幻与张祥前统一场论的完美融合

姬无烦科幻与张祥前统一场论的完美融合 引言&#xff1a;科幻与科学的奇妙邂逅 当科幻作家的想象力与物理学家的公式相遇&#xff0c;会碰撞出怎样的火花&#xff1f; 在《外星文明与人类未来》这部姬无烦的科幻小说中&#xff0c;我们看到了一个充满奇迹的未来&#xff1a;飞碟…

作者头像 李华
网站建设 2026/1/28 1:18:37

Java并发编程面试题:ThreadLocal(8题)

&#x1f9d1; 博主简介&#xff1a;CSDN博客专家&#xff0c;历代文学网&#xff08;PC端可以访问&#xff1a;https://literature.sinhy.com/#/?__c1000&#xff0c;移动端可微信小程序搜索“历代文学”&#xff09;总架构师&#xff0c;15年工作经验&#xff0c;精通Java编…

作者头像 李华
网站建设 2026/1/27 6:27:15

消息队列设计:从同步到异步的性能突破

前言 2024年初&#xff0c;我们的订单系统经常出现"超时"问题。用户下单后&#xff0c;系统需要同时调用库存服务、支付服务、通知服务&#xff0c;任何一个服务慢都会导致整个请求超时。 我们决定引入消息队列&#xff0c;将同步调用改为异步处理。这个改造带来了…

作者头像 李华