Quantcast

PicoLifecycleException

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

PicoLifecycleException

Donald Gray

Hi,

 

I have setup Sonar on a MS 2008 64-bit Server to run for C# projects using the Java Runner

 

I have successfully ran my setup using the Derby database but I am receiving an error when trying to run analysis when using either a MSSQL or a MySQL database.

 

When I try to change to use a different DB (same error with both MSSQL and MySQL) I can get the Server running fine and all tables etc are created.  I can navigate to the dashboard but when I try to run the analysis I receive the following error:

 

Runner configuration file: C:\Sonar\sonar-runner-1.2\conf\sonar-runner.properties

Project configuration file: C:\cc\test_CI_Package\code\BuildAssets\sonar

-project.properties

Runner version: 1.2

Java version: 1.7.0_01, vendor: Oracle Corporation

OS name: "Windows Server 2008 R2", version: "6.1", arch: "amd64"

Server: http://localhost:9000

Work directory: C:\cc\test_CI_Package\code\BuildAssets\.sonar

13:09:32.488 WARN  Derby database should be used for evaluation purpose only

13:09:32.504 INFO  Create JDBC datasource

Total time: 4.704s

Final Memory: 3M/46M

Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: org.

picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public fin

al org.sonar.core.persistence.DefaultDatabase org.sonar.core.persistence.Default

Database.start()', instance 'org.sonar.batch.bootstrap.BatchDatabase@7d3e3b95, j

ava.lang.RuntimeException: wrapper

        at org.sonar.runner.Runner.delegateExecution(Runner.java:189)

        at org.sonar.runner.Runner.execute(Runner.java:78)

        at org.sonar.runner.Main.main(Main.java:61)

Caused by: org.picocontainer.PicoLifecycleException: PicoLifecycleException: met

hod 'public final org.sonar.core.persistence.DefaultDatabase org.sonar.core.pers

istence.DefaultDatabase.start()', instance 'org.sonar.batch.bootstrap.BatchDatabc:\

ase@7d3e3b95, java.lang.RuntimeException: wrapper

        at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFa

iled(NullComponentMonitor.java:77)

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThr

owReflectionLifecycleException(ReflectionLifecycleStrategy.java:132)

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(

ReflectionLifecycleStrategy.java:115)

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(Reflect

ionLifecycleStrategy.java:89)

        at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter

.start(AbstractInjectionFactory.java:84)

        at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.j

ava:169)

        at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Store

d.java:132)

        at org.picocontainer.behaviors.Stored.start(Stored.java:110)

        at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(Defaul

tPicoContainer.java:996)

        at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoConta

iner.java:989)

        at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.jav

a:746)

        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo

ntainer.java:70)

        at org.sonar.batch.bootstrap.Module.start(Module.java:82)

        at org.sonar.batch.Batch.execute(Batch.java:100)

        at org.sonar.runner.Launcher.executeBatch(Launcher.java:65)

        at org.sonar.runner.Launcher.execute(Launcher.java:58)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:601)

        at org.sonar.runner.Runner.delegateExecution(Runner.java:186)

        ... 2 more

Caused by: java.lang.RuntimeException: wrapper

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThr

owReflectionLifecycleException(ReflectionLifecycleStrategy.java:130)

        ... 21 more

Caused by: java.lang.IllegalStateException: Fail to connect to database

        at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java

:64)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:601)

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(

ReflectionLifecycleStrategy.java:110)

        ... 20 more

Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver c

lass 'org.apache.derby.jdbc.ClientDriver'

        at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(Basic

DataSource.java:1429)

        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou

rce.java:1371)

        at org.apache.commons.dbcp.BasicDataSource.getLogWriter(BasicDataSource.

java:1098)

        at org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(Basic

DataSourceFactory.java:350)

        at org.sonar.core.persistence.DefaultDatabase.initDatasource(DefaultData

base.java:114)

        at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java

:60)

        ... 25 more

Caused by: java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver

        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)

        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

        at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(Basic

DataSource.java:1420)

        ... 30 more

 

I am confused by the “Derby database should be used for evaluation purpose only” message, as this looks like it’s trying to use Derby?  Any suggestions as to what I am doing wrong, or what could be wrong?

 

Thanks,

 

Donald Gray

Senior Developer



This email, and any attachments transmitted with it, is confidential and protected by copyright. If you are not the intended recipient you must not use, disseminate, distribute or copy this e-mail or any attachment. If you have received this email in error please notify the sender and delete this email, and any attachments, completely from your system. This notification is given by System C Healthcare Ltd of Globe House, Warwick Technology Park, Warwick, United Kingdom, CV34 6NZ a company registered in England number 1754990.

System C Healthcare Ltd is a subsidiary of McKesson.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PicoLifecycleException

Attila-Mihaly Balazs
Hello,

You need to set the following properties in sonar-project.properties to the correct values (yes, this is a small duplication, but these properties need to be configured for both the server and the runner doing the analysis):

