question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hard to identify cause of IllegalStateException thrown by DevTools when it can't read jar's manifest

See original GitHub issue

Hi, application does not launch when activating devtools (eclipse-neon windows). Spring boot version is 1.3.6.RELEASE The error is

Exception in thread "main" java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:/C:/Users/Ramon/.m2/repository/ognl/ognl/3.0.8/ognl-3.0.8.jar
    at org.springframework.boot.devtools.restart.ChangeableUrls.getUrlsFromClassPathOfJarManifestIfPossible(ChangeableUrls.java:100)
    at org.springframework.boot.devtools.restart.ChangeableUrls.fromUrlClassLoader(ChangeableUrls.java:88)
    at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getUrls(DefaultRestartInitializer.java:91)
    at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:54)
    at org.springframework.boot.devtools.restart.Restarter.<init>(Restarter.java:134)
    at org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:531)
    at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartedEvent(RestartApplicationListener.java:64)
    at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:46)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:121)
    at org.springframework.boot.context.event.EventPublishingRunListener.publishEvent(EventPublishingRunListener.java:111)
    at org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:60)
    at org.springframework.boot.SpringApplicationRunListeners.started(SpringApplicationRunListeners.java:48)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:302)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)
    at com.github.rsallar.underevalprj.UnderevalprjApplication.main(UnderevalprjApplication.java:10)

You can check the code here:

https://github.com/rsallar/underevalprj/tree/bug-devtools

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
wilkinsonacommented, Apr 27, 2017

We now include the cause. In your case you can see that the failure was due to a ZipException. That’s a very strong indication that you have a corrupted jar. The message of the IllegalStateException tells you which jar is causing the problem:

file:/C:/Users/NIKIL/.m2/repository/org/hibernate/hibernate-core/5.0.12.Final/hibernate-core-5.0.12.Final.jar

You should remove that jar from your Maven cache and try building your project again so that Maven has another go at downloading it.

3reactions
wilkinsonacommented, Jul 18, 2016

It works fine for me on OS X. It could be due to a corrupted jar. Can you try cleaning out your Maven cache and trying again?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to read Class-Path attribute from manifest of jar error ...
This error message... Exception in thread "main" java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar ...
Read more >
Spring Boot, Maven and Eclipse Errors and TroubleShooting ...
Application Exception in thread "main" java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar ...
Read more >
Frequently Asked Questions - Apache POI
The best way to identify the offending earlier jar files is with a few lines of java.
Read more >
Spring Boot Reference Documentation
An uber jar packages all the classes from all the application's dependencies into a single archive. The problem with this approach is that...
Read more >
Fix list for Rational Application Developer for WebSphere ...
Rational Build Utility, PH12967, Addresses an issue that caused the ... Validation Framework, PI68330, XML validation does not recognize bindings that were ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found