Quantcast

[sonar-dev] Re: [sonar-user] Sonar plugin error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[sonar-dev] Re: [sonar-user] Sonar plugin error

Freddy Mallet
Hello, 

I'm forwarding this question to the Development mailing list.
-----
Sonar for Continuous Inspection



On Fri, May 11, 2012 at 3:16 PM, Anshuma Ashok Goyal <[hidden email]> wrote:

Hi,

 

I am working on upgrading the JLINT sonar plugin to the latest Sonar 3.0 version. I have downloaded the source code of the previous version (sonar-jlint-plugin-1.0-SNAPSHOT). And updated the code where required (as per my knowledge).

 

Getting following error after placing my updated plugin jar in the extensions\plugin dir.

 

Code is not at all calling SonarPlugin.getKey method. Not sure from where this method is getting called.

 

Is this due to some old-plugin version getting referenced. Attaching some files for reference.

 

INFO   | jvm 1    | 2012/05/11 18:32:20 | java.lang.UnsupportedOperationException

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.api.SonarPlugin.getKey(SonarPlugin.java:30)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.core.plugins.PluginInstaller.completeDeprecatedMetadata(PluginInstaller.java:144)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.core.plugins.PluginInstaller.extractMetadata(PluginInstaller.java:125)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.server.plugins.PluginDeployer.registerPlugin(PluginDeployer.java:93)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.server.plugins.PluginDeployer.loadUserPlugins(PluginDeployer.java:88)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.server.plugins.PluginDeployer.start(PluginDeployer.java:66)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at java.lang.reflect.Method.invoke(Unknown Source)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.behaviors.Stored.start(Stored.java:110)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1009)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1002)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:760)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:70)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.server.platform.Platform.startDatabaseConnectors(Platform.java:150)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.server.platform.Platform.init(Platform.java:99)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.server.platform.PlatformLifecycleListener.contextInitialized(PlatformLifecycleListener.java:33)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1272)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:489)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.Server.doStart(Server.java:224)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.application.JettyEmbedder.start(JettyEmbedder.java:72)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.application.StartServer.main(StartServer.java:48)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at java.lang.reflect.Method.invoke(Unknown Source)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at java.lang.Thread.run(Unknown Source)

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

Evgeny Mandrikov
Hi,

Problem comes from the fact that plugin JAR doesn't contain Plugin-Key in MANIFEST.MF, so Sonar treats it as a legacy plugin and calls method getKey ( legacy plugins use interface Plugin instead of class SonarPlugin ). Best way to solve this issue - use sonar-packaging-maven-plugin : http://docs.codehaus.org/display/SONAR/Coding+a+plugin

Good luck.


On Mon, May 14, 2012 at 1:32 PM, Freddy Mallet <[hidden email]> wrote:
Hello, 

I'm forwarding this question to the Development mailing list.
-----
Sonar for Continuous Inspection



On Fri, May 11, 2012 at 3:16 PM, Anshuma Ashok Goyal <[hidden email]> wrote:

Hi,

 

I am working on upgrading the JLINT sonar plugin to the latest Sonar 3.0 version. I have downloaded the source code of the previous version (sonar-jlint-plugin-1.0-SNAPSHOT). And updated the code where required (as per my knowledge).

 

Getting following error after placing my updated plugin jar in the extensions\plugin dir.

 

Code is not at all calling SonarPlugin.getKey method. Not sure from where this method is getting called.

 

Is this due to some old-plugin version getting referenced. Attaching some files for reference.

 

INFO   | jvm 1    | 2012/05/11 18:32:20 | java.lang.UnsupportedOperationException

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.api.SonarPlugin.getKey(SonarPlugin.java:30)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.core.plugins.PluginInstaller.completeDeprecatedMetadata(PluginInstaller.java:144)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.core.plugins.PluginInstaller.extractMetadata(PluginInstaller.java:125)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.server.plugins.PluginDeployer.registerPlugin(PluginDeployer.java:93)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.server.plugins.PluginDeployer.loadUserPlugins(PluginDeployer.java:88)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.server.plugins.PluginDeployer.start(PluginDeployer.java:66)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at java.lang.reflect.Method.invoke(Unknown Source)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.behaviors.Stored.start(Stored.java:110)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1009)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1002)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:760)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:70)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.server.platform.Platform.startDatabaseConnectors(Platform.java:150)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.server.platform.Platform.init(Platform.java:99)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.server.platform.PlatformLifecycleListener.contextInitialized(PlatformLifecycleListener.java:33)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1272)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:489)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.jetty.Server.doStart(Server.java:224)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.application.JettyEmbedder.start(JettyEmbedder.java:72)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.sonar.application.StartServer.main(StartServer.java:48)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at java.lang.reflect.Method.invoke(Unknown Source)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)

INFO   | jvm 1    | 2012/05/11 18:32:20 |   at java.lang.Thread.run(Unknown Source)

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_
Loading...