news 2026/4/4 10:13:40

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/4/3 4:34:01

1小时快速验证:用Rerank模型改进客服问答系统

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容&#xff1a; 构建客服问答Rerank原型系统&#xff0c;要求&#xff1a;1.使用现成QA对数据集 2.集成Sentence-BERT进行语义检索 3.添加基于用户反馈日志的Rerank层(点击率、解决率等特征) 4.实现…

作者头像 李华
网站建设 2026/4/1 18:08:14

FFN与MLP的关系

文章目录FFN与MLP的定义FFN与MLP的关联结构对比应用场景差异数学表达示例总结MLP实现代码代码说明代码实现参数说明使用示例关键设计点FFN与MLP的定义 FFN&#xff08;Feed-Forward Network&#xff09;是一种前馈神经网络&#xff0c;由输入层、隐藏层和输出层组成&#xff0…

作者头像 李华
网站建设 2026/4/2 7:07:55

告别手动adb push:3种高效替代方案对比

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容&#xff1a; 开发一个效率对比工具&#xff0c;展示四种adb push方式的性能差异&#xff1a;1. 传统手动命令&#xff1b;2. Shell脚本自动化&#xff1b;3. 图形界面工具&#xff1b;4. AI智能…

作者头像 李华
网站建设 2026/4/2 2:09:12

CUDA_VISIBLE_DEVICES:提升GPU利用率的3个技巧

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容&#xff1a; 编写一个性能对比测试脚本&#xff0c;比较使用和不使用CUDA_VISIBLE_DEVICES时的GPU利用率差异。脚本应&#xff1a;1) 在两种模式下运行相同的深度学习训练任务&#xff1b;2) 记…

作者头像 李华
网站建设 2026/3/21 4:04:19

传统调试vsAI辅助:解决Spring启动异常效率对比

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容&#xff1a; 创建一个效率对比工具&#xff0c;能够&#xff1a;1. 模拟生成Spring启动异常场景&#xff1b;2. 记录手动调试过程耗时&#xff1b;3. 展示AI辅助诊断过程&#xff1b;4. 生成对比…

作者头像 李华
网站建设 2026/3/25 18:37:31

Keil零基础入门:用STM32点亮第一个LED的全流程解析

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容&#xff1a; 制作一个面向新手的STM32F103C8T6开发教程项目&#xff0c;要求&#xff1a;1.逐步演示Keil MDK安装和配置 2.创建完整LED闪烁工程 3.包含GPIO初始化代码详解 4.提供J-link/ST-link…

作者头像 李华