Tests are failing with Unable to inject class hudson.model.UserIdMapper after upgrading the build from java 8 to java 11

224 views
Skip to first unread message

Anna Karyakina

unread,
Nov 6, 2023, 4:02:10 PM11/6/23
to jenkin...@googlegroups.com
Hi everyone,

I got stuck with upgrading my plugin build from java 8 to java 11. It compiles, but several tests that used to pass with java 8 now fail with "org.jvnet.hudson.reactor.ReactorException: java.lang.IllegalArgumentException: Unable to inject class hudson.model.UserIdMapper". Here's a link to the complete stack trace: Plugins » fortify-plugin » master #2 Console [Jenkins]. Could someone please share their thoughts/experience?

I have a suspicion that it has something to do with the more restrictive classloading security, and something like add-opens (what package?) might help, but the strange thing is that I can't find any reference to others running into the same issue. I searched this group's archive as well.


Thanks,
Ann.

Ullrich Hafner

unread,
Nov 7, 2023, 3:08:39 AM11/7/23
to JenkinsCI Developers
Does it fail locally? Did you try Java 17 (we are currently in the process of testing Java 21, so nobody is looking at Java 11 JDK anymore).

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAGST4yi5zBN9vW%3DF-Se9zGLick1rkuA0KW8wAMJbaoV9PpRrsA%40mail.gmail.com.

Basil Crow

unread,
Nov 8, 2023, 5:53:56 PM11/8/23
to jenkin...@googlegroups.com
It looks like most of this was taken care of already in
https://github.com/jenkinsci/fortify-plugin/pull/72. I created
https://github.com/jenkinsci/fortify-plugin/pull/74 with some minor
cleanup on top of that.
Reply all
Reply to author
Forward
0 new messages