sonar.jdbc.driverClassName
sonar.jdbc.url
sonar.jdbc.username
sonar.jdbc.password

Regards,
Attila Balazs

Hi,

 

I have setup Sonar on a MS 2008 64-bit Server to run for C# projects using the Java Runner

 

I have successfully ran my setup using the Derby database but I am receiving an error when trying to run analysis when using either a MSSQL or a MySQL database.

 

When I try to change to use a different DB (same error with both MSSQL and MySQL) I can get the Server running fine and all tables etc are created.  I can navigate to the dashboard but when I try to run the analysis I receive the following error:

 

Runner configuration file: C:\Sonar\sonar-runner-1.2\conf\sonar-runner.properties

Project configuration file: C:\cc\test_CI_Package\code\BuildAssets\sonar

-project.properties

Runner version: 1.2

Java version: 1.7.0_01, vendor: Oracle Corporation

OS name: "Windows Server 2008 R2", version: "6.1", arch: "amd64"

Server: http://localhost:9000

Work directory: C:\cc\test_CI_Package\code\BuildAssets\.sonar

13:09:32.488 WARN  Derby database should be used for evaluation purpose only

13:09:32.504 INFO  Create JDBC datasource

Total time: 4.704s

Final Memory: 3M/46M

Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: org.

picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public fin

al org.sonar.core.persistence.DefaultDatabase org.sonar.core.persistence.Default

Database.start()', instance 'org.sonar.batch.bootstrap.BatchDatabase@7d3e3b95, j

ava.lang.RuntimeException: wrapper

        at org.sonar.runner.Runner.delegateExecution(Runner.java:189)

        at org.sonar.runner.Runner.execute(Runner.java:78)

        at org.sonar.runner.Main.main(Main.java:61)

Caused by: org.picocontainer.PicoLifecycleException: PicoLifecycleException: met

hod 'public final org.sonar.core.persistence.DefaultDatabase org.sonar.core.pers

istence.DefaultDatabase.start()', instance 'org.sonar.batch.bootstrap.BatchDatabc:\

ase@7d3e3b95, java.lang.RuntimeException: wrapper

        at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFa

iled(NullComponentMonitor.java:77)

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThr

owReflectionLifecycleException(ReflectionLifecycleStrategy.java:132)

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(

ReflectionLifecycleStrategy.java:115)

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(Reflect

ionLifecycleStrategy.java:89)

        at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter

.start(AbstractInjectionFactory.java:84)

        at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.j

ava:169)

        at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Store

d.java:132)

        at org.picocontainer.behaviors.Stored.start(Stored.java:110)

        at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(Defaul

tPicoContainer.java:996)

        at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoConta

iner.java:989)

        at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.jav

a:746)

        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo

ntainer.java:70)

        at org.sonar.batch.bootstrap.Module.start(Module.java:82)

        at org.sonar.batch.Batch.execute(Batch.java:100)

        at org.sonar.runner.Launcher.executeBatch(Launcher.java:65)

        at org.sonar.runner.Launcher.execute(Launcher.java:58)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:601)

        at org.sonar.runner.Runner.delegateExecution(Runner.java:186)

        ... 2 more

Caused by: java.lang.RuntimeException: wrapper

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThr

owReflectionLifecycleException(ReflectionLifecycleStrategy.java:130)

        ... 21 more

Caused by: java.lang.IllegalStateException: Fail to connect to database

        at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java

:64)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:601)

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(

ReflectionLifecycleStrategy.java:110)

        ... 20 more

Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver c

lass 'org.apache.derby.jdbc.ClientDriver'

        at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(Basic

DataSource.java:1429)

        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou

rce.java:1371)

        at org.apache.commons.dbcp.BasicDataSource.getLogWriter(BasicDataSource.

java:1098)

        at org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(Basic

DataSourceFactory.java:350)

        at org.sonar.core.persistence.DefaultDatabase.initDatasource(DefaultData

base.java:114)

        at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java

:60)

        ... 25 more

Caused by: java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver

        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)

        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

        at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(Basic

DataSource.java:1420)

        ... 30 more

 

I am confused by the “Derby database should be used for evaluation purpose only” message, as this looks like it’s trying to use Derby?  Any suggestions as to what I am doing wrong, or what could be wrong?

 

Thanks,

 

Donald Gray

Senior Developer



This email, and any attachments transmitted with it, is confidential and protected by copyright. If you are not the intended recipient you must not use, disseminate, distribute or copy this e-mail or any attachment. If you have received this email in error please notify the sender and delete this email, and any attachments, completely from your system. This notification is given by System C Healthcare Ltd of Globe House, Warwick Technology Park, Warwick, United Kingdom, CV34 6NZ a company registered in England number 1754990.

System C Healthcare Ltd is a subsidiary of McKesson.

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

Re: PicoLifecycleException

