Hi Erwan,

I tried ant sonar (after doing a clean-all and load-demo) against my mySQL
where the repository of sonar resides and I got following:

/Users/s0001/Documents/workspace/ofbiz-trunk/build.xml:1060:
org.picocontainer.PicoLifecycleException: PicoLifecycleException: method
'public final org.sonar.persistence.DefaultDatabase
org.sonar.persistence.DefaultDatabase.start()', instance
'org.sonar.batch.bootstrap.BatchDatabase@57f5b4d1,
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.api.platform.ComponentContainer.startComponents(ComponentContainer.java:70)
at org.sonar.batch.bootstrap.Module.start(Module.java:82)
at org.sonar.batch.Batch.execute(Batch.java:100)
at org.sonar.ant.Launcher.executeBatch(Launcher.java:121)
at org.sonar.ant.Launcher.execute(Launcher.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:597)
at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:167)
at org.sonar.ant.SonarTask.execute(SonarTask.java:151)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.RuntimeException: wrapper
at
org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(ReflectionLifecycleStrategy.java:130)
... 36 more
Caused by: java.lang.IllegalStateException: Fail to connect to database
at org.sonar.persistence.DefaultDatabase.start(DefaultDatabase.java:65)
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:597)
at
org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
... 35 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC
driver class 'org.apache.derby.jdbc.ClientDriver'
at
org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
at
org.apache.commons.dbcp.BasicDataSource.getLogWriter(BasicDataSource.java:1098)
at
org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(BasicDataSourceFactory.java:350)
at
org.sonar.persistence.DefaultDatabase.initDatasource(DefaultDatabase.java:71)
at org.sonar.persistence.DefaultDatabase.start(DefaultDatabase.java:61)
... 40 more
Caused by: java.lang.ClassNotFoundException:
org.apache.derby.jdbc.ClientDriver
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 java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
... 45 more

Total time: 15 seconds

It seems that it is still looking to access derby.

What do you make of this?

Regards,

Pierre

Op 10 april 2012 18:30 schreef Erwan de FERRIERES <
erwan.deferrie...@gmail.com> het volgende:

> Pierre,
> so sonar does not need any driver, just take a look in
> sonar-2.14/extensions/jdbc-driver
> You just need to configure the sonar.properties file.
>
> 2012/4/10 Pierre Smits <pierre.sm...@gmail.com>:
> > Hi Jacques,
> >
> > Postgresql is also my preferred choice of db, but OFBiz delivers on the
> > opportunity of using mySQL as a db platform. Using a download and install
> > mechanism as we have for Postgresql and other plugins (Cobertura, Sonar)
> > would help our endusers in their adoption of OFBiz, in stead of letting
> > them look for the appropriate driver, downloading and installing it
> > manually in the right place of OFBiz.
> >
> > I am just concerned about the legal (licence) implications of such a
> > functionality.
> >
> > Regards,
> >
> > Pierre
> >
> > Op 10 april 2012 17:33 schreef Jacques Le Roux <
> jacques.le.r...@les7arts.com
> >> het volgende:
> >
> >> Maybe out of subject, but I'd prefer Postgres and we have an ant task
> >> already for that (thanks to Erwan IIRW)
> >>
> >> Jacques
> >>
> >> From: "Pierre Smits" <pierre.sm...@gmail.com>
> >>
> >>  Hi Erwan,
> >>>
> >>> I think there might be an issue here regarding mysql. As licence is not
> >>> compatible/usable with ASF 2.0 we cannot include the mySQL jar by
> default.
> >>>
> >>> But if we want to do an automated reporting on OFBiz, trunk pulled from
> >>> svn, to sonar on mysql then the driver is needed. And manually pulling
> and
> >>> placing it in the correct folder on an automated process is very
> >>> cumbersome.
> >>>
> >>> I will submit a patch that will enable the user to do a download and
> >>> install with ivy, like the postgresql target. Does that fit our needs
> and
> >>> solve licence issue?
> >>>
> >>> Regards,
> >>>
> >>> Pierre
> >>>
> >>> Op 10 april 2012 16:20 schreef Pierre Smits <pierre.sm...@gmail.com>
> het
> >>> volgende:
> >>>
> >>>  Hi Erwan,
> >>>>
> >>>> I guess that the same would then be applicable for:
> >>>>
> >>>> <property key="sonar.host.url" value="${sonar.host.url}" />
> >>>>
> >>>> Regards,
> >>>>
> >>>> Pierre
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> Op 10 april 2012 16:09 schreef Erwan de FERRIERES <
> >>>> erwan.deferrie...@gmail.com> het volgende:
> >>>>
> >>>> >
> >>>>
> >>>>> > I am trying to set this up and I have following questions:
> >>>>> >
> >>>>> I never used it with another DB than derby...
> >>>>> >   1. Should the mySQL driver be in framework/entity/lib/jdbc
> folder?
> >>>>> can't answer but I'll make some tests
> >>>>>
> >>>>> >   2. My mySQL db for sonar is on a different server (not
> localhost).
> >>>>> Must
> >>>>> >   I adjust build.xml or pass it as a parameter?
> >>>>> I'll change the parameter this way tonight: <property
> >>>>> name="sonar.jdbc.url" value="${sonar.jdbc.url}"/>
> >>>>>
> >>>>> >   3. Am I correct to understand that both ${sonar.jdbc.username}
> >>>>> >   and ${sonar.jdbc.password} are to be passed as parameters when
> >>>>> triggering
> >>>>> >   the target, or are they supposed to be set in build.xml?
> >>>>> parameters
> >>>>> >
> >>>>> parameters when the job is triggered.
> >>>>>
> >>>>> Cheers,
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Erwan de FERRIERES
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>
>
>
>
> --
> Erwan de FERRIERES
>

Reply via email to