maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Omar@Gmail" <omarnet...@googlemail.com>
Subject Re: Sonar with Maven: Fail to connect to database: Cannot loa d JDBC driver class 'oracle.jdbc.OracleDriver'
Date Sun, 08 Dec 2013 15:39:14 GMT
Thanks Robert,

Not sure I agree.

I start Sonar with a fresh empty database and I can see it creates the
needed tables, so no exceptions.

I then invoke      mvn sonar:sonar      but get the driver exception so to
me the problem is Maven side, especially that I configured Maven in the
setting.xml to connect to Sonar upload data like so:
http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+Maven

Agree?

Omar


On 7 December 2013 18:21, Robert Scholte <rfscholte@apache.org> wrote:

> It is not Maven who requires the driver, but Sonar(Qube).
>
> See http://docs.codehaus.org/display/SONAR/Installing#Installing-
> installingDatabaseInstallingtheDatabase for the details.
>
> Robert
>
> Op Sat, 07 Dec 2013 13:33:09 +0100 schreef Omar@Gmail <
> omarnetbox@googlemail.com>:
>
>  Objective: Get Maven to publish sonar results to running Sonar server
>>
>> Steps:
>>
>>    - Installed and ran Sonar, accessible from browser
>>       - The back-end database is Oracle
>>
>>    -
>>
>>    Installed and configured Maven in settings.xml file to connect to the
>>    Oracle db
>>    -
>>
>>    Invoked: mvn clean install -DSkipTests=true
>>    - Invoke: mvn sonar:sonar
>>
>>
>> But getting following mvn sonar:sonar Fail to connect to database: Cannot
>> load JDBC driver class 'oracle.jdbc.OracleDriver'
>>
>> So I need somehow to put the ojdbc6.jar on Maven classpath. Tried placing
>> the ojdbc6.jar in /lib and lib/ext but did not help.
>>
>> Am I missing something here? please help.
>>
>> To fix this I modified *maven113home/bin/mvn*.bat at line 161 and added
>>
>>
>> %MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath path/to/ojdbc6.jar;...
>>
>> *Which is nasty!*
>>
>>
>> Please suggest a better approach.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message