felipebz / zpa

Parser and static code analysis tool for PL/SQL and Oracle SQL.
https://zpa.felipebz.com
GNU Lesser General Public License v3.0
211 stars 77 forks source link

Plugin key is missing from manifest #148

Closed fdbozzo closed 3 years ago

fdbozzo commented 3 years ago

Hi! I'm surely be doing something wrong, but I'd copy both jars (sonar-plsql-open-plugin-2.4.0.jar and zpa-toolkit-2.4.0.jar) in my /sonarqube-8.7.0.41497-community/extensions/plugins directory, and when starting sonar (sonar.sh start) i get this error.

I'd check that sonarKey is ok in the MANIFEST, so I don't know why this error is happening.

A little background about this: I have 2 installations, one sonar-enterprise (with evaluation key) and one sonar-community, both with the same version, and both using the same PostreSql database (but one at a time). The majority of sonar projects where created and scanned with the enterprise version, and when opening them with the community version, I just can see the community created projects, and not the enterprise created ones (even being of the same language type)

Few days ago enterprise evaluation key expired (which did include de plsql plugin) and that's why I now I'm trying to run community with this plugin.

If I delete the plugins (both jars) from the /extensions/plugins directory, then I can run sonar.

The is the error part of the web.log file:

2021.04.07 11:53:17 ERROR web[][o.s.s.p.PlatformImpl] Web server startup failed
java.lang.NullPointerException: Plugin key is missing from manifest
    at java.base/java.util.Objects.requireNonNull(Objects.java:246)
    at org.sonar.core.platform.PluginInfo.<init>(PluginInfo.java:104)
    at org.sonar.server.plugins.ServerPluginInfo.<init>(ServerPluginInfo.java:32)
    at org.sonar.server.plugins.ServerPluginInfo.create(ServerPluginInfo.java:38)
    at org.sonar.server.plugins.PluginJarLoader.lambda$getExternalPluginsMetadata$5(PluginJarLoader.java:206)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1239)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
    at org.sonar.server.plugins.PluginJarLoader.loadPluginsFromDir(PluginJarLoader.java:236)
    at org.sonar.server.plugins.PluginJarLoader.getExternalPluginsMetadata(PluginJarLoader.java:206)
    at org.sonar.server.plugins.PluginJarLoader.loadPlugins(PluginJarLoader.java:92)
    at org.sonar.server.plugins.ServerPluginManager.start(ServerPluginManager.java:64)
    at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
    at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
    at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
    at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
    at org.picocontainer.behaviors.Stored.start(Stored.java:110)
    at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
    at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
    at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
    at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
    at org.sonar.server.platform.platformlevel.PlatformLevel2.start(PlatformLevel2.java:111)
    at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
    at org.sonar.server.platform.PlatformImpl.startLevel2Container(PlatformImpl.java:179)
    at org.sonar.server.platform.PlatformImpl.init(PlatformImpl.java:87)
    at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4689)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5155)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
2021.04.07 11:53:17 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2021.04.07 11:53:17 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process

Any thoughts about why this error?

Thanks in advance!

felipebz commented 3 years ago

Hi! The zpa-toolkit is visual tool to see the AST (abstract syntax tree) generated by the parser, it's not a SonarQube plugin. You just need to copy the sonar-plsql-open-plugin file to the extensions/plugins directory. 😁

fdbozzo commented 3 years ago

It's working! Thanks! :-D