Troubleshooting
Problem
Spring is an application framework for the Java platform. It manages communication between a model and several views. An open source framework, it is used in the foundation of IBM Operational Decision Manager Decision Center in the Business console and the REST API. An incompatibility with old versions of JBoss has been introduced in Spring 5.3. There are workarounds, but they require you to either modify the Spring deployment or add a fake module to JBoss.
Symptom
Resolving The Problem
The actual issue is that Spring-core 5.3.x contains the MANIFEST.MF file entry Dependencies: jdk.unsupported. If you remove this entry from the JAR's MANIFEST.MF file, you can use Spring-core 5.3.x in the Wildfly 10.X version.
To patch Spring-core 5.3.x and pull it into the classpath, do the following steps:
- Open the JAR file with an archive utility tool. Open MANIFEST.MF and remove the last line -- Dependencies: jdk.unsupported -- and save your changes.
- Put the patched JAR file into your lib project folder.
- Exclude Spring-core 5.3.x at the project level, and direct the build tool to use the patched Spring-core 5.3.x library from the project directory and add it to your classpath.
The following code snippet for gradle users shows how to add the patched JAR and exclude Spring-core 5.3.x at the project level:
dependencies {
//Adding the patched JAR into the classpath from a project directory
compile files('lib/spring-core-5.3.3.jar')
}
configurations.all {
//Excluding the spring-core-5.3.3.jar at the project level
exclude group: 'org.springframework', module: 'spring-core'
}
- Create a new folder under $JBOSS_PATH/modules/system/layers/base. Name the folder jdk/unsupported/main.
- Create a new file in the main folder, and name the file module.xml
- Add the following content to the file:
<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.5" name="jdk.unsupported"> </module>
Related Information
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
10 June 2022
UID
ibm16594119