Skip to content

Task 1: Upgrade Docker Base Images#194

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/task1-upgrade-docker-base-images
Open

Task 1: Upgrade Docker Base Images#194
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/task1-upgrade-docker-base-images

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented May 1, 2026

Summary

Upgrades the Docker base images for both the Java application and MySQL database to modern, supported versions:

  • ftgo-application/Dockerfile: openjdk:8u171-jre-alpineeclipse-temurin:17-jre-alpine (Java 8 → Java 17, Eclipse Temurin is the community-supported successor to Oracle OpenJDK Docker images)
  • mysql/Dockerfile: mysql:5.7.13mysql:8.0 (MySQL 5.7 is EOL as of October 2023)
  • docker-compose.yml:
    • Added command: --default-authentication-plugin=mysql_native_password to the MySQL service for backward compatibility with clients expecting the legacy authentication method
    • Updated JDBC driver class from com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver (the old class is deprecated in MySQL Connector/J 8.x)

Review & Testing Checklist for Human

  • Verify docker-compose up builds and starts both services successfully
  • Confirm the ftgo-application connects to MySQL 8.0 without authentication errors
  • Run a quick smoke test (e.g., create an order) to validate end-to-end functionality

Notes

  • The mysql_native_password authentication plugin is set explicitly because MySQL 8.0 defaults to caching_sha2_password, which may cause compatibility issues with older JDBC drivers.
  • The Java application may need source-level changes if it uses APIs removed in Java 9+ (not addressed in this PR, which focuses on Docker image upgrades only).

Link to Devin session: https://app.devin.ai/sessions/30e305beec4d4a92b0e44423d58a81ef
Requested by: @WesternConcrete


Devin Review

Status Commit
⚪ Not started

Run Devin Review

💡 Connect your GitHub account to enable automatic code reviews.

Open in Devin Review (Staging)
Open in Devin Review

Co-Authored-By: Wes Convery <2wconvery@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

@@ -1,4 +1,4 @@
FROM openjdk:8u171-jre-alpine
FROM eclipse-temurin:17-jre-alpine
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Java 17 runtime is incompatible with Spring Boot 2.0.3, causing startup crash

The Dockerfile upgrades the JRE from OpenJDK 8 to Eclipse Temurin 17, but the application uses Spring Boot 2.0.3.RELEASE (gradle.properties:6). Spring Boot 2.0.3 uses Spring Framework 5.0.x, which relies on reflective access to JDK internals (e.g., setAccessible() on internal classes). Java 17 enforces strong encapsulation by default (--illegal-access=deny since Java 16), which will cause the application to crash at startup with InaccessibleObjectException. Spring Boot only officially supports Java 17 starting from version 2.5.5+/2.6.x. The JAVA_OPTS in docker-compose.yml:25 is set to -Xmx192m with no --add-opens flags to work around this. The fix requires either upgrading Spring Boot to a Java 17-compatible version (e.g., 2.7.x or 3.x), adding the necessary --add-opens JVM flags, or reverting to a compatible JRE (8 or 11).

Prompt for agents
The Dockerfile has been changed to use eclipse-temurin:17-jre-alpine, but the application is built with Spring Boot 2.0.3.RELEASE (defined in gradle.properties). Spring Boot 2.0.3 does not support Java 17 — it requires Java 8-10. Java 17 strongly encapsulates JDK internals, breaking the deep reflection that Spring Framework 5.0.x and Hibernate (used via spring-boot-starter-data-jpa) rely on.

The application will crash at startup with InaccessibleObjectException errors.

Possible fixes:
1. Keep using a Java 8 or 11 base image (e.g., eclipse-temurin:11-jre-alpine) which is compatible with Spring Boot 2.0.3.
2. Upgrade Spring Boot to a version that supports Java 17 (at minimum 2.5.5, preferably 2.7.x or 3.x), which is a much larger change requiring updates to gradle.properties, build.gradle (sourceCompatibility/targetCompatibility), and potentially dependency/API changes.
3. As a workaround, add --add-opens flags to JAVA_OPTS in docker-compose.yml (e.g., --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED, etc.), though this is fragile and not recommended for production.

Relevant files: gradle.properties (springBootVersion), build.gradle (source/target compatibility set to 1.8), docker-compose.yml (JAVA_OPTS), ftgo-application/Dockerfile.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — Spring Boot 2.0.3 (gradle.properties:6) with sourceCompatibility = '1.8' (build.gradle:21) is indeed not officially compatible with Java 17 due to strong encapsulation of JDK internals.

This change was explicitly requested as-is. A follow-up task may be needed to either:

  1. Upgrade Spring Boot to 2.7.x+ or 3.x for full Java 17 support
  2. Add --add-opens flags to JAVA_OPTS as a workaround
  3. Use eclipse-temurin:11-jre-alpine as a safer intermediate step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant