Quantcast

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

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

[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
star

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_
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

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

anshuma

Yes, you were correct. In the MANIFEST.MF following were the contents.

 

Manifest-Version: 1.0

Archiver-Version: Plexus Archiver

Created-By: Apache Maven

Built-By: anshuma_goyal

Build-Jdk: 1.6.0_29

Version: 3.0

 

I tried sonar-packaging-maven-plugin in my pom.xml. But still getting the same result. Not sure what I am missing.

Attaching the pom.xml for reference.

 

Regards,

Anshuma

 

From: Evgeny Mandrikov [mailto:[hidden email]]
Sent: Monday, May 14, 2012 1:20 PM
To: [hidden email]
Cc: Anshuma Ashok Goyal
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

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 : <a href="http://docs.codehaus.org/display/SONAR/Coding&#43;a&#43;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_

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

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

Simon Brandhof
You forgot to attach pom file.


On 14 May 2012 11:44, Anshuma Ashok Goyal <[hidden email]> wrote:

Yes, you were correct. In the MANIFEST.MF following were the contents.

 

Manifest-Version: 1.0

Archiver-Version: Plexus Archiver

Created-By: Apache Maven

Built-By: anshuma_goyal

Build-Jdk: 1.6.0_29

Version: 3.0

 

I tried sonar-packaging-maven-plugin in my pom.xml. But still getting the same result. Not sure what I am missing.

Attaching the pom.xml for reference.

 

Regards,

Anshuma

 

From: Evgeny Mandrikov [mailto:[hidden email]]
Sent: Monday, May 14, 2012 1:20 PM
To: [hidden email]
Cc: Anshuma Ashok Goyal
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

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_


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

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

anshuma

My bad L

Attaching now.

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:23 PM
To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

You forgot to attach pom file.

On 14 May 2012 11:44, Anshuma Ashok Goyal <[hidden email]> wrote:

Yes, you were correct. In the MANIFEST.MF following were the contents.

 

Manifest-Version: 1.0

Archiver-Version: Plexus Archiver

Created-By: Apache Maven

Built-By: anshuma_goyal

Build-Jdk: 1.6.0_29

Version: 3.0

 

I tried sonar-packaging-maven-plugin in my pom.xml. But still getting the same result. Not sure what I am missing.

Attaching the pom.xml for reference.

 

Regards,

Anshuma

 

From: Evgeny Mandrikov [mailto:[hidden email]]
Sent: Monday, May 14, 2012 1:20 PM
To: [hidden email]
Cc: Anshuma Ashok Goyal
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

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 : <a href="http://docs.codehaus.org/display/SONAR/Coding&#43;a&#43;plugin" target="_blank">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_

 



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

    http://xircles.codehaus.org/manage_email

pom.txt (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

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

Simon Brandhof
<packaging> must be sonar-plugin.
And parent should not be org.codehaus.sonar:sonar.


On 14 May 2012 11:56, Anshuma Ashok Goyal <[hidden email]> wrote:

My bad L

Attaching now.

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:23 PM
To: [hidden email]


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

 

You forgot to attach pom file.

On 14 May 2012 11:44, Anshuma Ashok Goyal <[hidden email]> wrote:

Yes, you were correct. In the MANIFEST.MF following were the contents.

 

Manifest-Version: 1.0

Archiver-Version: Plexus Archiver

Created-By: Apache Maven

Built-By: anshuma_goyal

Build-Jdk: 1.6.0_29

Version: 3.0

 

I tried sonar-packaging-maven-plugin in my pom.xml. But still getting the same result. Not sure what I am missing.

Attaching the pom.xml for reference.

 

Regards,

Anshuma

 

From: Evgeny Mandrikov [mailto:[hidden email]]
Sent: Monday, May 14, 2012 1:20 PM
To: [hidden email]
Cc: Anshuma Ashok Goyal
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

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_

 



---------------------------------------------------------------------
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
star

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

anshuma

Thanks it worked. J

 

But while executing mvn sonar:sonar I am getting the following error.

 

Embedded error: Unable to build project for plugin 'org.codehaus.sonar.runtime:sonar-core-maven-plugin': POM 'org.codehaus.sonar.runtime:sonar-core-maven-plugin' not found in repository: Unable to download the artifact from any repository

 

org.codehaus.sonar.runtime:sonar-core-maven-plugin:pom:20120514154237

 

I have not made any entry for sonar-core-maven-plugin. Attaching the updated pom.

 

Regards,

Anshuma

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:29 PM
To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

<packaging> must be sonar-plugin.
And parent should not be org.codehaus.sonar:sonar.

On 14 May 2012 11:56, Anshuma Ashok Goyal <[hidden email]> wrote:

My bad L

Attaching now.

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:23 PM
To: [hidden email]


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

 

You forgot to attach pom file.

On 14 May 2012 11:44, Anshuma Ashok Goyal <[hidden email]> wrote:

Yes, you were correct. In the MANIFEST.MF following were the contents.

 

Manifest-Version: 1.0

Archiver-Version: Plexus Archiver

Created-By: Apache Maven

Built-By: anshuma_goyal

Build-Jdk: 1.6.0_29

Version: 3.0

 

I tried sonar-packaging-maven-plugin in my pom.xml. But still getting the same result. Not sure what I am missing.

Attaching the pom.xml for reference.

 

Regards,

Anshuma

 

From: Evgeny Mandrikov [mailto:[hidden email]]
Sent: Monday, May 14, 2012 1:20 PM
To: [hidden email]
Cc: Anshuma Ashok Goyal
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

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 : <a href="http://docs.codehaus.org/display/SONAR/Coding&#43;a&#43;plugin" target="_blank">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_

 



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

   http://xircles.codehaus.org/manage_email

 



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

    http://xircles.codehaus.org/manage_email

pom.txt (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

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

Simon Brandhof
Your plugin is correct. It seems that the version of sonar-maven-plugin is fixed in the project that you analyze.


On 14 May 2012 12:21, Anshuma Ashok Goyal <[hidden email]> wrote:

Thanks it worked. J

 

But while executing mvn sonar:sonar I am getting the following error.

 

Embedded error: Unable to build project for plugin 'org.codehaus.sonar.runtime:sonar-core-maven-plugin': POM 'org.codehaus.sonar.runtime:sonar-core-maven-plugin' not found in repository: Unable to download the artifact from any repository

 

org.codehaus.sonar.runtime:sonar-core-maven-plugin:pom:20120514154237

 

I have not made any entry for sonar-core-maven-plugin. Attaching the updated pom.

 

Regards,

Anshuma

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:29 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

<packaging> must be sonar-plugin.
And parent should not be org.codehaus.sonar:sonar.

On 14 May 2012 11:56, Anshuma Ashok Goyal <[hidden email]> wrote:

My bad L

Attaching now.

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:23 PM
To: [hidden email]


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

 

You forgot to attach pom file.

On 14 May 2012 11:44, Anshuma Ashok Goyal <[hidden email]> wrote:

Yes, you were correct. In the MANIFEST.MF following were the contents.

 

Manifest-Version: 1.0

Archiver-Version: Plexus Archiver

Created-By: Apache Maven

Built-By: anshuma_goyal

Build-Jdk: 1.6.0_29

Version: 3.0

 

I tried sonar-packaging-maven-plugin in my pom.xml. But still getting the same result. Not sure what I am missing.

Attaching the pom.xml for reference.

 

Regards,

Anshuma

 

From: Evgeny Mandrikov [mailto:[hidden email]]
Sent: Monday, May 14, 2012 1:20 PM
To: [hidden email]
Cc: Anshuma Ashok Goyal
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

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_

 



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

   http://xircles.codehaus.org/manage_email

 



---------------------------------------------------------------------
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
star

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

anshuma

I am sorry I was not clear enough in my previous mail.

 

I am trying to debug my plugin as per : <a href="http://docs.codehaus.org/display/SONAR/Coding&#43;a&#43;plugin#Codingaplugin-DebugJavabatch"> http://docs.codehaus.org/display/SONAR/Coding+a+plugin#Codingaplugin-DebugJavabatch

 

Simply run mvnDebug sonar:sonar and attach your IDE to the remote process

 

While doing so, am getting the below error.

 

net net - I am executing mvnDebug sonar:sonar command on my plugin (for debugging)

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 5:04 PM
To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

Your plugin is correct. It seems that the version of sonar-maven-plugin is fixed in the project that you analyze.

On 14 May 2012 12:21, Anshuma Ashok Goyal <[hidden email]> wrote:

Thanks it worked. J

 

But while executing mvn sonar:sonar I am getting the following error.

 

Embedded error: Unable to build project for plugin 'org.codehaus.sonar.runtime:sonar-core-maven-plugin': POM 'org.codehaus.sonar.runtime:sonar-core-maven-plugin' not found in repository: Unable to download the artifact from any repository

 

org.codehaus.sonar.runtime:sonar-core-maven-plugin:pom:20120514154237

 

I have not made any entry for sonar-core-maven-plugin. Attaching the updated pom.

 

Regards,

Anshuma

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:29 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

<packaging> must be sonar-plugin.
And parent should not be org.codehaus.sonar:sonar.

On 14 May 2012 11:56, Anshuma Ashok Goyal <[hidden email]> wrote:

My bad L

Attaching now.

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:23 PM
To: [hidden email]


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

 

You forgot to attach pom file.

On 14 May 2012 11:44, Anshuma Ashok Goyal <[hidden email]> wrote:

Yes, you were correct. In the MANIFEST.MF following were the contents.

 

Manifest-Version: 1.0

Archiver-Version: Plexus Archiver

Created-By: Apache Maven

Built-By: anshuma_goyal

Build-Jdk: 1.6.0_29

Version: 3.0

 

I tried sonar-packaging-maven-plugin in my pom.xml. But still getting the same result. Not sure what I am missing.

Attaching the pom.xml for reference.

 

Regards,

Anshuma

 

From: Evgeny Mandrikov [mailto:[hidden email]]
Sent: Monday, May 14, 2012 1:20 PM
To: [hidden email]
Cc: Anshuma Ashok Goyal
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

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 : <a href="http://docs.codehaus.org/display/SONAR/Coding&#43;a&#43;plugin" target="_blank">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_

 



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

   http://xircles.codehaus.org/manage_email

 



---------------------------------------------------------------------
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
star

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

Simon Brandhof
My answer is the same ! You should first succeed in analyzing the project without any installed plugins nor debug mode.


On 14 May 2012 13:53, Anshuma Ashok Goyal <[hidden email]> wrote:

I am sorry I was not clear enough in my previous mail.

 

I am trying to debug my plugin as per : http://docs.codehaus.org/display/SONAR/Coding+a+plugin#Codingaplugin-DebugJavabatch

 

Simply run mvnDebug sonar:sonar and attach your IDE to the remote process

 

While doing so, am getting the below error.

 

net net - I am executing mvnDebug sonar:sonar command on my plugin (for debugging)

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 5:04 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

Your plugin is correct. It seems that the version of sonar-maven-plugin is fixed in the project that you analyze.

On 14 May 2012 12:21, Anshuma Ashok Goyal <[hidden email]> wrote:

Thanks it worked. J

 

But while executing mvn sonar:sonar I am getting the following error.

 

Embedded error: Unable to build project for plugin 'org.codehaus.sonar.runtime:sonar-core-maven-plugin': POM 'org.codehaus.sonar.runtime:sonar-core-maven-plugin' not found in repository: Unable to download the artifact from any repository

 

org.codehaus.sonar.runtime:sonar-core-maven-plugin:pom:20120514154237

 

I have not made any entry for sonar-core-maven-plugin. Attaching the updated pom.

 

Regards,

Anshuma

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:29 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

<packaging> must be sonar-plugin.
And parent should not be org.codehaus.sonar:sonar.

On 14 May 2012 11:56, Anshuma Ashok Goyal <[hidden email]> wrote:

My bad L

Attaching now.

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:23 PM
To: [hidden email]


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

 

You forgot to attach pom file.

On 14 May 2012 11:44, Anshuma Ashok Goyal <[hidden email]> wrote:

Yes, you were correct. In the MANIFEST.MF following were the contents.

 

Manifest-Version: 1.0

Archiver-Version: Plexus Archiver

Created-By: Apache Maven

Built-By: anshuma_goyal

Build-Jdk: 1.6.0_29

Version: 3.0

 

I tried sonar-packaging-maven-plugin in my pom.xml. But still getting the same result. Not sure what I am missing.

Attaching the pom.xml for reference.

 

Regards,

Anshuma

 

From: Evgeny Mandrikov [mailto:[hidden email]]
Sent: Monday, May 14, 2012 1:20 PM
To: [hidden email]
Cc: Anshuma Ashok Goyal
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

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_

 



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

   http://xircles.codehaus.org/manage_email

 



---------------------------------------------------------------------
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
star

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

anshuma

Okay. Got your point. Will check that n revert J. Thanks.

 

Regards,

Anshuma.

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 5:27 PM
To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

My answer is the same ! You should first succeed in analyzing the project without any installed plugins nor debug mode.

On 14 May 2012 13:53, Anshuma Ashok Goyal <[hidden email]> wrote:

I am sorry I was not clear enough in my previous mail.

 

I am trying to debug my plugin as per : <a href="http://docs.codehaus.org/display/SONAR/Coding&#43;a&#43;plugin#Codingaplugin-DebugJavabatch" target="_blank"> http://docs.codehaus.org/display/SONAR/Coding+a+plugin#Codingaplugin-DebugJavabatch

 

Simply run mvnDebug sonar:sonar and attach your IDE to the remote process

 

While doing so, am getting the below error.

 

net net - I am executing mvnDebug sonar:sonar command on my plugin (for debugging)

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 5:04 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

Your plugin is correct. It seems that the version of sonar-maven-plugin is fixed in the project that you analyze.

On 14 May 2012 12:21, Anshuma Ashok Goyal <[hidden email]> wrote:

Thanks it worked. J

 

But while executing mvn sonar:sonar I am getting the following error.

 

Embedded error: Unable to build project for plugin 'org.codehaus.sonar.runtime:sonar-core-maven-plugin': POM 'org.codehaus.sonar.runtime:sonar-core-maven-plugin' not found in repository: Unable to download the artifact from any repository

 

org.codehaus.sonar.runtime:sonar-core-maven-plugin:pom:20120514154237

 

I have not made any entry for sonar-core-maven-plugin. Attaching the updated pom.

 

Regards,

Anshuma

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:29 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

<packaging> must be sonar-plugin.
And parent should not be org.codehaus.sonar:sonar.

On 14 May 2012 11:56, Anshuma Ashok Goyal <[hidden email]> wrote:

My bad L

Attaching now.

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:23 PM
To: [hidden email]


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

 

You forgot to attach pom file.

On 14 May 2012 11:44, Anshuma Ashok Goyal <[hidden email]> wrote:

Yes, you were correct. In the MANIFEST.MF following were the contents.

 

Manifest-Version: 1.0

Archiver-Version: Plexus Archiver

Created-By: Apache Maven

Built-By: anshuma_goyal

Build-Jdk: 1.6.0_29

Version: 3.0

 

I tried sonar-packaging-maven-plugin in my pom.xml. But still getting the same result. Not sure what I am missing.

Attaching the pom.xml for reference.

 

Regards,

Anshuma

 

From: Evgeny Mandrikov [mailto:[hidden email]]
Sent: Monday, May 14, 2012 1:20 PM
To: [hidden email]
Cc: Anshuma Ashok Goyal
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

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 : <a href="http://docs.codehaus.org/display/SONAR/Coding&#43;a&#43;plugin" target="_blank">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_

 



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

   http://xircles.codehaus.org/manage_email

 



---------------------------------------------------------------------
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
star

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

anshuma
In reply to this post by Simon Brandhof

Thanks Simon. I have updated my pom.xml and defined sonar-maven-plugin version explicitly. Its working fine now.

 

However, while debugging I am getting the following error:

 

[INFO] org.sonar.plugins.jlint.JlintMavenPluginHandler has unsatisfied dependency 'class org.sonar.plugins.jlint.JlintRulesRepository' for constructor 'public org.sonar.plugins.jlint.JlintMavenPluginHandler(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.jlint.JlintRulesRepository)' from

[hidden email]]:

org.picocontainer.DefaultPicoContainer@e62a39:44<|

 

I understand that - dependencies of an extension are defined by the parameters of its constructor. JlintRulesRepository class is present in the same package and is included in the list of extensions.

 

list.add(JlintSensor.class);

list.add(JlintMavenPluginHandler.class);

list.add(JlintRulesRepository.class);

 

Any clue why it is still saying “unsatisfied dependency”…

 

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 5:27 PM
To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

My answer is the same ! You should first succeed in analyzing the project without any installed plugins nor debug mode.

On 14 May 2012 13:53, Anshuma Ashok Goyal <[hidden email]> wrote:

I am sorry I was not clear enough in my previous mail.

 

I am trying to debug my plugin as per : <a href="http://docs.codehaus.org/display/SONAR/Coding&#43;a&#43;plugin#Codingaplugin-DebugJavabatch" target="_blank"> http://docs.codehaus.org/display/SONAR/Coding+a+plugin#Codingaplugin-DebugJavabatch

 

Simply run mvnDebug sonar:sonar and attach your IDE to the remote process

 

While doing so, am getting the below error.

 

net net - I am executing mvnDebug sonar:sonar command on my plugin (for debugging)

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 5:04 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

Your plugin is correct. It seems that the version of sonar-maven-plugin is fixed in the project that you analyze.

On 14 May 2012 12:21, Anshuma Ashok Goyal <[hidden email]> wrote:

Thanks it worked. J

 

But while executing mvn sonar:sonar I am getting the following error.

 

Embedded error: Unable to build project for plugin 'org.codehaus.sonar.runtime:sonar-core-maven-plugin': POM 'org.codehaus.sonar.runtime:sonar-core-maven-plugin' not found in repository: Unable to download the artifact from any repository

 

org.codehaus.sonar.runtime:sonar-core-maven-plugin:pom:20120514154237

 

I have not made any entry for sonar-core-maven-plugin. Attaching the updated pom.

 

Regards,

Anshuma

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:29 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

<packaging> must be sonar-plugin.
And parent should not be org.codehaus.sonar:sonar.

On 14 May 2012 11:56, Anshuma Ashok Goyal <[hidden email]> wrote:

My bad L

Attaching now.

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Monday, May 14, 2012 3:23 PM
To: [hidden email]


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

 

You forgot to attach pom file.

On 14 May 2012 11:44, Anshuma Ashok Goyal <[hidden email]> wrote:

Yes, you were correct. In the MANIFEST.MF following were the contents.

 

Manifest-Version: 1.0

Archiver-Version: Plexus Archiver

Created-By: Apache Maven

Built-By: anshuma_goyal

Build-Jdk: 1.6.0_29

Version: 3.0

 

I tried sonar-packaging-maven-plugin in my pom.xml. But still getting the same result. Not sure what I am missing.

Attaching the pom.xml for reference.

 

Regards,

Anshuma

 

From: Evgeny Mandrikov [mailto:[hidden email]]
Sent: Monday, May 14, 2012 1:20 PM
To: [hidden email]
Cc: Anshuma Ashok Goyal
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

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 : <a href="http://docs.codehaus.org/display/SONAR/Coding&#43;a&#43;plugin" target="_blank">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_

 



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

   http://xircles.codehaus.org/manage_email

 



---------------------------------------------------------------------
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
star

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

Simon Brandhof

On 16 May 2012 08:49, Anshuma Ashok Goyal <[hidden email]> wrote:

Thanks Simon. I have updated my pom.xml and defined sonar-maven-plugin version explicitly. Its working fine now.

I understand that - dependencies of an extension are defined by the parameters of its constructor. JlintRulesRepository class is present in the same package and is included in the list of extensions.



The extension point RuleRepository is by default available only on server-side (it implements ServerExtension). If some batch components like JlintMavenPluginHandler depend on it, then JlintRuleRepository should also implement BatchExtension.

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

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

anshuma

Unfortunatly, JlintRuleRepository extends RuleRepository (an abstract class in sonar-plugin-api ver. 3.0)

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Wednesday, May 16, 2012 12:27 PM
To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

 

On 16 May 2012 08:49, Anshuma Ashok Goyal <[hidden email]> wrote:

Thanks Simon. I have updated my pom.xml and defined sonar-maven-plugin version explicitly. Its working fine now.


More details here : <a href="http://docs.codehaus.org/display/SONAR/How&#43;to&#43;fix&#43;version&#43;of&#43;Maven&#43;plugin"> http://docs.codehaus.org/display/SONAR/How+to+fix+version+of+Maven+plugin

 

I understand that - dependencies of an extension are defined by the parameters of its constructor. JlintRulesRepository class is present in the same package and is included in the list of extensions.

 


The extension point RuleRepository is by default available only on server-side (it implements ServerExtension). If some batch components like JlintMavenPluginHandler depend on it, then JlintRuleRepository should also implement BatchExtension.

Regards

**************** 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***
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

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

Simon Brandhof
Yes : JlintRuleRepository extends RuleRepository implements BatchExtension
Note that in most cases rule repositories are not required on batch side. Could you describe your need please ?

On 16 May 2012 09:20, Anshuma Ashok Goyal <[hidden email]> wrote:

Unfortunatly, JlintRuleRepository extends RuleRepository (an abstract class in sonar-plugin-api ver. 3.0)

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Wednesday, May 16, 2012 12:27 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

 

On 16 May 2012 08:49, Anshuma Ashok Goyal <[hidden email]> wrote:

Thanks Simon. I have updated my pom.xml and defined sonar-maven-plugin version explicitly. Its working fine now.

I understand that - dependencies of an extension are defined by the parameters of its constructor. JlintRulesRepository class is present in the same package and is included in the list of extensions.

 


The extension point RuleRepository is by default available only on server-side (it implements ServerExtension). If some batch components like JlintMavenPluginHandler depend on it, then JlintRuleRepository should also implement BatchExtension.

Regards

**************** 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***

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

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

anshuma

We have set of customized jlint rules that we need to provide as input to jlint maven plugin. This maven plugin will call JLINT executable and analyze the project.

 

Even after implementing BatchExtension, getting same error:

 

[INFO] org.sonar.plugins.jlint.JlintMavenPluginHandler has unsatisfied dependency 'class org.sonar.p

lugins.jlint.JlintRulesRepository' for constructor 'public org.sonar.plugins.jlint.JlintMavenPluginH

andler(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.jlint.JlintRulesRepository)' from org.p

icocontainer.DefaultPicoContainer@9ac272:125<[Immutable]:org.picocontainer.DefaultPicoContainer@1e2b

67c:180<[Immutable]:org.picocontainer.DefaultPicoContainer@fd2b1:44<|

[INFO] ------------------------------------------------------------------------

 

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Wednesday, May 16, 2012 1:08 PM
To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

Yes : JlintRuleRepository extends RuleRepository implements BatchExtension
Note that in most cases rule repositories are not required on batch side. Could you describe your need please ?

On 16 May 2012 09:20, Anshuma Ashok Goyal <[hidden email]> wrote:

Unfortunatly, JlintRuleRepository extends RuleRepository (an abstract class in sonar-plugin-api ver. 3.0)

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Wednesday, May 16, 2012 12:27 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

 

On 16 May 2012 08:49, Anshuma Ashok Goyal <[hidden email]> wrote:

Thanks Simon. I have updated my pom.xml and defined sonar-maven-plugin version explicitly. Its working fine now.


More details here : <a href="http://docs.codehaus.org/display/SONAR/How&#43;to&#43;fix&#43;version&#43;of&#43;Maven&#43;plugin" target="_blank"> http://docs.codehaus.org/display/SONAR/How+to+fix+version+of+Maven+plugin

 

I understand that - dependencies of an extension are defined by the parameters of its constructor. JlintRulesRepository class is present in the same package and is included in the list of extensions.

 


The extension point RuleRepository is by default available only on server-side (it implements ServerExtension). If some batch components like JlintMavenPluginHandler depend on it, then JlintRuleRepository should also implement BatchExtension.

Regards

**************** 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***

 

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

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

anshuma
In reply to this post by Simon Brandhof

Hi Simon,

 

Initially below was the declaration for JlintRulesRepository:

 

public class JlintRulesRepository

extends AbstractRulesRepository<Java, JlintRulePriorityMapper>

implements org.sonar.api.rules.ConfigurationImportable, org.sonar.api.rules.ConfigurationExportable

 

All the classes/interfaces are deprecated. Hence, I have updated the class declaration as:

 

public class JlintRuleRepository extends RuleRepository implements BatchExtension

 

Still getting unsatisfied dependency error:

 

[INFO] org.sonar.plugins.jlint.JlintMavenPluginHandler has unsatisfied dependency 'class org.sonar.p

lugins.jlint.JlintRulesRepository' for constructor 'public org.sonar.plugins.jlint.JlintMavenPluginH

andler(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.jlint.JlintRulesRepository)' from org.p

icocontainer.DefaultPicoContainer@1e6ee98:125<[Immutable]:org.picocontainer.DefaultPicoContainer@154

0a77:180<[Immutable]:org.picocontainer.DefaultPicoContainer@b368f:44<|

 

Not sure what I am missing out. Do you have any clue.

 

Thanks in advance.

 

From: Anshuma Ashok Goyal
Sent: Thursday, May 17, 2012 12:15 PM
To: '[hidden email]'
Subject: RE: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

We have set of customized jlint rules that we need to provide as input to jlint maven plugin. This maven plugin will call JLINT executable and analyze the project.

 

Even after implementing BatchExtension, getting same error:

 

[INFO] org.sonar.plugins.jlint.JlintMavenPluginHandler has unsatisfied dependency 'class org.sonar.p

lugins.jlint.JlintRulesRepository' for constructor 'public org.sonar.plugins.jlint.JlintMavenPluginH

andler(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.jlint.JlintRulesRepository)' from org.p

icocontainer.DefaultPicoContainer@9ac272:125<[Immutable]:org.picocontainer.DefaultPicoContainer@1e2b

67c:180<[Immutable]:org.picocontainer.DefaultPicoContainer@fd2b1:44<|

[INFO] ------------------------------------------------------------------------

 

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Wednesday, May 16, 2012 1:08 PM
To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

Yes : JlintRuleRepository extends RuleRepository implements BatchExtension
Note that in most cases rule repositories are not required on batch side. Could you describe your need please ?

On 16 May 2012 09:20, Anshuma Ashok Goyal <[hidden email]> wrote:

Unfortunatly, JlintRuleRepository extends RuleRepository (an abstract class in sonar-plugin-api ver. 3.0)

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Wednesday, May 16, 2012 12:27 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

 

On 16 May 2012 08:49, Anshuma Ashok Goyal <[hidden email]> wrote:

Thanks Simon. I have updated my pom.xml and defined sonar-maven-plugin version explicitly. Its working fine now.


More details here : <a href="http://docs.codehaus.org/display/SONAR/How&#43;to&#43;fix&#43;version&#43;of&#43;Maven&#43;plugin" target="_blank"> http://docs.codehaus.org/display/SONAR/How+to+fix+version+of+Maven+plugin

 

I understand that - dependencies of an extension are defined by the parameters of its constructor. JlintRulesRepository class is present in the same package and is included in the list of extensions.

 


The extension point RuleRepository is by default available only on server-side (it implements ServerExtension). If some batch components like JlintMavenPluginHandler depend on it, then JlintRuleRepository should also implement BatchExtension.

Regards

**************** 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***

 

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

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

anshuma
In reply to this post by Simon Brandhof

Hi Guys,

 

Any luck with my issue.

I am trying to upgrade Sonar Jlint Plugin to make it compatible with Sonar 3.0

While doing so I found that there are couple of classes/interfaces used in plugin that are deprecated in sonar-plugin-api 3.0

 

I have tried updating the code accordingly – replaced the deprecated classes with the appropriate current classes.

But I believe I have missed some dependency – getting the following error:

 

[INFO] org.sonar.plugins.jlint.JlintMavenPluginHandler has unsatisfied dependency 'class org.sonar.p

lugins.jlint.JlintRulesRepository' for constructor 'public org.sonar.plugins.jlint.JlintMavenPluginH

andler(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.jlint.JlintRulesRepository)' from org.p

icocontainer.DefaultPicoContainer@1e6ee98:125<[Immutable]:org.picocontainer.DefaultPicoContainer@154

0a77:180<[Immutable]:org.picocontainer.DefaultPicoContainer@b368f:44<|

 

 

JlintRulesRepository class declaration (Sonar 1.10):

 

public class JlintRulesRepository

extends AbstractRulesRepository<Java, JlintRulePriorityMapper>

implements org.sonar.api.rules.ConfigurationImportable, org.sonar.api.rules.ConfigurationExportable

 

Updated JlintRulesRepository class declaration (Sonar 3.0):

 

public class JlintRuleRepository extends RuleRepository implements BatchExtension

 

 

 

Thanks in advance.

 

-Anshuma

 

From: Anshuma Ashok Goyal
Sent: Thursday, May 17, 2012 12:15 PM
To: '[hidden email]'
Subject: RE: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

We have set of customized jlint rules that we need to provide as input to jlint maven plugin. This maven plugin will call JLINT executable and analyze the project.

 

Even after implementing BatchExtension, getting same error:

 

[INFO] org.sonar.plugins.jlint.JlintMavenPluginHandler has unsatisfied dependency 'class org.sonar.p

lugins.jlint.JlintRulesRepository' for constructor 'public org.sonar.plugins.jlint.JlintMavenPluginH

andler(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.jlint.JlintRulesRepository)' from org.p

icocontainer.DefaultPicoContainer@9ac272:125<[Immutable]:org.picocontainer.DefaultPicoContainer@1e2b

67c:180<[Immutable]:org.picocontainer.DefaultPicoContainer@fd2b1:44<|

[INFO] ------------------------------------------------------------------------

 

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Wednesday, May 16, 2012 1:08 PM
To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

Yes : JlintRuleRepository extends RuleRepository implements BatchExtension
Note that in most cases rule repositories are not required on batch side. Could you describe your need please ?

On 16 May 2012 09:20, Anshuma Ashok Goyal <[hidden email]> wrote:

Unfortunatly, JlintRuleRepository extends RuleRepository (an abstract class in sonar-plugin-api ver. 3.0)

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Wednesday, May 16, 2012 12:27 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

 

On 16 May 2012 08:49, Anshuma Ashok Goyal <[hidden email]> wrote:

Thanks Simon. I have updated my pom.xml and defined sonar-maven-plugin version explicitly. Its working fine now.


More details here : <a href="http://docs.codehaus.org/display/SONAR/How&#43;to&#43;fix&#43;version&#43;of&#43;Maven&#43;plugin" target="_blank"> http://docs.codehaus.org/display/SONAR/How+to+fix+version+of+Maven+plugin

 

I understand that - dependencies of an extension are defined by the parameters of its constructor. JlintRulesRepository class is present in the same package and is included in the list of extensions.

 


The extension point RuleRepository is by default available only on server-side (it implements ServerExtension). If some batch components like JlintMavenPluginHandler depend on it, then JlintRuleRepository should also implement BatchExtension.

Regards

**************** 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***

 

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

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

Simon Brandhof
Anshuma, you should send me the sources of your plugin. I can't help you with only some parts of code.
Thanks

On 22 May 2012 06:48, Anshuma Ashok Goyal <[hidden email]> wrote:

Hi Guys,

 

Any luck with my issue.

I am trying to upgrade Sonar Jlint Plugin to make it compatible with Sonar 3.0

While doing so I found that there are couple of classes/interfaces used in plugin that are deprecated in sonar-plugin-api 3.0

 

I have tried updating the code accordingly – replaced the deprecated classes with the appropriate current classes.

But I believe I have missed some dependency – getting the following error:

 

[INFO] org.sonar.plugins.jlint.JlintMavenPluginHandler has unsatisfied dependency 'class org.sonar.p

lugins.jlint.JlintRulesRepository' for constructor 'public org.sonar.plugins.jlint.JlintMavenPluginH

andler(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.jlint.JlintRulesRepository)' from org.p

icocontainer.DefaultPicoContainer@1e6ee98:125<[Immutable]:org.picocontainer.DefaultPicoContainer@154

0a77:180<[Immutable]:org.picocontainer.DefaultPicoContainer@b368f:44<|

 

 

JlintRulesRepository class declaration (Sonar 1.10):

 

public class JlintRulesRepository

extends AbstractRulesRepository<Java, JlintRulePriorityMapper>

implements org.sonar.api.rules.ConfigurationImportable, org.sonar.api.rules.ConfigurationExportable

 

Updated JlintRulesRepository class declaration (Sonar 3.0):

 

public class JlintRuleRepository extends RuleRepository implements BatchExtension

 

 

 

Thanks in advance.

 

-Anshuma

 

From: Anshuma Ashok Goyal
Sent: Thursday, May 17, 2012 12:15 PM
To: '[hidden email]'
Subject: RE: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

We have set of customized jlint rules that we need to provide as input to jlint maven plugin. This maven plugin will call JLINT executable and analyze the project.

 

Even after implementing BatchExtension, getting same error:

 

[INFO] org.sonar.plugins.jlint.JlintMavenPluginHandler has unsatisfied dependency 'class org.sonar.p

lugins.jlint.JlintRulesRepository' for constructor 'public org.sonar.plugins.jlint.JlintMavenPluginH

andler(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.jlint.JlintRulesRepository)' from org.p

icocontainer.DefaultPicoContainer@9ac272:125<[Immutable]:org.picocontainer.DefaultPicoContainer@1e2b

67c:180<[Immutable]:org.picocontainer.DefaultPicoContainer@fd2b1:44<|

[INFO] ------------------------------------------------------------------------

 

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Wednesday, May 16, 2012 1:08 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

Yes : JlintRuleRepository extends RuleRepository implements BatchExtension
Note that in most cases rule repositories are not required on batch side. Could you describe your need please ?

On 16 May 2012 09:20, Anshuma Ashok Goyal <[hidden email]> wrote:

Unfortunatly, JlintRuleRepository extends RuleRepository (an abstract class in sonar-plugin-api ver. 3.0)

 

From: Simon Brandhof [mailto:[hidden email]]
Sent: Wednesday, May 16, 2012 12:27 PM


To: [hidden email]
Subject: Re: [sonar-dev] Re: [sonar-user] Sonar plugin error

 

 

On 16 May 2012 08:49, Anshuma Ashok Goyal <[hidden email]> wrote:

Thanks Simon. I have updated my pom.xml and defined sonar-maven-plugin version explicitly. Its working fine now.

I understand that - dependencies of an extension are defined by the parameters of its constructor. JlintRulesRepository class is present in the same package and is included in the list of extensions.

 


The extension point RuleRepository is by default available only on server-side (it implements ServerExtension). If some batch components like JlintMavenPluginHandler depend on it, then JlintRuleRepository should also implement BatchExtension.

Regards

**************** 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***

 


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

RE: [sonar-dev] Sonar plugin error

anshuma

Hello Guys,

 

Need your help once again. Here is the description of the issue am facing.

 

My custom plugin is using xstream for converting XML file to Java object. Here, xstream fails to load class (CategoryRuleMap) and throws CannotResolveClassException

 

-       com.thoughtworks.xstream.mapper.CannotResolveClassException: org.sonar.plugins.jlint.xml.CategoryRuleMap

 

After debugging I found that it is using CompositeClassLoader class of xstream package which is composed of other class loaders.

 

At run time it contains only one class loader: org.codehaus.classworlds.RealmClassLoader

 

This class loader contains the attached list of classes (please see the attachment).

 

And obviously this list does not contains my plugin classes. I think I am missing to add my jar path to some configuration.

I have added my jar to ..\extensions\plugins and restarted the sonar server.

 

Is there anything that I am missing.

 

Thanks in advance.

 

Regards,

Anshuma

 

**************** 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

classes.txt (13K) Download Attachment
12
Loading...