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 118149 - Freeform projects are brittle in NB6 - provide better logging
Summary: Freeform projects are brittle in NB6 - provide better logging
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Freeform (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
: 116879 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-08 21:33 UTC by bruff
Modified: 2010-01-11 04:28 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bruff 2007-10-08 21:33:07 UTC
I've encountered several issues around undefined properties being included into a project.xml file.  This instance
apparently was caused by this property definition:

  project.test.runtime.class.path=${project.test.runtime.class.path}

which was included in a project.xml file using, 
    <configuration>
        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
            <!--Do not use Project Properties customizer when editing this file manually.-->
            <name>uicommon</name>
            <properties>
                <property-file>netbeansProject.properties</property-file>

This line apparently had the effect of causing the message below and not opening the project:

     [exec] WARNING: Project
FreeformProject[MasterFileObject@aa9ecd[Users/br136278/Documents/workspace/camplugin/cbem/src/java/ui-oz]]either does
not contain it's project directory under the Generic source groups or the project directory is under more than one
source group

The inspect project metadata shows:

Generic source roots:

Actions:
  build
  clean
  compile.single
  copy
  debug
  debug.single
  delete
  deploy
  javadoc
  move
  rebuild
  redeploy
  rename
  run
  run.single
  test

Cache directory: /Users/br136278/Documents/workspace/camplugin/cbem/src/java/ui-oz/nbproject/private/cache

Properties (from field eval):
java.lang.NullPointerException
        at java.util.TreeMap.putAll(TreeMap.java:314)
        at java.util.TreeMap.<init>(TreeMap.java:156)
        at org.netbeans.modules.apisupport.projectinspector.InspectProjectAction.dump(InspectProjectAction.java:357)
        at org.netbeans.modules.apisupport.projectinspector.InspectProjectAction.access$100(InspectProjectAction.java:96)
        at org.netbeans.modules.apisupport.projectinspector.InspectProjectAction$Impl$1$1.run(InspectProjectAction.java:138)
        at org.openide.util.Mutex.readAccess(Mutex.java:318)
        at org.netbeans.modules.apisupport.projectinspector.InspectProjectAction$Impl$1.run(InspectProjectAction.java:123)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 1 Milan Kubec 2007-10-11 12:14:21 UTC
Please could you elaborate more about the problem? Where is the property used? What's the purpose of such property
definition? When was the WARNING message printed?

I have created such a setup and I can open the project without a problem. Thanks for additional info.
Comment 2 Milan Kubec 2007-10-18 11:11:45 UTC
Please provide more info, isn't this issue related to issue #116879? Thanks.
Comment 3 bruff 2007-10-18 16:59:32 UTC
An included property file (which was referenced via the <properties><property-file> element) had one property with a
value like this:
  propertyName=${property.value}

This property wasn't used by (explicitly referenced in) the project.xml file.  Yet it caused the project to fail to
load.  Removing this property from the property file allowed the NB project to load successfully.

It would be useful to at least provide more details to the user when a project fails to open or encounters other errors.
 With NB 5.5 I would sometimes see a message at the bottom of the IDE (status bar?).  I'm not seeing these in NB 6.  It
would be useful to get more details possibly in the log for these conditions.  Something better could be a dialog with
project errors encountered upon opening a Freeform project (something like normal project missing references).

You might spend a little time catching exceptions and adding some context to the messages.  For example I encountered an
issue with a classpath (via a referenced property).  In org.netbeans.modules.java.freeform.Classpaths the SourcePRI
constructor was failing in computeMatcher().  If you captured the URL root that caused the exception, this information
could be at least logged.  This would provide a clue as to what was going wrong.

I'm suggesting a similar evaluation for other Freeform project initialization issues.   
Comment 4 bruff 2007-10-18 17:02:59 UTC
*** Issue 116879 has been marked as a duplicate of this issue. ***
Comment 5 Milan Kubec 2007-10-19 12:42:07 UTC
I tried to reproduce the problem doing exactly what you have written but the project opened without any error. I know
that error logging in freeform project could be better and it's highly probable that freeform project will undergo major
upgrade in next release (6.0 is past Beta2), so I will reclassify this issue as enhancement that will be addressed in
next release.
Comment 6 Jesse Glick 2009-02-02 22:19:18 UTC
BTW I am fixing the NPE from the diag tool: contrib #891ff1c4a666
Comment 7 Antonin Nebuzelsky 2010-01-11 04:28:57 UTC
Changing the default component owner to tzezula.