Skip to content

Conversation

Karm
Copy link
Owner

@Karm Karm commented Sep 28, 2025

No description provided.

@Karm Karm self-assigned this Sep 28, 2025
@Karm Karm requested a review from jerboaa September 28, 2025 17:35
@Karm
Copy link
Owner Author

Karm commented Sep 28, 2025

@jerboaa Some more whitelists; GHA does not show it because GHA does not run the full suite.

Comment on lines 309 to 313
if ((UsedVersion.getVersion(inContainer).compareTo(Version.create(25, 0, 0)) >= 0)) {
// https://github.com/quarkusio/quarkus/issues/47769
p.add(Pattern.compile(".*to use the thread-local-reset capability on Java 24 or later.*"));
p.add(Pattern.compile(".*Could not initialize class org.jboss.threads.JDKSpecific.*"));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where do we see those? A better fix would be to run native-image with -J--add-opens=java.base/java.lang=ALL-UNNAMED since we know it's needed for a newly generated quarkus app. This avoids not seeing them when we actually don't expect it.

Copy link
Owner Author

Choose a reason for hiding this comment

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

@jerboaa Quarkus app: https://github.com/Karm/mandrel-integration-tests/tree/master/apps/quarkus-mp-orm-dbs-awt

So while possible with -Dquarkus.native.additional-build-args= not sure if it's the place fir the TS to add it. I assumed it's gonna be fixed with your Q update in the comment.

Copy link
Collaborator

@jerboaa jerboaa Sep 29, 2025

Choose a reason for hiding this comment

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

So while possible with -Dquarkus.native.additional-build-args= not sure if it's the place for the TS to add it

I think we should fix it that way. This ensures we don't get the thread-local-reset warning even when running on Mandrel 24+ for quarkus-pm-orm-dbs-awt, but for no other app. The current approach in this patch disables the warning for all apps in the TS when run on Mandrel 25+.

I assumed it's gonna be fixed with your Q update in the comment.

quarkusio/quarkus#47637 fixed it for quarkus-core. Since this is an app generated separately, it'll need the add-opens on launch separately I think. Unless my understanding isn't correct and I miss something.

Copy link
Owner Author

Choose a reason for hiding this comment

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

The current approach in this patch disables the warning for all apps in the TS when run on Mandrel 25+.

Not true, it affects only this app: QUARKUS_MP_ORM_DBS_AWT

So it's really a matter of either adding the -J--add-opens to the command line or whitelisting it here.

I am O.K. with adding it to the app's command line though, so I'll refactor it...

Copy link
Collaborator

Choose a reason for hiding this comment

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

The current approach in this patch disables the warning for all apps in the TS when run on Mandrel 25+.

Not true, it affects only this app: QUARKUS_MP_ORM_DBS_AWT

Ah, right. My bad.

@Karm
Copy link
Owner Author

Karm commented Oct 13, 2025

@jerboaa So I have this major refactor coming that deals with --add-opens=java.base/java.lang=ALL-UNNAMED and --enable-native-access=ALL-UNNAMED everywhere and as usual it's a kind of a mess, e.g. the way we do things , adding -Dquarkus.native.additional-build-args= doesn't help HotSpot run, that needs to be adjusted in pom.xml/JAVA_OPTS and also appending -Dquarkus.native.additional-build-args= overrides the same property in application.properties files.
Gonna sort it and re-test it.

WhiteList all such things as originally done in this PR "just works" but I agree it's a somewhat lazy approach.

Copy link
Collaborator

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

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

Fair enough.

@Karm Karm force-pushed the jdk25-white branch 2 times, most recently from 7500cc1 to f4313a3 Compare October 13, 2025 23:56
@Karm
Copy link
Owner Author

Karm commented Oct 14, 2025

Oh, 🤦 my local terminal had in it's env

export JAVA_OPTS="--enable-native-access=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED";
export MAVEN_OPTS="--enable-native-access=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED";

so that's why these didn't fail for me locally.

Fixing...

@Karm Karm force-pushed the jdk25-white branch 2 times, most recently from 9f52198 to d9f0ea8 Compare October 14, 2025 09:50
@Karm
Copy link
Owner Author

Karm commented Oct 14, 2025

Latest Quarkus needs porting for the container run:

Build step io.quarkus.datasource.deployment.devservices.DevServicesDatasourceProcessor#launchDatabases
threw an exception: io.quarkus.runtime.configuration.ConfigurationException: Cannot set a port for the Dev Service
of datasource 'quarkus.datasource."db1".devservices.port' using 'datasource db1',
because it is using a shared network, which disables port mapping 

Also a continuation of SmallRye Command "we treat anything in stderr as a warning" :-(

Warning:  [io.smallrye.common.process] SRCOM05000: Command docker (pid 24262) completed but logged errors:

Fixing...

@Karm
Copy link
Owner Author

Karm commented Oct 15, 2025

Latest Quarkus needs porting for the container run:

Build step io.quarkus.datasource.deployment.devservices.DevServicesDatasourceProcessor#launchDatabases
threw an exception: io.quarkus.runtime.configuration.ConfigurationException: Cannot set a port for the Dev Service
of datasource 'quarkus.datasource."db1".devservices.port' using 'datasource db1',
because it is using a shared network, which disables port mapping 

Also a continuation of SmallRye Command "we treat anything in stderr as a warning" :-(

Warning:  [io.smallrye.common.process] SRCOM05000: Command docker (pid 24262) completed but logged errors:

Fixing...

It's quarkusio/quarkus#50015

Contemporary Quarkus doesn't need that so I switched ports to dev profile only.

@Karm Karm requested a review from jerboaa October 15, 2025 12:10
@Karm
Copy link
Owner Author

Karm commented Oct 15, 2025

@jerboaa So the topic of opening java.base to ALL-UNNAMED and allowing native access to ALL-UNNAMED is resolved with this PR in both pertinent areas:

  • Maven itself via .mvn properties
  • native-image via -J flag, sometimes as a command line arg, sometimes in application.properties

@jerboaa
Copy link
Collaborator

jerboaa commented Oct 16, 2025

Thanks!

@Karm Karm merged commit 7cb58dc into master Oct 16, 2025
47 checks passed
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.

2 participants