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 132328 - NullPointerException at org.openide.filesystems.FileUtil.toFile
Summary: NullPointerException at org.openide.filesystems.FileUtil.toFile
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vince Kraemer
URL: http://statistics.netbeans.org/except...
Keywords:
: 154456 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-08 14:18 UTC by carmeyer
Modified: 2008-12-05 14:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 32010


Attachments
stacktrace (2.75 KB, text/plain)
2008-04-08 14:18 UTC, carmeyer
Details
stacktrace (2.75 KB, text/plain)
2008-04-08 14:20 UTC, carmeyer
Details
stacktrace (2.22 KB, text/plain)
2008-04-16 07:30 UTC, jraanamo
Details
stacktrace (3.01 KB, text/plain)
2008-06-23 15:59 UTC, g00se24
Details

Note You need to log in before you can comment on or make changes to this bug.
Description carmeyer 2008-04-08 14:18:51 UTC
Build: NetBeans IDE 6.1 Beta (Build 200803050202)
VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_04-b12-45-optimized
OS: Mac OS X, 10.5.2, x86_64

User Comments:
Comment 1 carmeyer 2008-04-08 14:18:56 UTC
Created attachment 59837 [details]
stacktrace
Comment 2 carmeyer 2008-04-08 14:20:10 UTC
Build: NetBeans IDE 6.1 Beta (Build 200803050202)
VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_04-b12-45-optimized
OS: Mac OS X, 10.5.2, x86_64

User Comments: 
opening an ejb-maven project
Comment 3 carmeyer 2008-04-08 14:20:29 UTC
Created attachment 59838 [details]
stacktrace
Comment 4 Exceptions Reporter 2008-04-08 16:24:04 UTC
This issue has already 10 duplicates 
Comment 5 Antonin Nebuzelsky 2008-04-15 17:20:10 UTC
Reassigning to new module owner jskrivanek.
Comment 6 jraanamo 2008-04-16 07:30:51 UTC
Build: NetBeans IDE 6.0.1 (Build 200801291616)
VM: Java HotSpot(TM) Client VM, 10.0-b19
OS: Linux, 2.6.22-14-generic, i386

User Comments: 
Opening a Maven2 project with server setting e.g:

  <properties>
        <netbeans.hint.deploy.server>J2EE</netbeans.hint.deploy.server>
    </properties>

where no such server exists causes NullPointerException. Comment out the hint and you are back in action. This is in Linux with NB 6.0.
Comment 7 jraanamo 2008-04-16 07:30:56 UTC
Created attachment 60249 [details]
stacktrace
Comment 8 Exceptions Reporter 2008-05-13 10:40:58 UTC
This issue has already -1 duplicates 
Comment 9 Vince Kraemer 2008-05-13 18:40:30 UTC
It looks like the module provider is returning a FileObject[] that has embedded null values in it.

That seems kind of wrong, but I can protect against that.

http://hg.netbeans.org/main/rev/3bd6536595a2

Comment 10 g00se24 2008-06-23 15:59:52 UTC
Created attachment 63267 [details]
stacktrace
Comment 11 kurti 2008-06-30 10:47:56 UTC
This happens when you use a "resources" entry in your pom with something different than "{$basedir}/src/main/resources":

        <resources>
            <resource>
                <directory>${basedir}/src/main/java</directory>
                <includes>
                    <include>**/gwtdto/*.java</include>
                </includes>
            </resource>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
        </resources>

As a workaround comment the resources section with <!--  -->, then open the project and remove the comment. You still
get the NPE upon first click on the project, but it is open.
Comment 12 Exceptions Reporter 2008-10-10 09:29:45 UTC
Reopening - reproduced in NetBeans IDE 6.1 (Build 200805300101)
http://statistics.netbeans.org/exceptions/detail.do?id=126069
Comment 13 getaceres 2008-10-10 09:34:20 UTC
It just happened to me in an up to date Netbeans 6.1 installation while trying to open a Maven project with a 

<properties>
   <netbeans.hint.deploy.server>J2EE</netbeans.hint.deploy.server>
</properties>

section.
Once this section is removed, the project opens normally.
Comment 14 Vince Kraemer 2008-10-14 02:09:51 UTC
this p3 bug was fixed after the 6.1 clone was created... but before the release shipped.

looks like a bug in the exception reporter...
Comment 15 getaceres 2008-10-14 08:36:48 UTC
I don't know if it's a different bug but the symptoms are the same as are described and I'm using an up to date Netbeans
6.1 installation with all the updates applied.
Comment 16 Milos Kleint 2008-12-05 14:14:27 UTC
*** Issue 154456 has been marked as a duplicate of this issue. ***