-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support compiling and using ShardingSphere under OpenJDK 23 #33025
Conversation
1e0637f
to
ea3949e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- More errors surfaced.
Caused by: java.lang.ClassNotFoundException: javax.management.loading.PrivateMLet
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:528)
... 44 more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- @kanha-gupta I observed Add test case for PluginLifecycleServiceManager #24007. Why does the relevant unit test have to use the deprecated
javax.management.loading.PrivateMLet
starting from JDK20? This class was removed in JDK23.
package javax.management.loading;
/**
* An MLet that is not added to the {@link ClassLoaderRepository}.
* This class acts exactly like its parent class, {@link MLet}, with
* one exception. When a PrivateMLet is registered in an MBean
* server, it is not added to that MBean server's {@link
* ClassLoaderRepository}. This is true because this class implements
* the interface {@link PrivateClassLoader}.
*
* @deprecated This API is part of Management Applets (m-lets), which is a legacy feature that allows loading
* of remote MBeans. This feature is not usable without a Security Manager, which is deprecated and subject to
* removal in a future release. Consequently, this API is also deprecated and subject to removal. There is no replacement.
*
* @since 1.5
*/
@Deprecated(since="20", forRemoval=true)
@SuppressWarnings({"serial", "removal"}) // Externalizable class w/o no-arg c'tor
public class PrivateMLet extends MLet implements PrivateClassLoader {
- Also see https://bugs.openjdk.org/browse/JDK-8297794 .
e31270e
to
24982ea
Compare
24982ea
to
e2fa0d3
Compare
When I use JDK 17 (Zulu) to compile the master branch, this error occurs: If I switch to JDK 21, the compilation is successful. Since the |
|
@linghengqian I used the following command to compile and compare the result of different JDKs ./mvnw clean install -B -DskipTests 1. Oracle JDK 17
2. Zulu JDK 17
3. Oracle JDK 21 (In Zulu JDK 21 is also successful, omitted here)
|
After upgrading JDK from 17.0.9 to 17.0.11, there is indeed no problem anymore, thank you @linghengqian |
|
Great, thanks! 👍 |
For #32927.
Changes proposed in this pull request:
maven.compiler.proc
.Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e
.