Skip to content
Draft

Jdk25 #3839

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
adb2bb3
preparing for jdk25
shroffk Jun 17, 2026
9ed6261
fix the workflows for jdk25
shroffk Jun 17, 2026
ffd5a3d
also updating the service image creation workflows
shroffk Jun 17, 2026
1f624e7
moving javafx to 25 ( now possible with jdk25 )
shroffk Jun 17, 2026
4a2678f
Resolve merge conflicts with master
Copilot Jun 29, 2026
4b4c334
Merge branch 'master' into jdk25
shroffk Jul 27, 2026
091abce
fix jdk version in github workflow setup
shroffk Jul 27, 2026
0084557
update springboot to 4.0.5
shroffk Jul 27, 2026
16bfdf8
add the new webmvc test dependency
shroffk Jul 27, 2026
8378d0c
update javax to jakarta in the core-websocker client
shroffk Jul 27, 2026
5f360d2
fix the javax import for the alarm-logger service
shroffk Jul 27, 2026
46a105e
updating save and restore springboot dependencies
shroffk Jul 27, 2026
fe68836
updating the spring security used by save and restore
shroffk Jul 27, 2026
1172b56
updating the javafx test environment - post openjfx upgrade
shroffk Jul 27, 2026
dc394c2
updating jackson dependencies
shroffk Jul 28, 2026
46e6220
add a seperate property for jackson annotation dep version
shroffk Jul 28, 2026
e07f568
cleanup properties syntax
shroffk Jul 28, 2026
be0d2b3
trying to fix the jackson dependencies and adding parameter compiler …
shroffk Jul 29, 2026
635f4f9
prepare for the migration to jackson 3
shroffk Jul 29, 2026
b2ce04c
move save and restore to jackson 3
shroffk Jul 29, 2026
328e841
update jackson dependency for alarm
shroffk Jul 29, 2026
2d0b2b1
upgrade the serializer and deserializer to jackson3
shroffk Jul 29, 2026
11626e5
jackson3: simple import name fixes, exception class fixed
shroffk Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-java/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ runs:
- uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287
with:
distribution: temurin
java-version: '21'
java-version: '25'
cache: maven
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://control-system-studio.readthedocs.io


