Can not execute Sonar

Posted by senzacionale on Stack Overflow See other posts from Stack Overflow or by senzacionale
Published on 2010-06-09T10:17:30Z Indexed on 2010/06/09 10:42 UTC
Read the original article Hit count: 1226

Filed under:
|

my pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>RCC</groupId>
  <artifactId>tmp</artifactId>
  <name>tmp</name>
  <version>1.0</version>
  <build>
        <sourceDirectory>C:\Projekti\KIS\Model\src </sourceDirectory>
        <outputDirectory>C:\Projekti\KIS\Model\classes</outputDirectory>
        <plugins>
           <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <configuration>
                  <source>1.5</source>
                  <target>1.5</target>
                  <excludes>
                      <exclude>**/*.*</exclude>
                  </excludes>
              </configuration>
           </plugin>
        </plugins>
  </build>
  <properties>
    <sonar.dynamicAnalysis>false</sonar.dynamicAnalysis>
  </properties>
</project>

running sonnar

C:\Projekti\Metrics>mvn sonar:sonar -e
    + Error stacktraces are turned on.
    [INFO] Scanning for projects...
    [INFO] Searching repository for plugin with prefix: 'sonar'.
    [INFO] ------------------------------------------------------------------------
    [INFO] Building tmp
    [INFO]    task-segment: [sonar:sonar] (aggregator-style)
    [INFO] ------------------------------------------------------------------------
    [INFO] [sonar:sonar {execution: default-cli}]
    [INFO] Sonar host: http://localhost:9000
    [INFO] Sonar version: 2.1.2
    [INFO] [sonar-core:internal {execution: default-internal}]
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Can not execute Sonar

    Embedded error: Can not analyze the project
    org.apache.derby.jdbc.ClientDriver
    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
            at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
            at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
            at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
            at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
            at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:87)
            at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
            at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117)
            at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
            ... 17 more
    Caused by: org.apache.maven.plugin.MojoExecutionException: Can not analyze the project
            at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:152)
            at org.sonar.maven2.BatchMojo.execute(BatchMojo.java:131)
            at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
            at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82)
            ... 21 more
    Caused by: org.picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public void org.sonar.api.database.AbstractDatabaseConnector.start()', instance 'org.sonar.api.database.DriverDatabaseConnector@c87621, java.lang.RuntimeException: wrapper
            at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFailed(NullComponentMonitor.java:77)
            at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(ReflectionLifecycleStrategy.java:132)
            at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:115)
            at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
            at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
            at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
            at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
            at org.picocontainer.behaviors.Stored.start(Stored.java:110)
            at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:996)
            at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:989)
            at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:746)
            at org.sonar.batch.AggregatorBatch.execute(AggregatorBatch.java:84)
            at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:149)
            ... 24 more
    Caused by: java.lang.RuntimeException: wrapper
            at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(ReflectionLifecycleStrategy.java:130)
            ... 35 more
    Caused by: org.sonar.api.database.DatabaseException: Cannot open connection to database: SQL driver not found org.apache.derby.jdbc.ClientDriver
            at org.sonar.api.database.AbstractDatabaseConnector.testConnection(AbstractDatabaseConnector.java:182)
            at org.sonar.api.database.AbstractDatabaseConnector.start(AbstractDatabaseConnector.java:94)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
            ... 34 more
    Caused by: java.sql.SQLException: SQL driver not found org.apache.derby.jdbc.ClientDriver
            at org.sonar.api.database.DriverDatabaseConnector.getConnection(DriverDatabaseConnector.java:70)
            at org.sonar.api.database.AbstractDatabaseConnector.testConnection(AbstractDatabaseConnector.java:178)
            ... 40 more
    Caused by: java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver
            at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
            at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
            at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
            at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:164)
            at org.sonar.api.database.DriverDatabaseConnector.getConnection(DriverDatabaseConnector.java:68)
            ... 41 more
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 3 seconds
    [INFO] Finished at: Wed Jun 09 12:12:55 CEST 2010
    [INFO] Final Memory: 12M/23M
    [INFO] ------------------------------------------------------------------------

any idea why not working Sonar with maven?

© Stack Overflow or respective owner

Related posts about maven-2

Related posts about sonar