Hi,

This morning I started to look at a SpotBugs plugin, and so I have started
trying to create a maven based NetBeans plugin for this.

The problem I'm having is that I need to have a dependency
on org.netbeans.modules:org-netbeans-modules-code-analysis:RELEASE112 but
it seems that this isn't being picked up when I attempt to run the
plugin and I get the stack trace listed below.

I have committed what I have so far (its nothing really, just a
AnalyzerFactory and Analyzer with some empty methods) on GitHub (
https://github.com/mcdonnell-john/nb-spotbugs-plugin), this should allow
you to see what exactly I'm doing and hopefully recreate and point me in
the right direction.

Regards

John

Stacktrace mentioned above:

java.lang.ClassNotFoundException:
org.netbeans.modules.analysis.spi.Analyzer$AnalyzerFactory
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:197)
Caused: java.lang.ClassNotFoundException:
org.netbeans.modules.analysis.spi.Analyzer$AnalyzerFactory starting from
ModuleCL@2f8f1f65[org.jmcdonnell.netbeans.nb.spotbugs.plugin] with possible
defining loaders [ModuleCL@56965dfa[org.netbeans.modules.code.analysis]]
and declared parents [ModuleCL@46201667[org.netbeans.spi.editor.hints],
org.netbeans.JarClassLoader@59398860, ModuleCL@7a8f9518[org.openide.awt],
ModuleCL@7aa3d715[org.openide.loaders], ModuleCL@604b7ee
[org.netbeans.spi.java.hints]]
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:199)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
Caused: java.lang.NoClassDefFoundError:
org/netbeans/modules/analysis/spi/Analyzer$AnalyzerFactory
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at org.netbeans.JarClassLoader.doLoadClass(JarClassLoader.java:286)
at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:234)
Caused: java.lang.NoClassDefFoundError:
org/netbeans/modules/analysis/spi/Analyzer$AnalyzerFactory while loading
org.jmcdonnell.netbeans.spotbugs.plugin.SpotbugsAnalyzerFactory; see
http://wiki.netbeans.org/DevFaqTroubleshootClassNotFound
at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:238)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:162)
at
org.netbeans.ModuleManager$SystemClassLoader.loadClass(ModuleManager.java:769)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:415)
at
org.openide.util.lookup.MetaInfServicesLookup.search(MetaInfServicesLookup.java:306)
Caused: java.lang.ClassNotFoundException:
org/netbeans/modules/analysis/spi/Analyzer$AnalyzerFactory while loading
org.jmcdonnell.netbeans.spotbugs.plugin.SpotbugsAnalyzerFactory; see
http://wiki.netbeans.org/DevFaqTroubleshootClassNotFound
[catch] at
org.openide.util.lookup.MetaInfServicesLookup.search(MetaInfServicesLookup.java:311)
at
org.openide.util.lookup.MetaInfServicesLookup.beforeLookup(MetaInfServicesLookup.java:131)
at
org.openide.util.lookup.MetaInfServicesLookup.beforeLookupResult(MetaInfServicesLookup.java:110)
at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:458)
at org.openide.util.lookup.ProxyLookup$R.initResults(ProxyLookup.java:365)
at
org.openide.util.lookup.ProxyLookup$R.addLookupListener(ProxyLookup.java:464)
at
org.netbeans.modules.analysis.RunAnalysisPanel.<init>(RunAnalysisPanel.java:126)
at
org.netbeans.modules.analysis.RunAnalysis.showDialogAndRunAnalysis(RunAnalysis.java:95)
at
org.netbeans.modules.analysis.RunAnalysis.showDialogAndRunAnalysis(RunAnalysis.java:86)
at
org.netbeans.modules.analysis.RunAnalysisAction.actionPerformed(RunAnalysisAction.java:39)
at org.openide.awt.AlwaysEnabledAction$1.run(AlwaysEnabledAction.java:174)
at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:70)
at
org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:91)
at
org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:74)
at
org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:177)
at
java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
at
java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
at
java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at
java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369)
at
java.desktop/com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:129)
at java.desktop/java.awt.MenuItem.processActionEvent(MenuItem.java:690)
at java.desktop/java.awt.MenuItem.processEvent(MenuItem.java:649)
at
java.desktop/java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:375)
at java.desktop/java.awt.MenuComponent.dispatchEvent(MenuComponent.java:363)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at
java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
at
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at
java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
at
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
at
java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at
java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at
java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at
java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Reply via email to