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 169307 - Regression in opening a Maven project for 6.7.1
Summary: Regression in opening a Maven project for 6.7.1
Status: RESOLVED WORKSFORME
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Simonek
URL:
Keywords: RANDOM
: 167919 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-28 12:07 UTC by fabriziogiudici
Modified: 2010-08-02 16:48 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fabriziogiudici 2009-07-28 12:07:31 UTC
NOTE: this thing affects 6.7.1, but I can't pick it from the "Found in version" chooser.

One of my poms can't be opened by NetBeans - it says "Badly formed..." and when I pop up the "Show and resolve problems"
I get the following:

RuntimeException occured in Apache Maven embedder while loading the project. 
This is preventing the project model from loading properly. 
Please file a bug report with details about your project and the IDE's log file.

java.lang.NullPointerException
	at org.apache.maven.plugin.DefaultPluginManager.setDescriptorClassAndArtifactInfo(DefaultPluginManager.java:933)
	at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:247)
	at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:186)
	at org.apache.maven.extension.DefaultExtensionManager.addPluginAsExtension(DefaultExtensionManager.java:218)
	at org.netbeans.modules.maven.embedder.NbExtensionManager.addPluginAsExtension(NbExtensionManager.java:111)
	at
org.apache.maven.extension.DefaultBuildExtensionScanner.checkModelBuildForExtensions(DefaultBuildExtensionScanner.java:401)
	at org.apache.maven.extension.DefaultBuildExtensionScanner.scanInternal(DefaultBuildExtensionScanner.java:196)
	at org.apache.maven.extension.DefaultBuildExtensionScanner.scanForBuildExtensions(DefaultBuildExtensionScanner.java:120)
	at org.apache.maven.embedder.MavenEmbedder.readProject(MavenEmbedder.java:377)
	at org.apache.maven.embedder.MavenEmbedder.readProjectWithDependencies_aroundBody0(MavenEmbedder.java:416)
	at org.apache.maven.embedder.MavenEmbedder.readProjectWithDependencies_aroundBody1$advice(MavenEmbedder.java:304)
	at org.apache.maven.embedder.MavenEmbedder.readProjectWithDependencies(MavenEmbedder.java:1)
	at org.netbeans.modules.maven.NbMavenProjectImpl.getOriginalMavenProject(NbMavenProjectImpl.java:354)
	at org.netbeans.modules.maven.queries.MavenForBinaryQueryImpl.checkURL(MavenForBinaryQueryImpl.java:156)
	at org.netbeans.modules.maven.queries.MavenForBinaryQueryImpl.access$100(MavenForBinaryQueryImpl.java:73)
	at org.netbeans.modules.maven.queries.MavenForBinaryQueryImpl$BinResult.getRoots(MavenForBinaryQueryImpl.java:290)
	at org.netbeans.modules.maven.queries.MavenForBinaryQueryImpl$1.propertyChange(MavenForBinaryQueryImpl.java:87)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
	at org.netbeans.modules.maven.api.NbMavenProject.doFireReload(NbMavenProject.java:459)
	at org.netbeans.modules.maven.api.NbMavenProject.access$200(NbMavenProject.java:82)
	at org.netbeans.modules.maven.api.NbMavenProject$AccessorImpl.doFireReload(NbMavenProject.java:123)
	at org.netbeans.modules.maven.NbMavenProjectImpl.fireProjectReload(NbMavenProjectImpl.java:514)
	at org.netbeans.modules.maven.NbMavenProjectImpl$1.run(NbMavenProjectImpl.java:502)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1030)

If I open the project with NetBeans 6.7, everything is fine.

The offending project can be cloned from https://kenai.com/hg/jrawio~src (45MB). The project is composed of a master pom
and three modules. Ignore jrawio-test, which is really broken (but not included by the master pom, and it's going to be
dropped). The master pom is ok, the jrawio module is ok, the reajent module breaks.
Comment 1 Milos Kleint 2009-07-28 12:30:54 UTC
does it fail to load the project consistently? I've cloned the project and had no problems opening. It's a bug in the
embedder I suppose (which hasn't changed in 6.7.1 since 6.7)
Does "Reload project" action on the affected project have any effect?
Comment 2 Milos Kleint 2009-07-28 12:45:02 UTC
*** Issue 167919 has been marked as a duplicate of this issue. ***
Comment 3 fabriziogiudici 2009-07-28 13:07:10 UTC
Reload didn't work. I tried it consistently twice and the error was still there. Then I erased $HOME/.netbeans/6.7,
re-downloaded all my favourite plugins and reopened the project, and this time it worked. 

Who knows? But having erased the NetBeans preferences means that I won't be able to reproduce exactly the same stuff, so
I presume this issue can be closed.
Comment 4 Milos Kleint 2009-07-28 13:28:50 UTC
an IDE restart might help (even without a user dir purge), we do some in memory caching (weak referenced and less
aggressive in 6.7.1 but still there). 

I would prefer not to close this isssue right away, I'll try to look into the stacktrace and see if I can patch the
embedder not to throw a NPE.
Comment 5 Antonin Nebuzelsky 2010-07-30 15:17:22 UTC
Reassigning to default owner.
Comment 6 Jesse Glick 2010-08-02 16:38:44 UTC
Can't find a method named 'setDescriptorClassAndArtifactInfo' in either M2 or M3 sources.
Comment 7 fabriziogiudici 2010-08-02 16:48:14 UTC
The bug is one year and two major version old, and I never saw it again with the latest stuff. So I agree this can be happily closed.