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 70314 - Java.lang.NullPointerException
Summary: Java.lang.NullPointerException
Status: RESOLVED WORKSFORME
Alias: None
Product: javame
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Adam Sotona
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-13 10:14 UTC by rajenderpasricha
Modified: 2006-10-23 16:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
logfile (792.07 KB, text/plain)
2005-12-13 10:24 UTC, rajenderpasricha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rajenderpasricha 2005-12-13 10:14:27 UTC
Hi,
I tried to open an existing project, stored in D drive of my computer, then I 
faced this problem. I am sending log file too.
Thanks
Rajender Pasricha
Comment 1 rajenderpasricha 2005-12-13 10:24:50 UTC
Created attachment 27783 [details]
logfile
Comment 2 Jan Pokorsky 2005-12-13 11:05:06 UTC
passing to j2me for evaluation
Comment 3 Adam Sotona 2005-12-15 11:15:59 UTC
There are four strange exceptions that need to be analyzed:

1. how can newly created project fail to create project location with NPE

java.lang.NullPointerException
	at
org.netbeans.modules.kjava.j2meproject.J2MEProjectGenerator.createProjectLocation(J2MEProjectGenerator.java:848)
	at
org.netbeans.modules.kjava.j2meproject.J2MEProjectGenerator.createProject(J2MEProjectGenerator.java:335)
	at
org.netbeans.modules.kjava.j2meproject.J2MEProjectGenerator.createNewProject(J2MEProjectGenerator.java:207)
	at
org.netbeans.modules.kjava.j2meproject.ui.wizard.NewProjectIterator.instantiate(NewProjectIterator.java:129)

2. how can GeneratedFilesHelper fail to create a project meta-information with NPE

java.lang.NullPointerException
	at
org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:227)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:96)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:450)
	at
org.netbeans.spi.project.support.ant.GeneratedFilesHelper$1.run(GeneratedFilesHelper.java:222)
	at org.openide.util.Mutex.writeAccess(Mutex.java:324)
	at
org.netbeans.spi.project.support.ant.GeneratedFilesHelper.generateBuildScriptFromStylesheet(GeneratedFilesHelper.java:215)
	at
org.netbeans.spi.project.support.ant.GeneratedFilesHelper$7.run(GeneratedFilesHelper.java:641)
	at org.openide.util.Mutex.writeAccess(Mutex.java:324)
	at
org.netbeans.spi.project.support.ant.GeneratedFilesHelper.refreshBuildScript(GeneratedFilesHelper.java:637)
	at
org.netbeans.modules.kjava.j2meproject.J2MEProject$ProjectOpenedHookImpl.projectOpened(J2MEProject.java:411)

3. how can J2MEPhysicalViewProvider fail with NPE on resolving some project files

java.lang.NullPointerException: Must pass a non-null filename
	at
org.netbeans.spi.project.support.ant.AntProjectHelper.resolveFileObject(AntProjectHelper.java:1073)
	at
org.netbeans.modules.kjava.j2meproject.ui.J2MEPhysicalViewProvider$PLookup.createChildren(J2MEPhysicalViewProvider.java:176)
	at
org.netbeans.modules.kjava.j2meproject.ui.J2MEPhysicalViewProvider$J2MEProjectRootNode.<init>(J2MEPhysicalViewProvider.java:206)


4. how can be removed nonexistent classpathpath when there is probably no
previous fail with the classpath registration

java.lang.IllegalArgumentException: Attempt to remove nonexistent path ClassPath[]
	at
org.netbeans.api.java.classpath.GlobalPathRegistry.unregister(GlobalPathRegistry.java:205)
	at
org.netbeans.modules.kjava.j2meproject.J2MEProject$ProjectOpenedHookImpl.projectClosed(J2MEProject.java:449)
	at
org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectClosed(ProjectOpenedHook.java:53)
[catch] at
org.netbeans.modules.project.ui.OpenProjectList.notifyClosed(OpenProjectList.java:532)
	at org.netbeans.modules.project.ui.OpenProjectList.close(OpenProjectList.java:292)
	at
org.netbeans.modules.project.ui.actions.CloseProject.actionPerformed(CloseProject.java:58)



The NPEs should not be thrown because there are many checks for FileObject
existence before further usage and we already expect possible problems with
physical folders/files creation during new project creation and during
construction of project nodes. I'll look at it deeply.
Comment 4 Adam Sotona 2006-01-02 15:02:16 UTC
We need some more information to be able to reproduce the problem.
Closing as WORKSFORME, please reopen if happens again.