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 62823 - Intermittent NullPointerException at creating a new project
Summary: Intermittent NullPointerException at creating a new project
Status: RESOLVED WORKSFORME
Alias: None
Product: javaee
Classification: Unclassified
Component: EAR (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ jyothivasa
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2005-08-23 01:30 UTC by judytang
Modified: 2009-02-19 20:58 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE-log file processed using dos2unix (245.89 KB, text/plain)
2007-07-06 10:04 UTC, nouar38
Details
Stack trace (1.22 KB, text/plain)
2008-02-14 05:11 UTC, jlaskowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description judytang 2005-08-23 01:30:18 UTC
I am using NetBeans 4.2 (8/10) build, and Appserver 8.1 PE UR2 for testing.

I got the following NullPointerException when I tried to create a new project.
This exception seems to be intermittent, since I did created a few new 
projects before this, and I did not see the exception.  So it may not be
easy to recreat this.  

java.lang.NullPointerException
	at
org.netbeans.modules.j2ee.earproject.ui.LogicalViewChildren.updateKeys(LogicalViewChildren.java:70)
	at
org.netbeans.modules.j2ee.earproject.ui.LogicalViewChildren.access$000(LogicalViewChildren.java:48)
	at
org.netbeans.modules.j2ee.earproject.ui.LogicalViewChildren$2.run(LogicalViewChildren.java:141)
	at org.openide.util.Task.run(Task.java:207)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:469)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:870)
Comment 1 Jan Lahoda 2005-08-23 07:39:28 UTC
Probably problem in j2ee/earproject, reassigning there.
Comment 2 Marek Fukala 2005-10-13 14:13:41 UTC
I have added some debug code which will warn users when the situation happen and
ask them to add more details about the situation to this issue.

Checking in
j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ui/LogicalViewChildren.java;
/cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ui/LogicalViewChildren.java,v
 <--  LogicalViewChildren.java
new revision: 1.7; previous revision: 1.6
done
Comment 3 Marek Fukala 2005-11-20 17:15:43 UTC
probably fixed?!? - noone complained about this even I added an informational
exception with link to this issue before more than month. I am closing the issue
as fixed, please reopen when you encounter it along with some details about the
situation when it happened.
Comment 4 ctfranco 2006-07-06 14:14:59 UTC
I am using NetBeans 5.5 Beta and an error dialog appear:
java.lang.IllegalStateException:
FileOwnerQuery.getOwner(MasterFileObject@833bf3[D:/J2EEFCS/FCServerApplication])
returned null. Please report this with the situation description to issue #62823
(http://www.netbeans.org/issues/show_bug.cgi?id=62823).
	at
org.netbeans.modules.j2ee.earproject.ui.LogicalViewChildren.updateKeys(LogicalViewChildren.java:73)
	at
org.netbeans.modules.j2ee.earproject.ui.LogicalViewChildren.access$000(LogicalViewChildren.java:49)
	at
org.netbeans.modules.j2ee.earproject.ui.LogicalViewChildren$2.run(LogicalViewChildren.java:151)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)

sorry for my very bad english
Comment 5 Martin Krauskopf 2006-09-07 16:04:31 UTC
I've got this as well trying to reproduce 81017. This may happen when the
project was deleted but someone still listening on project.xml (which could be
e.g. newly created?). Either we should get away of the warning (IAE) or fix it
otherways.
Comment 6 Martin Krauskopf 2006-09-11 10:26:06 UTC
Not for 5.5. Needs more investigation, and seems to be harmless and we are few
hours before high-resistance.
Comment 7 Martin Krauskopf 2006-09-11 16:29:24 UTC
J2EE team support ends, thus returning the issue back.
Comment 8 Radim Roska 2007-02-23 13:37:30 UTC
this exception occurs when working on project, which files has been deleted
manually.

its in netbeans-5_5_1-beta-bin-200702211400-21_Feb_2007_1400 build.

more about cause of error :
http://www.netbeans.org/issues/show_bug.cgi?id=96432
Comment 9 nouar38 2007-07-06 10:01:27 UTC
Got a window message form IDE telling me to update this issue 62832 with the working situation as hit this
NPE at creating a new EE project that had been deleted before.

Environment: 
NB 6.0 200707050000 & GF v2 b54 & jdk 1.6u1 on windows XP.

I've created a new EE project with IDE using File "New Project", Samples-> Enterprise->Interceptor Stateless
please see : 109006 about the different steps I've done to break the ear reference for my app-client module.
"Remove" action from Java EE Modules/app-client and "Add Java EE Module" again for this app-client

as I wanted to reproduce again to copy/paste the build.xml (run) output, I've deleted the EE project
and got the NPE window, deleted the dep projects, and recreate again.

I will attach the IDE-Log file messages.log

nouar (located in France, helping in testing GF serverplugin).




Comment 10 nouar38 2007-07-06 10:04:43 UTC
Created attachment 44764 [details]
IDE-log file processed using dos2unix
Comment 11 nouar38 2007-07-06 10:08:59 UTC
adding myself in cc. The exception is harmless as said by the IDE-Windows 6.0: delete is ok, recreate is ok.
Comment 12 nouar38 2007-07-06 10:33:57 UTC
we can keep RANDOM keyword, at create after the delete (second time), can see NPE + many other exceptions IOBE: last
shown in IDE-window is:

SEVERE [org.openide.util.RequestProcessor]

java.lang.IndexOutOfBoundsException: Index: 2, Size: 2

	at java.util.ArrayList.RangeCheck(ArrayList.java:547)

	at java.util.ArrayList.get(ArrayList.java:322)

	at org.openide.nodes.Children$Keys.setKeys(Children.java:2046)

	at org.netbeans.modules.j2ee.earproject.ui.LogicalViewChildren.updateKeys(LogicalViewChildren.java:94)

	at org.netbeans.modules.j2ee.earproject.ui.LogicalViewChildren.access$000(LogicalViewChildren.java:47)

	at org.netbeans.modules.j2ee.earproject.ui.LogicalViewChildren$2.run(LogicalViewChildren.java:129)

	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)

[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)


Comment 13 Vitaly Bychkov 2007-10-02 12:49:34 UTC
Got the next exception:

java.lang.IllegalStateException: FileOwnerQuery.getOwner(MasterFileObject@b6efd6[C:/My
Projects/NetBeansProjects/EnterpriseApplication2]) returned null. Please report this with
the situation description to issue #62823 (http://www.netbeans.org/issues/show_bug.cgi?id=62823).
        at org.netbeans.modules.j2ee.earproject.ui.LogicalViewChildren.updateKeys(LogicalViewChildren.java:72)

        at org.netbeans.modules.j2ee.earproject.ui.LogicalViewChildren.access$000(LogicalViewChildren.java:47)

        at org.netbeans.modules.j2ee.earproject.ui.LogicalViewChildren$2.run(LogicalViewChildren.java:129)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
WARNING [global]: Cannot resolve meta.inf property for EarProject[MasterFileObject@b6efd6[C:/My
Projects/NetBeansProjects/EnterpriseApplication2]]
SEVERE [global]
java.lang.NullPointerException
        at org.openide.filesystems.FileUtil.toFile(FileUtil.java:501)
        at org.netbeans.modules.j2ee.earproject.ProjectEar.getDeploymentConfigurationFile(ProjectEar.java:505)

        at org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule.getDeploymentConfigurationFile(J2eeM
odule.java:217)
        at org.netbeans.modules.j2ee.sun.ide.j2ee.ModuleConfigurationImpl.<init>(ModuleConfigurationImpl.java:
88)
        at org.netbeans.modules.j2ee.sun.ide.j2ee.ModConFactory.create(ModConFactory.java:41)
        at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getModuleConfiguration(ConfigSupportI
mpl.java:686)
        at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.ensureConfigurationReady(ConfigSuppor
tImpl.java:195)
        at org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleProvider.fireServerChange(J2eeModuleP
rovider.java:724)
        at org.netbeans.modules.j2ee.earproject.ProjectEar.propertyChange(ProjectEar.java:297)
        at org.netbeans.spi.project.support.ant.PropertyUtils$SequentialPropertyEvaluator.stateChanged(Propert
yUtils.java:879)
        at org.openide.util.WeakListenerImpl$Change.stateChanged(WeakListenerImpl.java:319)
