intellijIDEA 中的多 pom。将模块添加到项目时出错:null

multi-pom in intellijIDEA. Error adding module to project: null

我想在 Intellij (2020.3.4) 中做一个多 pom 项目。在一个 Maven 项目中,我右键单击 -> 新建 -> 模块 -> Maven。 select “我的项目”的父级。但是,即使未指定父级,我也会收到错误消息:向项目添加模块时出错:null。 (同时,它添加了一个带有模块名称的常规文件夹和一个空的 pom.xml 内部)(这发生在任何原型上)。我根本没有在互联网上找到任何解决方案。仅降级到旧版本的 Intellij IDEA,该解决方案是 10 年前发布的。告诉我问题是什么?或者怎么办?不仅仅适用于“Maven”。使用“Java”和“Spring Inizializr”它可以工作。

idea.log

2022-03-23 15:54:05,382 [81624884]   WARN - il.projectWizard.ModuleBuilder -  
java.lang.NullPointerException
    at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
    at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
    at java.base/java.util.Properties.put(Properties.java:1340)
    at java.base/java.util.Properties.setProperty(Properties.java:228)
    at org.jetbrains.idea.maven.utils.MavenUtil.runOrApplyMavenProjectFileTemplate(MavenUtil.java:384)
    at org.jetbrains.idea.maven.utils.MavenUtil.runOrApplyMavenProjectFileTemplate(MavenUtil.java:341)
    at org.jetbrains.idea.maven.wizards.MavenModuleBuilderHelper.lambda$configure[=10=](MavenModuleBuilderHelper.java:85)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:122)
    at com.intellij.openapi.application.RunResult.run(RunResult.java:35)
    at com.intellij.openapi.command.WriteCommandAction.lambda$performWriteCommandAction(WriteCommandAction.java:253)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1000)
    at com.intellij.openapi.command.WriteCommandAction.lambda$performWriteCommandAction(WriteCommandAction.java:252)
    at com.intellij.openapi.command.WriteCommandAction.lambda$doExecuteCommand(WriteCommandAction.java:310)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:187)
    at com.intellij.openapi.command.WriteCommandAction.doExecuteCommand(WriteCommandAction.java:312)
    at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:251)
    at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:232)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.compute(WriteCommandAction.java:124)
    at org.jetbrains.idea.maven.wizards.MavenModuleBuilderHelper.configure(MavenModuleBuilderHelper.java:79)
    at org.jetbrains.idea.maven.wizards.AbstractMavenModuleBuilder.lambda$setupRootModel[=10=](AbstractMavenModuleBuilder.java:77)
    at org.jetbrains.idea.maven.utils.MavenUtil.runDumbAware(MavenUtil.java:211)
    at org.jetbrains.idea.maven.utils.MavenUtil.runWhenInitialized(MavenUtil.java:231)
    at org.jetbrains.idea.maven.wizards.AbstractMavenModuleBuilder.setupRootModel(AbstractMavenModuleBuilder.java:70)
    at com.intellij.ide.util.projectWizard.ModuleBuilder.setupModule(ModuleBuilder.java:260)
    at com.intellij.ide.util.projectWizard.ModuleBuilder.createModule(ModuleBuilder.java:253)
    at com.intellij.ide.util.projectWizard.ModuleBuilder.createAndCommitIfNeeded(ModuleBuilder.java:292)
    at com.intellij.ide.util.projectWizard.ModuleBuilder.lambda$commitModule(ModuleBuilder.java:338)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:988)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1014)
    at com.intellij.ide.util.projectWizard.ModuleBuilder.commitModule(ModuleBuilder.java:337)
    at com.intellij.openapi.roots.ui.configuration.actions.NewModuleAction.createModuleFromWizard(NewModuleAction.java:59)
    at com.intellij.openapi.roots.ui.configuration.actions.NewModuleAction.actionPerformed(NewModuleAction.java:49)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:281)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed[=10=](ActionMenuItem.java:310)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:286)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:77)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:299)
    at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed[=10=](ActionMenuItem.java:110)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:110)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:514)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:544)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6652)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
    at java.desktop/java.awt.Component.processEvent(Component.java:6417)
    at java.desktop/java.awt.Container.processEvent(Container.java:2263)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
    at java.desktop/java.awt.EventQueue.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue.run(EventQueue.java:751)
    at java.desktop/java.awt.EventQueue.run(EventQueue.java:749)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976)
    at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:911)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:840)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent(IdeEventQueue.java:454)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent(IdeEventQueue.java:453)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:507)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
2022-03-23 15:54:05,981 [81625483]  ERROR - plication.impl.ApplicationImpl - Cannot reconnect. 
java.lang.RuntimeException: Cannot reconnect.
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:82)
    at org.jetbrains.idea.maven.server.MavenIndexerWrapper.getArchetypes(MavenIndexerWrapper.java:143)
    at org.jetbrains.idea.maven.indices.MavenIndicesManager.getArchetypes(MavenIndicesManager.java:337)
    at org.jetbrains.idea.maven.wizards.MavenArchetypesStep.lambda$updateArchetypesList(MavenArchetypesStep.java:223)
    at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
    at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
    at com.intellij.openapi.application.impl.ApplicationImpl.call(ApplicationImpl.java:270)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    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.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: 
    java.net.ConnectException: Connection refused: connect
    at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:623)
    at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:209)
    at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196)
    at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:132)
    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.$Proxy146.createIndexer(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.access0(RemoteUtil.java:21)
    at com.intellij.execution.rmi.RemoteUtil.lambda$invoke[=10=](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.invoke(RemoteUtil.java:134)
    at com.sun.proxy.$Proxy146.createIndexer(Unknown Source)
    at org.jetbrains.idea.maven.server.MavenServerConnectorImpl.createIndexer(MavenServerConnectorImpl.java:197)
    at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:381)
    at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:377)
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)
    at org.jetbrains.idea.maven.server.MavenIndexerWrapper.lambda$getArchetypes(MavenIndexerWrapper.java:143)
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
    ... 14 more
Caused by: java.net.ConnectException: Connection refused: connect
    at java.base/java.net.PlainSocketImpl.connect0(Native Method)
    at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:101)
    at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
    at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
    at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
    at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.base/java.net.Socket.connect(Socket.java:609)
    at java.base/java.net.Socket.connect(Socket.java:558)
    at java.base/java.net.Socket.<init>(Socket.java:454)
    at java.base/java.net.Socket.<init>(Socket.java:231)
    at com.intellij.execution.rmi.RemoteServer.createSocket(RemoteServer.java:122)
    at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:617)
    ... 37 more
2022-03-23 15:54:05,981 [81625483]  ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA 2020.3.4  Build #IU-203.8084.24 
2022-03-23 15:54:05,981 [81625483]  ERROR - plication.impl.ApplicationImpl - JDK: 11.0.10; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2022-03-23 15:54:05,981 [81625483]  ERROR - plication.impl.ApplicationImpl - OS: Windows 10 
2022-03-23 15:54:05,981 [81625483]  ERROR - plication.impl.ApplicationImpl - Last Action: NewModuleInGroup 
2022-03-23 15:54:06,580 [81626082]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 1922ms; general responsiveness: ok; EDT responsiveness: ok 
2022-03-23 15:54:06,580 [81626082]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to index 
2022-03-23 15:54:06,580 [81626082]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 1922ms; general responsiveness: ok; EDT responsiveness: ok 
2022-03-23 15:54:06,595 [81626097]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to index 
2022-03-23 15:54:08,524 [81628026]   INFO - rationStore.ComponentStoreImpl - Saving appFileTypeManager took 16 ms

我重新安装了 windows。 (反正我需要它)并安装了 intellij IDEA 2021.3 而不是 2020.3。一切正常。其中一些已经受到影响。或许重新安装同一个版本也能解决这个问题