eclipse正常 ,命令行mvn spring-boot:run 报错

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/xyjincan/article/details/80427592

安装java10 后,mvn spring-boot:run 报错

Exception in thread "main" java.lang.ClassCastException: 
    java.base/jdk.internal.loader.ClassLoaders$AppClassLoader 
    cannot be cast to java.base/java.net.URLClassLoader
        at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getUrls(DefaultRestartInitializer.java:93)
        at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:56)




mvn spring-boot:run
[INFO] Scanning for projects...
......
[INFO] Attaching agents: []
Exception in thread "main" java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
        at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getUrls(DefaultRestartInitializer.java:93)
        at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:56)
        at org.springframework.boot.devtools.restart.Restarter.<init>(Restarter.java:140)
        at org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:583)
        at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartingEvent(RestartApplicationListener.java:67)
        at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:45)
        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:122)
        at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:69)
        at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:48)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:292)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.803 s
[INFO] Finished at: 2018-05-23T21:30:02+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.12.RELEASE:run (default-cli) on project hgmonitor: Could not exec java: Application finished with exit code: 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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
展开阅读全文

maven 运行 mvn jetty:run报错

03-03

rnC:\myjava\workspace>mvn jetty:runrn[INFO] Scanning for projects...rn[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mavernn-deploy-plugin:2.7: Failed to parse plugin descriptor for org.apache.maven.plugrnins:maven-deploy-plugin:2.7 (C:\Documents and Settings\Administrator\.m2\repositrnory\org\apache\maven\plugins\maven-deploy-plugin\2.7\maven-deploy-plugin-2.7.jarrn): invalid LOC header (bad signature)rn[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mavernn-site-plugin:3.0: Failed to parse plugin descriptor for org.apache.maven.pluginrns:maven-site-plugin:3.0 (C:\Documents and Settings\Administrator\.m2\repository\rnorg\apache\maven\plugins\maven-site-plugin\3.0\maven-site-plugin-3.0.jar): invalrnid LOC header (bad signature)rnDownloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-rnmetadata.xmlrnDownloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadatrna.xmlrnDownloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-mrnetadata.xml (11 KB at 10.7 KB/sec)rnDownloaded: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadatarn.xml (22 KB at 18.2 KB/sec)rn[INFO] ------------------------------------------------------------------------rn[INFO] BUILD FAILURErn[INFO] ------------------------------------------------------------------------rn[INFO] Total time: 2.110srn[INFO] Finished at: Sun Mar 03 17:31:20 CST 2013rn[INFO] Final Memory: 4M/15Mrn[INFO] ------------------------------------------------------------------------rn[ERROR] No plugin found for prefix 'jetty' in the current project and in the plurngin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repornsitories [local (C:\Documents and Settings\Administrator\.m2\repository), centrarnl (http://repo.maven.apache.org/maven2)] -> [Help 1]rn[ERROR]rn[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switrnrn请帮忙分析原因 论坛

没有更多推荐了,返回首页