Skip to content
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

Could not initialize class java.util.logging.LogManager #649

Closed
JordanHitchman opened this issue Jan 8, 2019 · 4 comments
Closed

Could not initialize class java.util.logging.LogManager #649

JordanHitchman opened this issue Jan 8, 2019 · 4 comments

Comments

@JordanHitchman
Copy link

After upgrading from V0.19.0 to V0.20.0 I'm experiencing the following problem when running a Spring boot project directly via terminal (java jar command) or as a docker image -

ERROR org.springframework.boot.SpringApplication - Application run failed java.lang.NoClassDefFoundError: Could not initialize class java.util.logging.LogManager

I have the following configurations:
Spring Boot Version 2.1.1
Java Version 11
With the DD agent JAR file added directly to the project

Currently, I've resolved the issue by simply reverting back to V0.19. Is anyone else experiencing this issue?

Full error log -

ERROR org.springframework.boot.SpringApplication - Application run failed java.lang.NoClassDefFoundError: Could not initialize class java.util.logging.LogManager at java.logging/java.util.logging.Logger.demandLogger(Logger.java:648) at java.logging/java.util.logging.Logger.getLogger(Logger.java:717) at java.logging/java.util.logging.Logger.getLogger(Logger.java:701) at org.yaml.snakeyaml.TypeDescription.<clinit>(TypeDescription.java:49) at org.yaml.snakeyaml.constructor.Constructor.<init>(Constructor.java:56) at org.yaml.snakeyaml.constructor.Constructor.<init>(Constructor.java:46) at org.springframework.boot.env.OriginTrackedYamlLoader$OriginTrackingConstructor.<init>(OriginTrackedYamlLoader.java:82) at org.springframework.boot.env.OriginTrackedYamlLoader$OriginTrackingConstructor.<init>(OriginTrackedYamlLoader.java:82) at org.springframework.boot.env.OriginTrackedYamlLoader.createYaml(OriginTrackedYamlLoader.java:64) at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:132) at org.springframework.boot.env.OriginTrackedYamlLoader.load(OriginTrackedYamlLoader.java:75) at org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:50) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadDocuments(ConfigFileApplicationListener.java:572) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:526) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadForFileExtension(ConfigFileApplicationListener.java:500) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:467) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$null$6(ConfigFileApplicationListener.java:448) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$load$7(ConfigFileApplicationListener.java:447) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:444) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:332) at org.springframework.boot.context.config.ConfigFileApplicationListener.addPropertySources(ConfigFileApplicationListener.java:207) at org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:190) at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:177) at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:163) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:75) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:347) at org.springframework.boot.SpringApplication.run(SpringApplication.java:306) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) at com.incrowdsports.media_management_system.Application.main(Application.java:54) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)

@realark realark added type: bug tag: needs investigation Issues needing investigations labels Jan 8, 2019
@realark
Copy link
Contributor

realark commented Jan 8, 2019

Thanks for reporting. I've been able to reproduce this with Java 11+spring-boot. I'll keep this ticket updated as things progress.

@realark realark removed the tag: needs investigation Issues needing investigations label Jan 11, 2019
@realark
Copy link
Contributor

realark commented Jan 11, 2019

Update: The root cause of this issue is an incompatibility between java 9+ modules and some class structure modifications made by the Java tracer.

The 0.21 release of the tracer works around the issue and allows springboot to start up correctly. @JordanHitchman If you had no issues with the 0.19 release, then it's safe to update to the latest release, 0.21.

A long term solution is being worked on for java modules. I'll leave this ticket open until that fix lands (targeting 0.22).

@realark
Copy link
Contributor

realark commented Jan 11, 2019

Fix for springboot startup: #654

@tylerbenson
Copy link
Contributor

I think this issue is resolved. If you are still having problems, please reopen or contact support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants