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
"Sharing is only supported for boot loader classes because bootstrap classpath has been appended" when running with java 13 #1294
Comments
What JVM startup arguments are you using? |
Hi @tylerbenson , it is As this might be relevant, I am also defining the following env. variables:
|
ok... I wasn't sure if you had any additional JVM parameters besides the |
"Application Class-Data Sharing" is an optimization where users can record class load metadata into a "class-data archive". Launching your application again reads from this archive so that the application starts faster. As of Java 12, OpenJDK based JDKs have a class-data archive for JDK classes. Because the Datadog agent appends to the bootstrap classpath, the class-data archive is incorrect for the system class loader. The warning is telling you that the class data optimization is partially turned off. The only way to get rid of the warning is to turn the optimization off fully with "-Xshare:off". However, this could potentially worsen the startup performance of your application. |
Hi @randomanderson , thanks for elaborating on this. Would it be possible to dd-agent to somehow bypass this warning somehow? I agree that I guess Application Class-Data Sharing could play an important role in serverless applications. |
How does one get to dd-agent and -xshare? |
@NatBob, I'm not sure what you're asking. Do you mean how to add VM arguments? It depends on how your application is started. For instance, if your commandline was:
it becomes
Different applications have different approaches. For instance, you might set |
@PedroHReis22 I don't think there's another way to get rid of the warning. In adding support for read only filesystems, we are reducing the amount of times we add to the bootstrap. In the future, I believe you'll only get the warning once per startup. |
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended #can anyone help with this? |
Hi @lavanyayangala - as explained in #1294 (comment) this is an informational warning which you can safely ignore, the behaviour of your application shouldn't be affected. |
Any way for supress warning from build.gradle file or other? |
@yhojann-cl There are 2 options to not print the warning:
As explained in #1294 (comment) , this is a warning that can be safely ignored. |
What a useless warning. What where they thinking? I have this all over the place in all tools. |
I have tested several JDKs 17 and found out that only 3 of them don't show this message:
The JDKs have been downloaded in IDEA's "Project settings / SDKs / + / Download JDK..." tool |
Hi, I am getting the following warning when tracing my java 13 application:
Even though this is just a warn, it does pollute the logs and I think would be nice to get 'fixed'.
My current stack is:
The text was updated successfully, but these errors were encountered: