Home > front end >  multi-pom in intellijIDEA. Error adding module to project: null
multi-pom in intellijIDEA. Error adding module to project: null

Time:03-25

I wanted to make a multi-pom project in Intellij (2020.3.4). In one Maven project, I right-click ->New -> Module -> Maven. select parent to "my project". However, even if parent is not specified, I get the error: Error adding module to project: null. (at the same time, it adds a regular folder with the module name and an empty pom.xml inside) (This happens with any archetype). I didn't find any solutions on the Internet at all. Only downgrade to the old version of Intellij IDEA and that solution was published 10 years ago. Tell me what is the problem? Or what to do? Does not work only with "Maven". With "Java" and "Spring Inizializr" it works.

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$0(MavenModuleBuilderHelper.java:85)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl$2.run(WriteCommandAction.java:122)
    at com.intellij.openapi.application.RunResult.run(RunResult.java:35)
    at com.intellij.openapi.command.WriteCommandAction.lambda$performWriteCommandAction$1(WriteCommandAction.java:253)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1000)
    at com.intellij.openapi.command.WriteCommandAction.lambda$performWriteCommandAction$2(WriteCommandAction.java:252)
    at com.intellij.openapi.command.WriteCommandAction.lambda$doExecuteCommand$4(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$0(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$4(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$0(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$0(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$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.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$5.run(EventQueue.java:751)
    at java.desktop/java.awt.EventQueue$5.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$8(IdeEventQueue.java:454)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(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$3(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$1.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$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: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.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.$Proxy146.createIndexer(Unknown Source)
    at org.jetbrains.idea.maven.server.MavenServerConnectorImpl.createIndexer(MavenServerConnectorImpl.java:197)
    at org.jetbrains.idea.maven.server.MavenServerManager$4.create(MavenServerManager.java:381)
    at org.jetbrains.idea.maven.server.MavenServerManager$4.create(MavenServerManager.java:377)
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)
    at org.jetbrains.idea.maven.server.MavenIndexerWrapper.lambda$getArchetypes$6(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$1.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

CodePudding user response:

I reinstalled windows. (I needed it anyway) and installed intellij IDEA 2021.3 instead of 2020.3. Everything worked. Some of this has affected. Perhaps reinstalling the same version would also solve this problem.

  • Related