This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 94916

Summary: NullPointerException when adding web app to composite app project
Product: soa Reporter: Ritesh Adval <radval>
Component: Composite ApplicationAssignee: _ gmpatil <gmpatil>
Status: VERIFIED FIXED    
Severity: blocker CC: gmpatil, rcruz
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Ritesh Adval 2007-02-08 06:48:09 UTC
This is with latest build as of today.
I am getting following exception when adding a web application to composite
application.

java.lang.NullPointerException
	at
org.netbeans.modules.compapp.projects.jbi.ui.customizer.VisualClassPathItem.equals(VisualClassPathItem.java:345)
	at java.util.ArrayList.indexOf(ArrayList.java:220)
	at
org.netbeans.modules.compapp.projects.jbi.ui.customizer.JbiProjectProperties$PathParser.encode(JbiProjectProperties.java:1647)
	at
org.netbeans.modules.compapp.projects.jbi.ui.customizer.JbiProjectProperties$PropertyInfo.encode(JbiProjectProperties.java:1229)
	at
org.netbeans.modules.compapp.projects.jbi.ui.customizer.JbiProjectProperties$1.run(JbiProjectProperties.java:782)
	at org.openide.util.Mutex.writeAccess(Mutex.java:356)
	at
org.netbeans.modules.compapp.projects.jbi.ui.customizer.JbiProjectProperties.store(JbiProjectProperties.java:772)
	at
org.netbeans.modules.compapp.projects.jbi.ui.actions.AddProjectAction.addProject(AddProjectAction.java:204)
	at
org.netbeans.modules.compapp.projects.jbi.ui.actions.AddProjectAction.perform(AddProjectAction.java:150)
	at
org.netbeans.modules.project.ui.actions.ProjectAction.actionPerformed(ProjectAction.java:99)
	at
org.netbeans.modules.project.ui.actions.LookupSensitiveAction.actionPerformed(LookupSensitiveAction.java:139)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
	at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
	at java.awt.Component.processMouseEvent(Component.java:5488)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
	at java.awt.Component.processEvent(Component.java:5253)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3955)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1778)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Steps to reproduce:

(1)create a composite app project
(2)create a web project
(3) add web project to composite app project by right click "add jbi module"
action of composite app project node.
(4)Go to composite app project properties and remove reference to this web app.
hit ok to close properties dialog.
(5) Now try to add web project again, you will get above exception.

After this I can not add web project again.
Comment 1 _ gmpatil 2007-02-08 20:14:27 UTC
Assigning to myself
Comment 2 _ gmpatil 2007-02-09 09:19:52 UTC
Fixed. 
Please verify.
Comment 3 srinivaschintalapati 2007-04-05 05:45:36 UTC
Verified the fix and is working fine using build#
NetBeans IDE Dev (Build 20070403-2248)
1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06
Windows XP version 5.1 running on x86
en_US (nb); Cp1252