'Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.7.RELEASE e: Could not exec java: Application finished with exit code: 1

Error display when i press Ctrl+c in cmd

[INFO] BUILD FAILURE

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.7.RELEASE:run (default-cli) on project beeqe: Could not exec java: Application finished with exit code: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.springframework.boot:spring-boot-maven-plugin 5.7.RELEASE:run (default-cli) on project beequote: Could not exec java
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)
    at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)
    at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:50)

Caused by: org.apache.maven.plugin.MojoExecutionException: Could not exec java at org.springframework.boot.maven.RunMojo.runWithForkedJvm(RunMojo.java:82) at org.springframework.boot.maven.AbstractRunMojo.doRunWithForkedJvm(AbstractRunMojo.java:279) at org.springframework.boot.maven.AbstractRunMojo.run(AbstractRunMojo.java:245) at org.springframework.boot.maven.AbstractRunMojo.execute(AbstractRunMojo.java:181) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 27 more

Caused by: org.apache.maven.plugin.MojoExecutionException: Application finished with exit code: 1
    at org.springframework.boot.maven.RunMojo.runWithForkedJvm(RunMojo.java:78)
    ... 32 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]

http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException



Solution 1:[1]

The question is quite old but I'll share my answer in case someone stumbles upon this. I had exact same problem and the cause was incorrect configuration of logback in logback-spring.xml.

If you're using logback (it's used by default in Spring Boot), try commenting the whole configuration out and un-comment it step by step. It sounds tedious but that's what worked for me.

To show some examples of my misconfiguration:

<logger name="org.apache.camel.component.file" level="error"additivity="false">

is supposed to be

<logger name="org.apache.camel.component.file" level="error" additivity="false">
    <appender name="..." class="ch.qos.logback.core.rolling.RollingFileAppender">
        ...

        <rollingPolicy
                class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            ...
            <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
                <maxFileSize>10MB</maxFileSize>
            </triggeringPolicy>
        </rollingPolicy>

    </appender>

is supposed to be

    <appender name="..." class="ch.qos.logback.core.rolling.RollingFileAppender">
        ...

        <rollingPolicy
                class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            ...

        </rollingPolicy>

        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <maxFileSize>10MB</maxFileSize>
        </triggeringPolicy>

    </appender>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Cajova_Houba