springboot的maven报错

 

新建第一个springboot项目,按照教程好像是旗舰版(这个不确定了,反正是只有一个才有它的)有Spring Initializr,然后一步步新建成功,看教程人家都是直接跑起来的,我的是先加载依赖,加了好久,然后我就乱点,不加载了。(我之前用过springboot,所以知道src 下有一个application.java[一般这个文件名前还有一个你的项目名,反正就是这么回事],运行它,启动这个项目,我就想开始运行它)

springboot的maven报错_第1张图片

但是配置文件中根本没有Spring Boot,我的pom.xml也不报错。当时并不知道是Maven的事,又重新重建了一下,发现是maven的问题,我看了一眼我的maven也是正常的,

springboot的maven报错_第2张图片

 

又试了网上的这种办法,发现也行不通,而且每次加载的时候都特别慢,

springboot的maven报错_第3张图片

又先试了右边的install,也不行,最开始控制台报错还是一堆乱码,后来修改左边的这个红色圈的地方 值变为:-Dfile.encoding=GB2312,就不乱码了, 让我下载一堆jar包和不知道是什么的文件,我下载了也不好使,后来查看的log如下,按照网的一个说法,删除c盘中的C:\Users\你的电脑名\.m2,整个文件一删除就好了。虽然我后面的错误和他们的不一样,但是这么做确实好使,困扰了我一下午的问题,差点就退劝了,但是坚持下去,我们要相信自己一定可以的

2021-01-22 16:11:04,490 [1584308]  ERROR -      #org.jetbrains.idea.maven - Cannot reconnect. 
java.lang.RuntimeException: Cannot reconnect.
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:82)
    at org.jetbrains.idea.maven.server.MavenServerManager.applyProfiles(MavenServerManager.java:531)
    at org.jetbrains.idea.maven.project.MavenProjectReader.applyProfiles(MavenProjectReader.java:399)
    at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:108)
    at org.jetbrains.idea.maven.project.MavenProjectReader.access$300(MavenProjectReader.java:51)
    at org.jetbrains.idea.maven.project.MavenProjectReader$1.doProcessParent(MavenProjectReader.java:453)
    at org.jetbrains.idea.maven.project.MavenProjectReader$1.doProcessParent(MavenProjectReader.java:429)
    at org.jetbrains.idea.maven.project.MavenParentProjectFileProcessor.processRepositoryParent(MavenParentProjectFileProcessor.java:84)
    at org.jetbrains.idea.maven.project.MavenParentProjectFileProcessor.process(MavenParentProjectFileProcessor.java:62)
    at org.jetbrains.idea.maven.project.MavenProjectReader.resolveInheritance(MavenProjectReader.java:456)
    at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:105)
    at org.jetbrains.idea.maven.project.MavenProjectReader.access$300(MavenProjectReader.java:51)
    at org.jetbrains.idea.maven.project.MavenProjectReader$1.doProcessParent(MavenProjectReader.java:453)
    at org.jetbrains.idea.maven.project.MavenProjectReader$1.doProcessParent(MavenProjectReader.java:429)
    at org.jetbrains.idea.maven.project.MavenParentProjectFileProcessor.processRepositoryParent(MavenParentProjectFileProcessor.java:84)
    at org.jetbrains.idea.maven.project.MavenParentProjectFileProcessor.process(MavenParentProjectFileProcessor.java:62)
    at org.jetbrains.idea.maven.project.MavenProjectReader.resolveInheritance(MavenProjectReader.java:456)
    at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:105)
    at org.jetbrains.idea.maven.project.MavenProjectReader.readProject(MavenProjectReader.java:67)
    at org.jetbrains.idea.maven.project.MavenProjectReader.lambda$resolveProject$0(MavenProjectReader.java:531)
    at com.intellij.util.containers.ContainerUtilRt.mapNotNull(ContainerUtilRt.java:395)
    at com.intellij.util.containers.ContainerUtil.mapNotNull(ContainerUtil.java:1979)
    at org.jetbrains.idea.maven.project.MavenProjectReader.resolveProject(MavenProjectReader.java:530)
    at org.jetbrains.idea.maven.project.MavenProjectsTree.doResolve(MavenProjectsTree.java:1293)
    at org.jetbrains.idea.maven.project.MavenProjectsTree.resolve(MavenProjectsTree.java:1265)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessorResolvingTask.perform(MavenProjectsProcessorResolvingTask.java:45)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:134)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$000(MavenProjectsProcessor.java:32)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:109)
    at org.jetbrains.idea.maven.utils.MavenUtil.lambda$runInBackground$5(MavenUtil.java:451)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: 
    java.net.SocketException: Connection reset
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:229)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
    at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
    at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
    at com.sun.proxy.$Proxy132.applyProfiles(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor658.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.execution.rmi.RemoteUtil.invokeRemote(RemoteUtil.java:179)
    at com.intellij.execution.rmi.RemoteUtil.access$300(RemoteUtil.java:39)
    at com.intellij.execution.rmi.RemoteUtil$2$1$1.compute(RemoteUtil.java:160)
    at com.intellij.openapi.util.ClassLoaderUtil.runWithClassLoader(ClassLoaderUtil.java:66)
    at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:231)
    at com.intellij.execution.rmi.RemoteUtil$2$1.invoke(RemoteUtil.java:157)
    at com.sun.proxy.$Proxy132.applyProfiles(Unknown Source)
    at org.jetbrains.idea.maven.server.MavenServerManager.lambda$applyProfiles$3(MavenServerManager.java:531)
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
    ... 35 more
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:210)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
    at java.io.DataInputStream.readByte(DataInputStream.java:265)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)
    ... 51 more
2021-01-22 16:11:04,491 [1584309]  ERROR -      #org.jetbrains.idea.maven - IntelliJ IDEA 2018.3.2  Build #IU-183.4886.37 
2021-01-22 16:11:04,491 [1584309]  ERROR -      #org.jetbrains.idea.maven - JDK: 1.8.0_152-release; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 
2021-01-22 16:11:04,491 [1584309]  ERROR -      #org.jetbrains.idea.maven - OS: Windows 10 
2021-01-22 16:11:04,507 [1584325]  ERROR -      #org.jetbrains.idea.maven - Last Action: Maven.ShowSettings

你可能感兴趣的:(java)