inspectit-ocelot icon indicating copy to clipboard operation
inspectit-ocelot copied to clipboard

Sharing is only supported for boot loader classes because bootstrap classpath has been appended

Open florinandone opened this issue 3 years ago • 4 comments

After https://github.com/inspectIT/inspectit-ocelot/pull/1095 Allow disabling console log on start-up improvement, the following warning is showing in the console on startup.

OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

I assume was there before but not obvious due to other messages.

Does anyone know if this is of concern?

I found the below-related article on stack overflow.

https://stackoverflow.com/questions/54205486/how-to-avoid-sharing-is-only-supported-for-boot-loader-classes-because-bootstra

florinandone avatar Jun 27 '21 10:06 florinandone

@mariusoe Sory to disturb, can you please take a look at this I can reproduce with java 11

[testUser@test-sever florin]$ java -version openjdk version "11.0.10" 2021-01-19 LTS OpenJDK Runtime Environment 18.9 (build 11.0.10+9-LTS) OpenJDK 64-Bit Server VM 18.9 (build 11.0.10+9-LTS, mixed mode, sharing) [testUser@test-sever florin]$ java -javaagent:"./inspectit-ocelot-agent-1.10.1.jar" -jar jenkins.war

OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended Running from: /home/testUser/florin/jenkins.war webroot: $user.home/.jenkins 2021-07-06 10:41:10.505+0000 [id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized @541ms to org.eclipse.jetty.util.log.JavaUtilLog 2021-07-06 10:41:10.582+0000 [id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file 2021-07-06 10:41:10.606+0000 [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath 2021-07-06 10:41:10.667+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: jetty-9.4.33.v20201020; built: 2020-10-20T23:39:24.803Z; git: 1be68755656cef678b79a2ef1c2ebbca99e25420; jvm 11.0.10+9-LTS 2021-07-06 10:41:10.968+0000 [id=1] INFO o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet 2021-07-06 20:41:10,994 INFO 281 --- [inspectIT] [ Thread-0] rocks.inspectit.ocelot.core.AgentImpl : Starting inspectIT Ocelot Agent... 2021-07-06 20:41:11,000 INFO 287 --- [inspectIT] [ Thread-0] rocks.inspectit.ocelot.core.AgentImpl : Version: 1.10.1 2021-07-06 20:41:11,001 INFO 288 --- [inspectIT] [ Thread-0] rocks.inspectit.ocelot.core.AgentImpl : Build Date: Wed Jun 23 14:05:50 UTC 2021 2021-07-06 20:41:11,001 INFO 288 --- [inspectIT] [ Thread-0] rocks.inspectit.ocelot.core.AgentImpl : OpenCensus was loaded in inspectIT classloader

florinandone avatar Jul 06 '21 10:07 florinandone

If running like this the issue go away

[testUser@test-sever florin]$ java -Xshare:off -javaagent:"./inspectit-ocelot-agent-1.10.1.jar" -jar jenkins.war Running from: /home/testUser/florin/jenkins.war webroot: $user.home/.jenkins 2021-07-06 10:48:30.670+0000 [id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized @739ms to org.eclipse.jetty.util.log.JavaUtilLog 2021-07-06 10:48:30.832+0000 [id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file 2021-07-06 20:48:30,870 INFO 157 --- [inspectIT] [ Thread-0] rocks.inspectit.ocelot.core.AgentImpl : Startin

florinandone avatar Jul 06 '21 10:07 florinandone

Interesting article on this

https://nipafx.dev/java-application-class-data-sharing/

florinandone avatar Jul 06 '21 11:07 florinandone

Hi @florinandone

thanks for the information and details you already figured out. We'll have a look on this problem and why this message appears.

mariusoe avatar Jul 06 '21 12:07 mariusoe