yogendra / ivyidea

Automatically exported from code.google.com/p/ivyidea
0 stars 0 forks source link

NullPointerException when trying to resolve #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I try to resolve the dependencies for a module, I get a NPE.  Worse,
it prevents me from editing my module settings and I'm forced to reset.

java.lang.IllegalArgumentException: Argument 0 for @NotNull parameter of
org/clarent/ivyidea/ivy/IvyUtil.loadConfigurations must not be null
    at org.clarent.ivyidea.ivy.IvyUtil.loadConfigurations(IvyUtil.java)
    at
org.clarent.ivyidea.intellij.facet.ui.IvyIdeaFacetEditorTab.reset(IvyIdeaFacetEd
itorTab.java:154)
    at
com.intellij.openapi.options.UnnamedConfigurableGroup.reset(UnnamedConfigurableG
roup.java:52)
    at com.intellij.facet.impl.ui.FacetEditorImpl.reset(FacetEditorImpl.java:13)
    at
com.intellij.facet.impl.ProjectFacetsConfigurator.getOrCreateEditor(ProjectFacet
sConfigurator.java:93)
    at
com.intellij.openapi.roots.ui.configuration.projectRoot.FacetConfigurable.getEdi
tor(FacetConfigurable.java:19)
    at
com.intellij.openapi.roots.ui.configuration.projectRoot.FacetConfigurable.create
OptionsPanel(FacetConfigurable.java:4)
    at
com.intellij.openapi.ui.NamedConfigurable.createComponent(NamedConfigurable.java
:76)
    at
com.intellij.openapi.ui.MasterDetailsComponent.updateSelection(MasterDetailsComp
onent.java:607)
    at
com.intellij.openapi.roots.ui.configuration.projectRoot.ModuleStructureConfigura
ble.a(ModuleStructureConfigurable.java:203)
    at
com.intellij.openapi.roots.ui.configuration.projectRoot.ModuleStructureConfigura
ble.updateSelection(ModuleStructureConfigurable.java:110)
    at
com.intellij.openapi.ui.MasterDetailsComponent.setSelectedNode(MasterDetailsComp
onent.java:598)
    at
com.intellij.openapi.ui.MasterDetailsComponent.updateSelectionFromTree(MasterDet
ailsComponent.java:215)
    at
com.intellij.openapi.ui.MasterDetailsComponent.reset(MasterDetailsComponent.java
:349)
    at
com.intellij.openapi.roots.ui.configuration.projectRoot.BaseStructureConfigurabl
e.reset(BaseStructureConfigurable.java:21)
    at
com.intellij.openapi.roots.ui.configuration.projectRoot.ModuleStructureConfigura
ble.reset(ModuleStructureConfigurable.java:46)
    at
com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable.reset(P
rojectStructureConfigurable.java:184)
    at
com.intellij.openapi.options.ex.SingleConfigurableEditor.<init>(SingleConfigurab
leEditor.java:42)
    at
com.intellij.ide.actions.ShowSettingsUtilImpl.editConfigurable(ShowSettingsUtilI
mpl.java:67)
    at
com.intellij.ide.actions.ShowStructureSettingsAction.actionPerformed(ShowStructu
reSettingsAction.java:8)
    at
com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPe
rformed(ActionMenuItem.java:17)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at
com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(Action
MenuItem.java:41)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:65)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:129)
    at
com.intellij.ui.plaf.beg.BegMenuItemUI$MyMenuDragMouseHandler.menuDragMouseRelea
sed(BegMenuItemUI.java:12)
    at javax.swing.JMenuItem.fireMenuDragMouseReleased(JMenuItem.java:568)
    at javax.swing.JMenuItem.processMenuDragMouseEvent(JMenuItem.java:465)
    at javax.swing.JMenuItem.processMouseEvent(JMenuItem.java:411)

Original issue reported on code.google.com by borg...@gmail.com on 26 May 2009 at 9:28

GoogleCodeExporter commented 9 years ago
Looking at the code, this is due to no ivy.xml being defined for module.  
Rather than
throwing the NPE, it would be better to either:
A. Not have the option to resolve until you set ivy.xml (have it disabled in the
pop-up menu)
B. Take the user to the ivy module config screen to have them fill out the 
ivy.xml
C. Have a pop-up indicting that the ivy.xml has not been defined for the module.

Original comment by borg...@gmail.com on 27 May 2009 at 1:36

GoogleCodeExporter commented 9 years ago
Hi borgees,

I had the same issue as you ... not able to open the module settings. 
To avoid the NPE you can open your <module>.iml file inside IntelliJ and search 
for 
"IvyIDEA". 
You'll find an entry like <configuration ivyFile="" .... /> just change the 
ivyFile 
attribute and put anything there <configuration ivyFile="foo" ... /> (or better 
the 
absolute path to your ivy.xml file).
Then you should be able to open the module settings (even if the ivyFile 
doesn't 
exist!!).

Hope it helps.

Original comment by juanhern...@gmail.com on 30 Jul 2009 at 3:08

GoogleCodeExporter commented 9 years ago

Original comment by aefimov....@gmail.com on 27 Feb 2011 at 9:03

GoogleCodeExporter commented 9 years ago
It fixed already in last repository version

Original comment by aefimov....@gmail.com on 27 Feb 2011 at 10:23