[catch] at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:123)
        at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:109)
        at org.netbeans.spi.project.support.ant.ProjectProperties$PP$2.run(ProjectProperties.java:332)
        at org.netbeans.spi.project.support.ant.ProjectProperties$PP$2.run(ProjectProperties.java:331)
        at org.openide.util.Mutex.readAccess(Mutex.java:252)
        at org.netbeans.spi.project.support.ant.ProjectProperties$PP.fireChange(ProjectProperties.java:338)
        at org.netbeans.spi.project.support.ant.ProjectProperties$PP.diskChange(ProjectProperties.java:357)
        at org.netbeans.spi.project.support.ant.ProjectProperties$PP.fileCreated(ProjectProperties.java:364)
        at org.netbeans.modules.project.ant.FileChangeSupport$Holder.someChange(FileChangeSupport.java:186)
        at org.netbeans.modules.project.ant.FileChangeSupport$Holder.fileFolderCreated(FileChangeSupport.java:
204)
        at org.openide.filesystems.FCLSupport.dispatchEvent(FCLSupport.java:100)
        at org.openide.filesystems.FileObject$ED.dispatch(FileObject.java:903)
        at org.openide.filesystems.EventControl.invokeDispatchers(EventControl.java:203)
        at org.openide.filesystems.EventControl.exitAtomicAction(EventControl.java:177)
        at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:122)
        at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:499)
        at org.netbeans.spi.project.support.ant.ProjectProperties$PP.write(ProjectProperties.java:227)
        at org.netbeans.spi.project.support.ant.ProjectProperties.write(ProjectProperties.java:133)
        at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:567)
        at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:91)
        at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:129)
        at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactory
Singleton.java:213)
        at org.netbeans.api.project.ProjectManager$6.run(ProjectManager.java:587)
        at org.netbeans.api.project.ProjectManager$6.run(ProjectManager.java:577)
        at org.openide.util.Mutex.writeAccess(Mutex.java:379)
        at org.netbeans.api.project.ProjectManager.saveProject(ProjectManager.java:576)
        at org.netbeans.modules.j2ee.earproject.EarProjectGenerator.setupProject(EarProjectGenerator.java:539)

        at org.netbeans.modules.j2ee.earproject.EarProjectGenerator.doCreateProject(EarProjectGenerator.java:1
31)
        at org.netbeans.modules.j2ee.earproject.EarProjectGenerator.createProject(EarProjectGenerator.java:116
)
        at org.netbeans.modules.j2ee.earproject.ui.wizards.NewEarProjectWizardIterator.testableInstantiate(New
EarProjectWizardIterator.java:131)
        at org.netbeans.modules.j2ee.earproject.ui.wizards.NewEarProjectWizardIterator.instantiate(NewEarProje
ctWizardIterator.java:122)
        at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1023
)
        at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:595)
        at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:416)
        at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:253)
        at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:16
5)
        at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1373)
        at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1330)
        at org.openide.WizardDescriptor.access$1600(WizardDescriptor.java:119)
        at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:1899)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Deployment descriptor (application.xml) is not compulsory for JAVA EE 5.
If it's *really* needed, set force param to true.



reproduced on WinXP, with jdk1.5.0_09, nb6.0 build: 20071002041043
steps to reproduce:

 1. create new Enterprise Module (EnterpriseApplication2)
   in the new project wizard on the second step - "Name and Location" uncheck "Create Ejb Module" and "Create Web
Application Module"
 2. close project
 3. delete project directory 
 4.  repeat step 1 with the same name (EnterpriseApplication2) and see exception...
  

Comment 14 Vitaly Bychkov 2007-10-02 13:52:07 UTC
Got the same exception with the similar steps to reproduce (just one correction on the point 1 - don't change any
default settings i.e.:

 1. create new Enterprise Module (EnterpriseApplication2)
 2. close project
 3. delete project directory (EnterpriseApplication2)
 4.  repeat step 1 with the same name (EnterpriseApplication2) and see exception...

)
Comment 15 jlaskowski 2008-02-14 05:10:46 UTC
Just closed a project and removed it from the file system. When went back to NetBeans IDE Dev (Build 200802100004) got
the exception. The message told me to update the issue so here I am. See the attachment for more information.
Comment 16 jlaskowski 2008-02-14 05:11:45 UTC
Created attachment 56649 [details]
Stack trace
Comment 17 _ gowri 2008-12-03 22:01:32 UTC
I tried several times and cannot reproduce this bug anymore with the provided steps using Netbeans6.5. Please reopen it
if you still see the bug with exact steps.