tycho: "The type java.lang.Object cannot be resolved" when building multithreaded with OpenJDK17
Not sure if this is a Tycho issue, a maven issue, a jdk issue or a “we” issue.
We have some project that we are currently building with OpenJDK 11, Maven 3.6.3 (probably) and Tycho 2.7.3.
It works fine on my local machine as well as our jenkins agent, using -T1C parameter for maven.
Now we want to update to Java 17 and switched the docker build container to OpenJDK 17 and Maven 3.8.4 (still on Tycho 2.7.3). We kept everything else the same, so we still have the target set to 11.
It compiles when I run single-threaded, but when I add -T1C to the build, it fails with lots of errors like
15:22:43 [ERROR] The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
...
15:22:43 [ERROR] The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
...
15:22:43 [ERROR] The type java.lang.Class cannot be resolved. It is indirectly referenced from required .class files
So something seems to be broken somewhere, and I am unsure where. Build server should yield 96 possible threads when running with -T1C. The project has about 200 modules to be built. From the looks of the log it tries to build about 34 modules at once, when starting and then quickly fails.
What I tried:
- I found #1071 and tried adding a toolchain.xml to the build. Didn’t change anything
- I cleaned all configurations in .classpath as well as Manifest.MF with regards to the BREE.
- I got it to build ONCE with multiple threads, after cleaning the workspace entirely, but that was not reproducible. Might have been another parallel job on the machine, that changed the load-profile.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 28 (20 by maintainers)
Beside that I hope that some minor issues are fixed at ECJ in the next day and will simply deploy a fixed version to central under the Tycho group-id then…
Yes see https://github.com/eclipse-jdt/eclipse.jdt.core/issues/241#issuecomment-1187635534
You can leave a comment or you can add a reaction, you can even ask on the mailinglist, or if you are member of an eclipse.company try to give more priority on even other channels as well 😃