Patroklos Papapetrou
In reply to this post by Donald Gray
The log file indicates that Sonar cannot find Derby's driver? Are you sure you have correctly configured Sonar to use MySQL? I think that something is missing.
I haven't faced any problems with MySQL and Oracle Databases. 

By the way Sonar does not officially supports Java 7 
Regards
PP

2012/2/27 Donald Gray <[hidden email]>

Hi,

 

I have setup Sonar on a MS 2008 64-bit Server to run for C# projects using the Java Runner

 

I have successfully ran my setup using the Derby database but I am receiving an error when trying to run analysis when using either a MSSQL or a MySQL database.

 

When I try to change to use a different DB (same error with both MSSQL and MySQL) I can get the Server running fine and all tables etc are created.  I can navigate to the dashboard but when I try to run the analysis I receive the following error:

 

Runner configuration file: C:\Sonar\sonar-runner-1.2\conf\sonar-runner.properties

Project configuration file: C:\cc\test_CI_Package\code\BuildAssets\sonar

-project.properties

Runner version: 1.2

Java version: 1.7.0_01, vendor: Oracle Corporation

OS name: "Windows Server 2008 R2", version: "6.1", arch: "amd64"

Server: http://localhost:9000

Work directory: C:\cc\test_CI_Package\code\BuildAssets\.sonar

13:09:32.488 WARN  Derby database should be used for evaluation purpose only

13:09:32.504 INFO  Create JDBC datasource

Total time: 4.704s

Final Memory: 3M/46M

Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: org.

picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public fin

al org.sonar.core.persistence.DefaultDatabase org.sonar.core.persistence.Default

Database.start()', instance 'org.sonar.batch.bootstrap.BatchDatabase@7d3e3b95, j

ava.lang.RuntimeException: wrapper

        at org.sonar.runner.Runner.delegateExecution(Runner.java:189)

        at org.sonar.runner.Runner.execute(Runner.java:78)

        at org.sonar.runner.Main.main(Main.java:61)

Caused by: org.picocontainer.PicoLifecycleException: PicoLifecycleException: met

hod 'public final org.sonar.core.persistence.DefaultDatabase org.sonar.core.pers

istence.DefaultDatabase.start()', instance 'org.sonar.batch.bootstrap.BatchDatabc:\

ase@7d3e3b95, java.lang.RuntimeException: wrapper

        at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFa

iled(NullComponentMonitor.java:77)

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThr

owReflectionLifecycleException(ReflectionLifecycleStrategy.java:132)

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(

ReflectionLifecycleStrategy.java:115)

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(Reflect

ionLifecycleStrategy.java:89)

        at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter

.start(AbstractInjectionFactory.java:84)

        at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.j

ava:169)

        at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Store

d.java:132)

        at org.picocontainer.behaviors.Stored.start(Stored.java:110)

        at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(Defaul

tPicoContainer.java:996)

        at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoConta

iner.java:989)

        at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.jav

a:746)

        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentCo

ntainer.java:70)

        at org.sonar.batch.bootstrap.Module.start(Module.java:82)

        at org.sonar.batch.Batch.execute(Batch.java:100)

        at org.sonar.runner.Launcher.executeBatch(Launcher.java:65)

        at org.sonar.runner.Launcher.execute(Launcher.java:58)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:601)

        at org.sonar.runner.Runner.delegateExecution(Runner.java:186)

        ... 2 more

Caused by: java.lang.RuntimeException: wrapper

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThr

owReflectionLifecycleException(ReflectionLifecycleStrategy.java:130)

        ... 21 more

Caused by: java.lang.IllegalStateException: Fail to connect to database

        at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java

:64)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:601)

        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(

ReflectionLifecycleStrategy.java:110)

        ... 20 more

Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver c

lass 'org.apache.derby.jdbc.ClientDriver'

        at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(Basic

DataSource.java:1429)

        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou

rce.java:1371)

        at org.apache.commons.dbcp.BasicDataSource.getLogWriter(BasicDataSource.

java:1098)

        at org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(Basic

DataSourceFactory.java:350)

        at org.sonar.core.persistence.DefaultDatabase.initDatasource(DefaultData

base.java:114)

        at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java

:60)

        ... 25 more

Caused by: java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver

        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)

        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

        at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(Basic

DataSource.java:1420)

        ... 30 more

 

I am confused by the “Derby database should be used for evaluation purpose only” message, as this looks like it’s trying to use Derby?  Any suggestions as to what I am doing wrong, or what could be wrong?

 

Thanks,

 

Donald Gray

Senior Developer



This email, and any attachments transmitted with it, is confidential and protected by copyright. If you are not the intended recipient you must not use, disseminate, distribute or copy this e-mail or any attachment. If you have received this email in error please notify the sender and delete this email, and any attachments, completely from your system. This notification is given by System C Healthcare Ltd of Globe House, Warwick Technology Park, Warwick, United Kingdom, CV34 6NZ a company registered in England number 1754990.

System C Healthcare Ltd is a subsidiary of McKesson.

Loading...