Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException occurs when adding a configuration to a newly created project. #1202

Closed
anusreelakshmi934 opened this issue Dec 19, 2024 · 2 comments · Fixed by #1216
Assignees
Labels
bug Something isn't working high priority should-fix
Milestone

Comments

@anusreelakshmi934
Copy link
Contributor

anusreelakshmi934 commented Dec 19, 2024

image

Steps to Reproduce:

  1. Run the LTI extension
  2. Open a new project
  3. Create a new Liberty run/debug config through the “Run” → “Edit configurations” window in IntelliJ
  4. Add any param and then try to run the configuration.

The dev mode doesnt get started and we will encounter the exception.
However, once we start using the default Start action without any configuration, stop it, and then try starting again with the configuration, it works.

Verified the same issue occurs with 24.0.9 version also.

Log

java.lang.NullPointerException: Cannot invoke "com.intellij.execution.impl.SingleConfigurationConfigurable.getConfiguration()" because "selected" is null at com.intellij.execution.impl.EditConfigurationsDialog$2.actionPerformed(EditConfigurationsDialog.java:137) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2314) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:407) at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6662) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3394) at java.desktop/java.awt.Component.processEvent(Component.java:6427) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5032) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4860) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4963) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4577) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4518) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2810) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4860) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:783) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:755) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:753) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:752) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:675) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:621) at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$21(IdeEventQueue.kt:564) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:564) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16$lambda$15(IdeEventQueue.kt:355) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:857) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16(IdeEventQueue.kt:354) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2$lambda$1(IdeEventQueue.kt:1045) at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:916) at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55) at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2(IdeEventQueue.kt:1045) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:1054) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1054) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18(IdeEventQueue.kt:349) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:395) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:121) at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:191) at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:236) at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:234) at java.base/java.security.AccessController.doPrivileged(AccessController.java:319) at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:234) at java.desktop/java.awt.Dialog.show(Dialog.java:1079) at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:890) at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:472) at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1772) at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1721) at com.intellij.execution.actions.EditRunConfigurationsAction.actionPerformed(EditRunConfigurationsAction.java:41) at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.kt:374) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks$lambda$7(ActionUtil.kt:343) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.performWithActionCallbacks(ActionManagerImpl.kt:1173) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.kt:342) at com.intellij.ui.popup.ActionPopupStep.performActionItem(ActionPopupStep.java:295) at com.intellij.ui.popup.ActionPopupStep.lambda$onChosen$3(ActionPopupStep.java:263) at com.intellij.ui.popup.AbstractPopup.lambda$dispose$21(AbstractPopup.java:1820) at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:916) at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55) at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23) at com.intellij.openapi.wm.impl.FocusManagerImpl.lambda$doWhenFocusSettlesDown$4(FocusManagerImpl.java:178) at com.intellij.util.ui.EdtInvocationManager.invokeLaterIfNeeded(EdtInvocationManager.java:32) at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.kt:1303) at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:173) at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:165) at com.intellij.ui.popup.AbstractPopup.dispose(AbstractPopup.java:1818) at com.intellij.ui.popup.WizardPopup.dispose(WizardPopup.java:170) at com.intellij.ui.popup.list.ListPopupImpl.dispose(ListPopupImpl.java:404) at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.dispose(PopupFactoryImpl.java:311) at com.intellij.openapi.util.ObjectTree.runWithTrace(ObjectTree.java:131) at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:163) at com.intellij.openapi.util.Disposer.dispose(Disposer.java:205) at com.intellij.openapi.util.Disposer.dispose(Disposer.java:193) at com.intellij.ui.popup.WizardPopup.disposeAllParents(WizardPopup.java:278) at com.intellij.ui.popup.list.ListPopupImpl.disposePopup(ListPopupImpl.java:536) at com.intellij.ui.popup.list.ListPopupImpl.handleNextStep(ListPopupImpl.java:560) at com.intellij.ui.popup.list.ListPopupImpl._handleSelect(ListPopupImpl.java:521) at com.intellij.ui.popup.list.ListPopupImpl.handleSelect(ListPopupImpl.java:446) at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.handleSelect(PopupFactoryImpl.java:324) at com.intellij.ui.popup.list.ListPopupImpl$MyMouseListener.mouseReleased(ListPopupImpl.java:786) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6662) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3394) at com.intellij.ui.popup.list.ListPopupImpl$MyList.processMouseEvent(ListPopupImpl.java:851) at java.desktop/java.awt.Component.processEvent(Component.java:6427) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5032) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4860) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4963) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4577) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4518) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2810) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4860) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:783) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:755) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:753) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:752) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:675) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:621) at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$21(IdeEventQueue.kt:564) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:564) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16$lambda$15(IdeEventQueue.kt:355) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:857) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16(IdeEventQueue.kt:354) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2$lambda$1(IdeEventQueue.kt:1045) at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:916) at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55) at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2(IdeEventQueue.kt:1045) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:1054) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:117) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1054) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18(IdeEventQueue.kt:349) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:395) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

@anusreelakshmi934
Copy link
Contributor Author

anusreelakshmi934 commented Dec 19, 2024

The investigation revealed that the buildFile is returning null because the project is only detected in the combo box after opening the liberty dashboard. Without opening, the project is not recognized, leading to the buildFile being null.

When we first Create a new Liberty run/debug config the Liberty project: is not getting detected on its own. like the below shown image.
image

But once we refresh the dashboard we get the project:
image

@anusreelakshmi934 anusreelakshmi934 added bug Something isn't working should-fix labels Dec 19, 2024
@anusreelakshmi934 anusreelakshmi934 added this to the Next milestone Dec 19, 2024
@turkeylurkey turkeylurkey self-assigned this Jan 6, 2025
@turkeylurkey turkeylurkey moved this from New Issues to In Progress in Open Liberty Developer Experience Jan 6, 2025
@turkeylurkey
Copy link
Member

The build file is missing because the list of modules is not built until the Liberty Explorer window is opened. We need to move the logic to build the list of modules out of the LibertyExplorer class and into an independent place like LibertyModules so it can be used when needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority should-fix
Projects
Development

Successfully merging a pull request may close this issue.

3 participants