idea maven 依赖文件索引报错 update error

o.j.i.maven - Sent token to maven server

2022-05-14 16:35:30,780 [2332878]   INFO - #c.i.c.ComponentStoreImpl - Saving appDebuggerSettings took 14 ms

2022-05-14 16:43:11,004 [2793102]   WARN - #o.j.i.maven - Failed to update Maven indices for: [huaweicloud] https://repo.huaweicloud.com/repository/maven

org.jetbrains.idea.maven.server.MavenServerIndexerException: Cannot invoke "String.length()" because "s" is null

at org.jetbrains.idea.maven.server.Maven3ServerIndexerImpl.updateIndex(Maven3ServerIndexerImpl.java:173)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:568)

at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)

at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)

at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)

at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)

at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)

at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)

at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)

at java.base/java.lang.Thread.run(Thread.java:833)

at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:303)

at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:279)

at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164)

at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:217)

at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:162)

at com.sun.proxy.$Proxy219.updateIndex(Unknown Source)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:566)

at com.intellij.execution.rmi.RemoteUtil.invokeRemote(RemoteUtil.java:150)

at com.intellij.execution.rmi.RemoteUtil.access$400(RemoteUtil.java:21)

at com.intellij.execution.rmi.RemoteUtil$1.lambda$invoke$0(RemoteUtil.java:134)

at com.intellij.openapi.util.ClassLoaderUtil.computeWithClassLoader(ClassLoaderUtil.java:31)

at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:202)

at com.intellij.execution.rmi.RemoteUtil$1.invoke(RemoteUtil.java:134)

at com.sun.proxy.$Proxy219.updateIndex(Unknown Source)

at org.jetbrains.idea.maven.server.MavenIndexerWrapper.lambda$updateIndex$1(MavenIndexerWrapper.java:66)

at org.jetbrains.idea.maven.server.RemoteObjectWrapper.performCancelable(RemoteObjectWrapper.java:90)

at org.jetbrains.idea.maven.server.MavenIndexerWrapper.updateIndex(MavenIndexerWrapper.java:63)

at org.jetbrains.idea.maven.indices.MavenIndex.updateNexusContext(MavenIndex.java:299)

at org.jetbrains.idea.maven.indices.MavenIndex.updateOrRepair(MavenIndex.java:242)

at org.jetbrains.idea.maven.indices.MavenIndices.updateOrRepair(MavenIndices.java:194)

at org.jetbrains.idea.maven.indices.MavenIndexUpdateManager.doUpdateIndicesContent(MavenIndexUpdateManager.java:134)

at org.jetbrains.idea.maven.indices.MavenIndexUpdateManager$1.run(MavenIndexUpdateManager.java:94)

at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:442)

at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)

at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:493)

at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:244)

at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:189)

at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)

at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)

at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)

at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)

at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)

at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:176)

at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:244)

at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)

at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)

at java.base/java.security.AccessController.doPrivileged(Native Method)

at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)

at java.base/java.lang.Thread.run(Thread.java:829)

Caused by: java.lang.NullPointerException

at org.apache.lucene.store.IndexOutput.writeString(IndexOutput.java:102)

at org.apache.lucene.index.SegmentInfo.write(SegmentInfo.java:504)

at org.apache.lucene.index.SegmentInfos.write(SegmentInfos.java:307)

at org.apache.lucene.index.SegmentInfos.prepareCommit(SegmentInfos.java:761)

at org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4636)

at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3369)

at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:1654)

at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1602)

at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1578)

at org.sonatype.nexus.index.context.NexusIndexWriter.close(NexusIndexWriter.java:44)

at org.sonatype.nexus.index.context.IndexUtils.close(IndexUtils.java:370)

at org.sonatype.nexus.index.updater.DefaultIndexUpdater.unpackIndexData(DefaultIndexUpdater.java:561)

at org.sonatype.nexus.index.updater.DefaultIndexUpdater.loadIndexDirectory(DefaultIndexUpdater.java:243)

at org.sonatype.nexus.index.updater.DefaultIndexUpdater.access$300(DefaultIndexUpdater.java:65)

at org.sonatype.nexus.index.updater.DefaultIndexUpdater$LuceneIndexAdaptor.setIndexFile(DefaultIndexUpdater.java:806)

at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:986)

at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:150)

at org.jetbrains.idea.maven.server.Maven3ServerIndexerImpl$2.run(Maven3ServerIndexerImpl.java:152)

at org.jetbrains.idea.maven.server.Maven3ServerEmbedder$2.run(Maven3ServerEmbedder.java:372)

at org.jetbrains.idea.maven.server.Maven3ServerEmbedder.executeWithSessionScope(Maven3ServerEmbedder.java:447)

at org.jetbrains.idea.maven.server.Maven3ServerEmbedder.executeWithMavenSession(Maven3ServerEmbedder.java:380)

at org.jetbrains.idea.maven.server.Maven3ServerEmbedder.executeWithMavenSession(Maven3ServerEmbedder.java:369)

at org.jetbrains.idea.maven.server.Maven3ServerIndexerImpl.updateIndex(Maven3ServerIndexerImpl.java:142)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:568)

at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)

at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)

at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)

at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)

at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)

at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)

at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)

at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)

at java.base/java.lang.Thread.run(Thread.java:833)

.j.i.maven - Failed to update Maven indices for: [huaweicloud] https://repo.huaweicloud.com/repository/maven

org.jetbrains.idea.maven.server.CannotStartServerException: Cannot connect to the Maven process. Try again later. If the problem persists, check the Maven Importing JDK settings and restart IntelliJ IDEA

at org.jetbrains.idea.maven.server.RemoteObjectWrapper.performCancelable(RemoteObjectWrapper.java:99)

at org.jetbrains.idea.maven.server.MavenIndexerWrapper.updateIndex(MavenIndexerWrapper.java:63)

at org.jetbrains.idea.maven.indices.MavenIndex.updateNexusContext(MavenIndex.java:299)

at org.jetbrains.idea.maven.indices.MavenIndex.updateOrRepair(MavenIndex.java:242)

at org.jetbrains.idea.maven.indices.MavenIndices.updateOrRepair(MavenIndices.java:194)

at org.jetbrains.idea.maven.indices.MavenIndexUpdateManager.doUpdateIndicesContent(MavenIndexUpdateManager.java:134)

at org.jetbrains.idea.maven.indices.MavenIndexUpdateManager$1.run(MavenIndexUpdateManager.java:94)

at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:442)

at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)

at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:493)

at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:244)

at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:189)

at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)

at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)

at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)

at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)

at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)

at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:176)

at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:244)

at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)

at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)

at java.base/java.security.AccessController.doPrivileged(Native Method)

at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)

at java.base/java.lang.Thread.run(Thread.java:829)

Caused by: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: 

java.net.SocketException: Connection reset

at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:254)

at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164)

at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:217)

at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:162)

at com.sun.proxy.$Proxy219.updateIndex(Unknown Source)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:566)

at com.intellij.execution.rmi.RemoteUtil.invokeRemote(RemoteUtil.java:150)

at com.intellij.execution.rmi.RemoteUtil.access$400(RemoteUtil.java:21)

at com.intellij.execution.rmi.RemoteUtil$1.lambda$invoke$0(RemoteUtil.java:134)

at com.intellij.openapi.util.ClassLoaderUtil.computeWithClassLoader(ClassLoaderUtil.java:31)

at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:202)

at com.intellij.execution.rmi.RemoteUtil$1.invoke(RemoteUtil.java:134)

at com.sun.proxy.$Proxy219.updateIndex(Unknown Source)

at org.jetbrains.idea.maven.server.MavenIndexerWrapper.lambda$updateIndex$1(MavenIndexerWrapper.java:66)

at org.jetbrains.idea.maven.server.RemoteObjectWrapper.performCancelable(RemoteObjectWrapper.java:90)

... 26 more

Caused by: java.net.SocketException: Connection reset

at java.base/java.net.SocketInputStream.read(SocketInputStream.java:186)

at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)

at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)

at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:271)

at java.base/java.io.DataInputStream.readByte(DataInputStream.java:270)

at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:240)

... 43 more

idea日志一堆报错

搞了3天,终于今天解决了

原因:刚开始不知道maven 仓库和镜像什么作用,不知道的去搜索看,它们之间的关系把。

然后用idea 打开settings.xml 文件

因为idea 能检车setting.xml 文件是否格式错误,可以避免因为文件问题各种bug 无解。

好了,如果以上问题都没有,注意看一下你的磁盘空间是否满? 因为满了的话。索引文件是不会成功的啊

如果以上问题没有

因为官方maven 中央仓库在国外,国内网速垃圾。各种限制,阿里云maven 又不支持索引文件下载。mamamiya

我目前只知道华为的maven 镜像 可以支持索引。于是我们在setting.xml 文件设置镜像。

以下是我的setting.xml 整个文件的信息,已经有华为maven镜像了的







  

  

  

  
  
    
  

  
  
    
  

  
  
    

    
  

  
  
    
   
    huaweicloud
    hwcloud
    *
    https://repo.huaweicloud.com/repository/maven/


     
  

  
  
    

    
  

  



maven 可以显示的啊

关键问题不在这里,我知道你们进来应该是关于 远程仓库 update 时候 

要么error 要么,索引文件下载好了 结果一点反应都没有,继续update 反复下载。

如果你不是,这边帖子也帮不了你

经过我发现,这里update 时候需要下载两个文件 

nexus-maven-repository-index.gz
nexus-maven-repository-index.properties

就是这两个文件,但是华为的镜像没有第二个文件,就离谱

所以解决方案:如果是error 那么应该是 setting.xml 文件设置有错误,idea 打开它,看看有没有红色,把红色解决掉的好了

如果是 update 后 下载所以文件了没反应 没有效果。

需要下载这个文件https://repo1.maven.org/maven2/.index/nexus-maven-repository-index.properties

idea maven 依赖文件索引报错 update error_第1张图片

 

然后把这个文件 复制到 idea 下载的索引文件的位置上去 

我不知道你电脑的索引文件在哪?

idea maven 依赖文件索引报错 update error_第2张图片

 

然后我们再去 maven 重新update  一下

我想如果还不行,清理垃圾 ,请重启电脑,重新进idea  去update  一下。

我想应该就好了

我就是这样的,虽然不知道为什么,我只知道我搞了3 天终于可以了

如果你还不行,我也没用办法,我也不知道

为什么我之前 一直update 后 索引文件有 却没用反应。现在我可能知道原因了

因为maven 需要两个文件

而华为maven 只下载了一个文件

另外一个文件我们需要自己去下载

还有,我电脑c盘空间不足。导致解压maven 索引文件,失败。

你可能感兴趣的:(maven,java)