Thanks for you feedback.  This did indeed fix my problem.

- Blaine

From: Eirik Bakke [mailto:[email protected]]
Sent: Friday, February 1, 2019 12:40 PM
To: Blaine Bergeson (bbergeson) <[email protected]>; NetBeans Mailing List 
<[email protected]>
Subject: [EXT] RE: Missing implementation of ProjectManager in a RCP Maven 
project

In cases like these I find it helpful to search the NetBeans codebase. E.g.:

git clone 
[email protected]:apache/incubator-netbeans.git<mailto:[email protected]:apache/incubator-netbeans.git>
git grep ProjectManagerImplementation

The output includes the following line:
ide/projectapi.nb/src/org/netbeans/modules/projectapi/nb/NbProjectManager.java:public
 final class NbProjectManager implements ProjectManagerImplementation

That means the implementation of ProjectManagerImplementation lies in a module 
called "projectapi.nb". Looking at my own app's pom.xml, here are the relevant 
maven coordinates to include that module:

    <dependency>
      <groupId>org.netbeans.modules</groupId>
      <artifactId>org-netbeans-modules-projectapi-nb</artifactId>
      <version>${netbeans.version}</version>
      <scope>runtime</scope>
    </dependency>

-- Eirik

From: Blaine Bergeson (bbergeson) 
<[email protected]<mailto:[email protected]>>
Sent: Tuesday, January 29, 2019 6:58 PM
To: NetBeans Mailing List 
<[email protected]<mailto:[email protected]>>
Subject: Missing implementation of ProjectManager in a RCP Maven project

I am in the process of converting a working RCP Ant based application, built 
with NetBeans 8.2, over to NetBeans 8.2 Maven.  I am getting the following 
runtime error after adding my module that adds Project support:

java.lang.IllegalStateException: No ProjectManagerImplementation found in 
global Lookup.
                at 
org.netbeans.api.project.ProjectManager.<init>(ProjectManager.java:79)
                at 
org.netbeans.api.project.ProjectManager.<clinit>(ProjectManager.java:73)

I would think I am just missing a dependency.  Here is the code in the 
ProjectManager class which is displaying the error message above.

    private ProjectManager() {
        this.impl = 
Lookup.getDefault().lookup(ProjectManagerImplementation.class);
        if (this.impl == null) {
            throw new IllegalStateException("No ProjectManagerImplementation 
found in global Lookup."); //NOI18N
        }
        
this.impl.init(SPIAccessor.getInstance().createProjectManagerCallBack());


I looked at the ProjectManagerImplementation class and discovered it is just an 
interface so now where is the implementing class that is registering itself as 
an implementer?

My module is directly depending on the following modules:

org-openide-modules-projectapi-RELEASE82.jar
og-openide-modules-projectuiapi-RELEASE82.jar
org-openide-modules-projectuiapi-base-RELEASE82.jar

Again, my guess is that I am just missing a dependency, but which one?  
Comparing to my Ant based project that is working I still can't tell what I am 
missing.  Any ideas while I keep looking?

Thx Blaine

Reply via email to