## Requirements
- [JDK21 or later, suggested is OpenJDK](https://adoptium.net/en-GB/temurin/releases?version=21).
- [JDK 25 or later, suggested is OpenJDK](https://adoptium.net/en-GB/temurin/releases?version=25).
- [maven 3.x](https://maven.apache.org/) or [ant](http://ant.apache.org/)


Expand All @@ -27,7 +27,7 @@ mvn clean verify -f dependencies/pom.xml
Define the JAVA_HOME environment variable to point to your Java installation directory.
Mac OS users should use something like:
```
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-21.0.11+10/Contents/Home
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-25/Contents/Home
```
Verify through:
```
Expand Down Expand Up @@ -73,14 +73,14 @@ Download "Eclipse for Java Developers" from https://www.eclipse.org/downloads/pa

Start Eclipse like this:

export JAVA_HOME=/path/to/your/jdk-21-or-later
export JAVA_HOME=/path/to/your/jdk-25-or-later
export PATH="$JAVA_HOME/bin:$PATH"
eclipse/eclipse -consoleLog

Check Eclipse Preferences:

* Java, Installed JREs: JDK 21-or-later should be the default
* Java, Compiler: JDK Compliance should be "21" or higher
* Java, Installed JREs: JDK 25-or-later should be the default
* Java, Compiler: JDK Compliance should be "25" or higher


### Use plain Java configuration
Expand Down Expand Up @@ -112,7 +112,7 @@ In Help/Eclipse Marketplace, search for Maven Integration for Eclipse Luna or ne
Use File/Import/Maven/Existing Maven Projects to import the phoebus source code.

There can be a compiler error because the "JRE System Library" in the Package Explorer shows "[J2SE-1.4]".
Right click on the affected projects (greeting-app, probe), Build Path, Configure Build Path, Libraries, Edit the JRE System Library to use the Workspace default (jdk-21).
Right click on the affected projects (greeting-app, probe), Build Path, Configure Build Path, Libraries, Edit the JRE System Library to use the Workspace default (jdk-25).
Restart Eclipse IDE.

Can now start product/src/main/java/org.phoebus.product/Launcher.java.
Expand All @@ -126,14 +126,14 @@ To import the project:
* Select the Phoebus directory
* Import project from external model: Maven
* Accept the default options and click Next twice
* Ensure that the JDK is version 21 or above
* Ensure that the JDK is version 25 or above
* Change the project name to Phoebus and click finish

To run the Phoebus application:

* Run | Edit Configurations...
* Select + | Application
* Module: Your JRE 21
* Module: Your JRE 25
* Classpath `-cp`: select `product` from drop-down
* Main class: `org.phoebus.product.Launcher`
* Set the name to Phoebus
Expand All @@ -145,7 +145,7 @@ To run the Phoebus application:

First download [NetBeans 9](https://netbeans.apache.org/download/nb90/nb90.html),
then the target platform as described above. After running NetBeans, select
**Tools** ➜ **Java Platforms** and make sure that a Java 9 or 10 platform is set as
**Tools** ➜ **Java Platforms** and make sure that a Java 25 platform is set as
the default one.

To open the Maven project Select the **File** ➜ **Open Project…** and select the
Expand Down
15 changes: 5 additions & 10 deletions app/alarm/logging-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,19 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
<version>${tools.jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
<version>${jackson.annotations.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson.version}</version>
<version>${tools.jackson.version}</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.phoebus.applications.alarm.logging.ui;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.DeserializationFeature;
import tools.jackson.databind.ObjectMapper;
import org.phoebus.framework.jobs.Job;
import org.phoebus.framework.jobs.JobManager;
import org.phoebus.framework.jobs.JobRunnableWithCancel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.phoebus.applications.alarm.logging.ui;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.DeserializationFeature;
import tools.jackson.databind.ObjectMapper;
import javafx.collections.ObservableMap;
import org.phoebus.applications.alarm.logging.ui.AlarmLogTableQueryUtil.Keys;
import org.phoebus.framework.jobs.Job;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.phoebus.applications.alarm.logging.ui;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import tools.jackson.core.JacksonException;
import tools.jackson.databind.JsonNode;
import tools.jackson.databind.ObjectMapper;
import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
import javafx.animation.Timeline;
Expand Down Expand Up @@ -289,7 +288,7 @@
}
final boolean latching = jsonNode.get("latching").asBoolean();
return new SimpleStringProperty(latching ? "Enabled:Latched" : "Enabled:Unlatch");
} catch (Exception e) {

Check warning on line 291 in app/alarm/logging-ui/src/main/java/org/phoebus/applications/alarm/logging/ui/AlarmLogTableController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace "e" with an unnamed pattern.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AZ-zgjviMoKBo2C5RU3-&open=AZ-zgjviMoKBo2C5RU3-&pullRequest=3839
logger.log(Level.SEVERE, "Unexpected error in alarmMessage" + e);
}
}
Expand Down Expand Up @@ -550,10 +549,6 @@

private static final ObjectMapper objectMapper = new ObjectMapper();

static {
objectMapper.registerModule(new JavaTimeModule());
}

@FXML
public void createContextMenu() {
final ContextMenu contextMenu = new ContextMenu();
Expand All @@ -564,7 +559,7 @@
try {
URI uri = new URI(e.getConfig().replace(" ", "%20"));
return uri.getSchemeSpecificPart();
} catch (URISyntaxException ex) {

Check warning on line 562 in app/alarm/logging-ui/src/main/java/org/phoebus/applications/alarm/logging/ui/AlarmLogTableController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace "ex" with an unnamed pattern.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AZ-zgjviMoKBo2C5RU3_&open=AZ-zgjviMoKBo2C5RU3_&pullRequest=3839
ex.printStackTrace();
}
return null;
Expand Down Expand Up @@ -593,7 +588,7 @@
Object jsonObject = objectMapper.readValue(result.getConfig_msg(), Object.class);
sb.append("config_msg: ").append(objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(jsonObject)).append(newLine);
alarmInfo.setContentText(sb.toString());
} catch (JsonProcessingException e) {
} catch (JacksonException e) {

Check warning on line 591 in app/alarm/logging-ui/src/main/java/org/phoebus/applications/alarm/logging/ui/AlarmLogTableController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace "e" with an unnamed pattern.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AZ-zgjviMoKBo2C5RU4A&open=AZ-zgjviMoKBo2C5RU4A&pullRequest=3839
alarmInfo.setContentText(Messages.ConfigurationInfoNotFound);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import tools.jackson.core.JacksonException;
import tools.jackson.core.JsonParser;
import tools.jackson.databind.DeserializationContext;
import tools.jackson.databind.JsonDeserializer;
import tools.jackson.databind.annotation.JsonDeserialize;

import java.io.IOException;
import java.time.Instant;

@JsonInclude(Include.NON_NULL)
Expand Down Expand Up @@ -158,7 +157,7 @@ public AlarmInstantDeserializer() {
}

@Override
public Instant deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException {
public Instant deserialize(JsonParser p, DeserializationContext ctxt) throws JacksonException {
return Instant.parse(p.getText());
}
}
Expand Down
13 changes: 4 additions & 9 deletions app/alarm/model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
<version>${tools.jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson.version}</version>
<version>${tools.jackson.version}</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import tools.jackson.core.JacksonException;

/**
*
Expand Down Expand Up @@ -108,7 +108,7 @@ public Map<String, String> sourceMap() {
public String toString() {
try {
return objectMapper.writeValueAsString(this);
} catch (JsonProcessingException e) {
} catch (JacksonException e) {
logger.log(Level.WARNING, "failed to parse the alarm command message ", e);
}
return "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import tools.jackson.core.JacksonException;

/**
*
Expand Down Expand Up @@ -225,7 +225,7 @@ public boolean isLeaf() {
public String toString() {
try {
return AlarmMessageUtil.objectConfigMapper.writeValueAsString(this);
} catch (JsonProcessingException e) {
} catch (JacksonException e) {
logger.log(Level.WARNING, "failed to parse the alarm config message ", e);
}
return "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import java.util.logging.Level;

import com.fasterxml.jackson.core.JsonProcessingException;
import tools.jackson.core.JacksonException;

/** Alarm detail */
public class AlarmDetail {
Expand Down Expand Up @@ -62,7 +62,7 @@ public void setDelay(int delay) {
public String toString() {
try {
return objectMapper.writeValueAsString(this);
} catch (JsonProcessingException e) {
} catch (JacksonException e) {
logger.log(Level.WARNING, "failed to parse the alarm detail message ", e);
}
return "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import tools.jackson.core.JacksonException;

/**
* A message which describes both state and configuration events
Expand Down Expand Up @@ -417,9 +417,9 @@ public void setDelete(String delete) {
/**
* @return json string representation of this object
*
* @throws JsonProcessingException on error
* @throws JacksonException on error
*/
public String toJson() throws JsonProcessingException {
public String toJson() throws JacksonException {
if (isConfig()) {
return objectConfigMapper.writeValueAsString(this);
} else if (isState()){
Expand All @@ -433,7 +433,7 @@ public String toJson() throws JsonProcessingException {
public String toString() {
try {
return toJson();
} catch (JsonProcessingException e) {
} catch (JacksonException e) {
logger.log(Level.WARNING, "failed to parse the alarm message ", e);
}
return "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import tools.jackson.databind.ObjectMapper;
import tools.jackson.databind.json.JsonMapper;
import tools.jackson.databind.module.SimpleModule;
import org.phoebus.applications.alarm.model.EnabledState;

import java.io.Serializable;
Expand All @@ -24,30 +24,26 @@ public class AlarmMessageUtil implements Serializable{

// Object mapper for the alarm state messages
@JsonIgnore
static final ObjectMapper objectStateMapper = new ObjectMapper();
static {
objectStateMapper.registerModule(new JavaTimeModule());
objectStateMapper.addMixIn(AlarmMessageUtil.class, AlarmStateJsonMessage.class);
}
static final ObjectMapper objectStateMapper = JsonMapper.builder()
.addMixIn(AlarmMessageUtil.class, AlarmStateJsonMessage.class)
.build();

// Object mapper for the alarm config messages
@JsonIgnore
static final ObjectMapper objectConfigMapper = new ObjectMapper();
static final ObjectMapper objectConfigMapper;
static {
SimpleModule simple_module = new SimpleModule();
simple_module.addSerializer(new EnabledSerializer());

objectConfigMapper.registerModule(new JavaTimeModule());
objectConfigMapper.registerModule(simple_module);
objectConfigMapper.addMixIn(AlarmMessageUtil.class, AlarmConfigJsonMessage.class);
objectConfigMapper = JsonMapper.builder()
.addModule(simple_module)
.addMixIn(AlarmMessageUtil.class, AlarmConfigJsonMessage.class)
.build();
}

// Object mapper for all other alarm messages
@JsonIgnore
static final ObjectMapper objectMapper = new ObjectMapper();
static {
objectMapper.registerModule(new JavaTimeModule());
}

private static class AlarmStateJsonMessage {
@JsonIgnore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import tools.jackson.core.JacksonException;

/**
* A bean representing a alarm state message
Expand Down Expand Up @@ -206,7 +206,7 @@ public Map<String, String> sourceMap() {
public String toString() {
try {
return AlarmMessageUtil.objectStateMapper.writeValueAsString(this);
} catch (JsonProcessingException e) {
} catch (JacksonException e) {
logger.log(Level.WARNING, "failed to parse the alarm state message ", e);
}
return "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import tools.jackson.core.JacksonException;

/** Talk message */
@JsonInclude(Include.NON_NULL)
Expand Down Expand Up @@ -56,7 +56,7 @@ public void setTalk(String talk) {
public String toString() {
try {
return objectMapper.writeValueAsString(this);
} catch (JsonProcessingException e) {
} catch (JacksonException e) {
logger.log(Level.WARNING, "failed to parse the alarm talk message ", e);
}
return "";
Expand Down
Loading
Loading