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 230549 - NullPointerException at org.netbeans.spi.project.support.ant.PropertyUtils.relativizeFile
Summary: NullPointerException at org.netbeans.spi.project.support.ant.PropertyUtils.re...
Status: REOPENED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-30 19:43 UTC by _ rkubacki
Modified: 2013-10-10 19:52 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 201045


Attachments
stacktrace (3.88 KB, text/plain)
2013-05-30 19:43 UTC, _ rkubacki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2013-05-30 19:43:39 UTC
Build: NetBeans IDE 7.3 (Build 201302132200)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.12-b01, Java(TM) SE Runtime Environment, 1.6.0_37-b06
OS: Linux

User Comments:
rkubacki: add project dependency to apisupport project. it seems that dependency on Maven project is not working.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.spi.project.support.ant.PropertyUtils.relativizeFile(PropertyUtils.java:425)
   at org.netbeans.modules.apisupport.project.ui.customizer.SuiteProperties.storeClusterPath(SuiteProperties.java:407)
   at org.netbeans.modules.apisupport.project.ui.customizer.SuiteProperties.storeProperties(SuiteProperties.java:307)
   at org.netbeans.modules.apisupport.project.ui.customizer.SuiteCustomizer.storeProperties(SuiteCustomizer.java:86)
   at org.netbeans.modules.apisupport.project.ui.customizer.BasicCustomizer$2.run(BasicCustomizer.java:159)
   at org.netbeans.modules.apisupport.project.ui.customizer.BasicCustomizer$2.run(BasicCustomizer.java:157)
Comment 1 _ rkubacki 2013-05-30 19:43:40 UTC
Created attachment 135159 [details]
stacktrace
Comment 2 Milos Kleint 2013-05-31 12:09:28 UTC
ant apisupport should not allow adding maven projects to the platform as dependencies (in suite I suppose)
Comment 3 Martin Kozeny 2013-05-31 15:08:45 UTC
IDE should not allow to add maven module as a dependency to ant module. But I think you did something different am I right?
Comment 4 _ rkubacki 2013-05-31 16:41:11 UTC
First of all: I do not agree with the statement that the IDE should not support adding Maven project that produces NBM as dependency to my NetBeans plugin. If you think so then give other way how to configure such dependency (for my IDE setup and manual build as well as for automated build on my remote Jenkins machine). 

Second: I did various things. I added '<path-to-recently-mavenized-project>/target/nbm/netbeans/extra' to 'cluster.path of my project. I couldn't open the project then after restart (FAIL). And tried project customizer to recieve exceptions like this or get into some non-working state.
Comment 5 _ rkubacki 2013-05-31 16:56:24 UTC
running 'mvn nbm:cluster' and adding '<path-to-recently-mavenized-project>/target/netbeans_clusters/extra' to cluster.path seems good enough for the build system to find the plugin when building but the project cannot be open:

SEVERE [org.openide.util.Exceptions]
java.lang.NullPointerException
        at org.netbeans.modules.apisupport.project.universe.ClusterUtils.evaluateClusterPath(ClusterUtils.java:195)
        at org.netbeans.modules.apisupport.project.universe.ModuleList.findOrCreateModuleListFromSuite(ModuleList.java:692)
        at org.netbeans.modules.apisupport.project.universe.ModuleList$2.run(ModuleList.java:225)
        at org.netbeans.modules.apisupport.project.universe.ModuleList$2.run(ModuleList.java:205)
        at org.netbeans.modules.apisupport.project.universe.ModuleList$1.run(ModuleList.java:185)
        at org.netbeans.modules.apisupport.project.universe.ModuleList$1.run(ModuleList.java:181)
        at org.openide.util.Mutex.readAccess(Mutex.java:332)
        at org.netbeans.modules.apisupport.project.universe.ModuleList.runProtected(ModuleList.java:181)
        at org.netbeans.modules.apisupport.project.universe.ModuleList.getModuleList(ModuleList.java:205)
        at org.netbeans.modules.apisupport.project.NbModuleProject.getModuleList(NbModuleProject.java:602)
        at org.netbeans.modules.apisupport.project.Evaluator$2.run(Evaluator.java:238)
        at org.netbeans.modules.apisupport.project.Evaluator$2.run(Evaluator.java:234)
        at org.openide.util.Mutex.readAccess(Mutex.java:290)
        at org.netbeans.modules.apisupport.project.Evaluator.reset(Evaluator.java:234)
        at org.netbeans.modules.apisupport.project.Evaluator.access$100(Evaluator.java:106)
        at org.netbeans.modules.apisupport.project.Evaluator$1.run(Evaluator.java:218)
        at org.netbeans.modules.apisupport.project.Evaluator$1.run(Evaluator.java:215)
        at org.openide.util.Mutex.readAccess(Mutex.java:290)
        at org.netbeans.modules.apisupport.project.Evaluator.delegatingEvaluator(Evaluator.java:215)
        at org.netbeans.modules.apisupport.project.Evaluator.getProperty(Evaluator.java:168)
        at org.netbeans.spi.java.project.classpath.support.ProjectClassPathImplementation.getPath(ProjectClassPathImplementation.java:142)

from classpath resolving makes some sense.

plenty of messages like 
SEVERE [org.openide.util.Exceptions]
java.lang.NullPointerException
WARNING [org.netbeans.modules.project.ui.OpenProjectList]
java.lang.NullPointerException
WARNING [org.netbeans.modules.project.ui.OpenProjectList]

are not so helpful.
Comment 6 Martin Kozeny 2013-07-18 11:17:28 UTC
Please write steps to reproduce the problem. Thanks.
Comment 7 _ rkubacki 2013-08-09 09:27:01 UTC
I will try to be more clear hoping to find more empathy. General problem is 'how do I set up my environment to build a set of NetBeans plugins using Ant-based apisupport projects if there is a dependency on a Maven NBM project?'

To be concrete part nbandroid is a support for Gradle project - apisupport module that depends on https://github.com/kelemen/netbeans-gradle-project. I tried various things to get this set up right and plenty of them failed with various exceptions. Some of these exception made my project disappear completely. Cannot it fail more gracefully if you really reject the idea? 

My current workaround is to install Gradle plugin into special userdir and add this to cluster path. I don't like it - there is neither way how to patch both modules and test their interaction nor the simple navigation/dependency resolution for Java functionality.