|
I'm giving sonar-runner a try to perform some Sonar analysis for non-maven projects.
I followed all steps provided here http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+Sonar+Runner and here http://docs.codehaus.org/display/SONAR/Analyzing+with+Sonar+Runner
I'm running on a Win7 64-bit machine with 64-bit java Sonar runner is installed on D:\sonar-runner-1.3 ( No whitespaces )
Java is installed on D:\jdk1.6.0_31 ( again no whitespaces ) Both $JAVA_HOME\bin and $SONAR_RUNNER_HOME\bin are added in windows path.
When I run sonar-runner.bat I always get the following error (even if I try to run it from its bin folder ) Exception in thread "main" java.lang.NoClassDefFoundError: org/sonar/runner/Main
Caused by: java.lang.ClassNotFoundException: org.sonar.runner.Main at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: org.sonar.runner.Main. Program will exit.
What is really strange is that when I try to run sonar-runner.bet from root folder ( C: or D: ) I get the following Java output
Usage: java [-options] class [args...] (to execute a class)
or java [-options] -jar jarfile [args...] (to execute a jar file)
where options include:....
................... I am really stuck on this and after a lot of hours test-and-try I finally decided to ask for some help before I switch to Linux :(
Regards Patroklos
|
|
Hi,
The root cause of this problem is a script "sonar-runner.bat" , which should just launch java with proper classpath and some properties, and which doesn't work for some reasons on your machine.
So which version of Windows do you use ? Is it possible to ask you to dig into this script to understand why it doesn't work on your machine ? On Wed, Jul 4, 2012 at 1:21 PM, Papapetrou P.Patroklos <[hidden email]> wrote: I'm giving sonar-runner a try to perform some Sonar analysis for non-maven projects. Best regards, Evgeny Mandrikov aka Godin <http://godin.net.ru> http://twitter.com/_godin_ |
|
Hi Evgeny
I am using Windows 7 Ultimate 64-bit with Service Pack 1 installed. Yes I'am familiar enought with command scripting so I think I can help .
Regards Patroklos
2012/7/4 Evgeny Mandrikov <[hidden email]> Hi, |
|
Solution found and It was (as usual) end-user's (that's me) mistake.
After "debugging" the script I found out that I wrongly set SONAR_RUNNER_HOME as d:\sonar-runner-1.3\bin whereas the correct is obviously
d:\sonar-runner-1.3 Thanks again Evgeny for pointing me the script file :) Regards Patroklos
2012/7/4 Papapetrou P.Patroklos <[hidden email]> Hi Evgeny |
|
Hm, this makes me think that we should create ticket for Sonar Runner to check correctness of SONAR_RUNNER_HOME at least on existance.
On Wed, Jul 4, 2012 at 2:36 PM, Papapetrou P.Patroklos <[hidden email]> wrote: Solution found and It was (as usual) end-user's (that's me) mistake. Best regards, Evgeny Mandrikov aka Godin <http://godin.net.ru> http://twitter.com/_godin_ |
|
+1 It would help saving some hours of "research" :)
2012/7/4 Evgeny Mandrikov <[hidden email]> Hm, this makes me think that we should create ticket for Sonar Runner to check correctness of SONAR_RUNNER_HOME at least on existance. |
|
So why such ticket still not created by you ? ;)
On Wed, Jul 4, 2012 at 2:49 PM, Papapetrou P.Patroklos <[hidden email]> wrote: +1 It would help saving some hours of "research" :) Best regards, Evgeny Mandrikov aka Godin <http://godin.net.ru> http://twitter.com/_godin_ |
|
... because ... lost in translation :)
http://jira.codehaus.org/browse/SONARPLUGINS-2044
2012/7/4 Evgeny Mandrikov <[hidden email]> So why such ticket still not created by you ? ;) |
| Powered by Nabble | Edit this page |
