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

NullPointerException with devtools in 1.4.0.M2 #5704

Closed
wangxufire opened this issue Apr 15, 2016 · 1 comment
Closed

NullPointerException with devtools in 1.4.0.M2 #5704

wangxufire opened this issue Apr 15, 2016 · 1 comment
Labels
type: bug A general bug
Milestone

Comments

@wangxufire
Copy link

Exception in thread "main" java.lang.NullPointerException
    at org.springframework.boot.devtools.restart.ChangeableUrls.getUrlsFromClassPathAttribute(ChangeableUrls.java:121)
    at org.springframework.boot.devtools.restart.ChangeableUrls.getUrlsFromClassPathOfJarManifestIfPossible(ChangeableUrls.java:99)
    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:133)
    at org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:519)
    at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartedEvent(RestartApplicationListener.java:68)
    at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:45)
    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:304)

worked correctly with 1.3.3.RELEASE

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 15, 2016
@wilkinsona
Copy link
Member

The line in question is:

        String classPath = manifest.getMainAttributes()
                .getValue(Attributes.Name.CLASS_PATH);

manifest must be null (getMainAttributes will never return null), so I guess there's a jar on the classpath that doesn't have a META-INF/MANIFEST.MF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants