使用maven導入module時,報java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must

在新裝IDEA導入Flink源碼時出現一些問題,在此記錄,但願能幫到大夥!java


 1、環境

  IDEA2019.1.2(破解版);OpenJDK 1.8.0_40;Maven 3.5.3/3.2.5/3.6.2apache

2、報錯現象及解決方法

  導入源碼後,發現沒法自動下載源碼依賴,報錯以下:eclipse

java.lang.RuntimeException: org.apache.maven.model.resolution.UnresolvableModelException: Failure to transfer org.apache:apache:pom:18 from http://maven.aliyun.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are forced. Original error: Could not transfer artifact org.apache:apache:pom:18 from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:197)
    at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:243)
    at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:1052)
    at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:830)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:332)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:158)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:116)
    at org.jetbrains.idea.maven.server.Maven3ServerEmbedder.buildSinglePom(Maven3ServerEmbedder.java:177)
    at org.jetbrains.idea.maven.server.Maven3ServerEmbedder.getProjectBuildingResults(Maven3ServerEmbedder.java:160)
    at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl$3.run(Maven3ServerEmbedderImpl.java:663)
    at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.executeWithMavenSession(Maven3ServerEmbedderImpl.java:627)
    at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.doResolveProject(Maven3ServerEmbedderImpl.java:646)
    at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.resolveProject(Maven3ServerEmbedderImpl.java:580)
    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:497)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
    at sun.rmi.transport.Transport$1.run(Transport.java:200)
    at sun.rmi.transport.Transport$1.run(Transport.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$254(TCPTransport.java:683)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$1/8104157.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
    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.lang.RuntimeException: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer org.apache:apache:pom:18 from http://maven.aliyun.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are forced. Original error: Could not transfer artifact org.apache:apache:pom:18 from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:422)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:224)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:201)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:260)
    at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:193)
    ... 30 more

   在排除是由於本地設置的問題後,猜想是Maven的問題,因此開始是各類百度,從Maven3.6.2開始向下試探,結果仍是沒法解決問題,後來以各類信息分析百度,仍是沒有解決問題。maven

  在其餘配置不變的狀況,最後採起的措施是將IDEA從2019.1.2版本降爲2018.3.6便可正常導入。tcp

3、總結

  在IDEA官網上,都沒有找到對應的2019.1.2版本的下載包,就目前狀況看,應該是IDEA2019.1.2版本存在某些我不知道的設置或別的狀況,因此我的不推薦使用IDEA2019.1.2版本。ide

相關文章
相關標籤/搜索