Mammoth upgrade help

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Mammoth upgrade help

Martin Gladdish
Hi all,

Apologies for the posting, but searching this mailing list and the greater-google haven't unearthed an answer so far...

I've just performed a mammoth upgrade to get my sonar installation from 1.3 to 1.9. I installed each of 1.4.3, 1.5.1, 1.6, 1.7, 1.8 and 1.9 in turn and got themselves to upgrade the DB (sitting in Oracle) also in turn.

All went well and I now have the 1.9 webapp running very nicely.

The problem I have is that I can no longer submit new metrics to sonar. I run the following command: mvn clean install sonar:sonar and get the following error:

[xxx]$ mvn sonar:sonar -U
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApps - Journal Sites
[INFO]    task-segment: [sonar:sonar]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing sonar:sonar
[INFO] [sonar:prepare]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] Building xxx
[ maven embedder INFO]    task-segment: [org.codehaus.mojo:javancss-maven-plugin:2.0-beta-2:report]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] [javancss:report]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during sonar checkstyle config file download

Embedded error: Error occured during file http://mySonarServer:9000/rules_config/checkstyle.xml download
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Thu Jun 04 23:02:12 BST 2009
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------

It certainly is true that when I point my browser to my http://mySonarServer:9000/rules_config/checkstyle.xml I get a 404 error.

Could it be that I'm still stuck with an older version of the maven plugin? If so, where can I point my archiva repo at to get the more recent version? The docs say I should point it to http://mySonarServer:9000/deploy/maven but, again, when I point my browser to it all I get is a 404.

Annoyingly, there's nothing in the logs, either sonar.log or wrapper.log

Many thanks in anticipation,

Martin Gladdish.
Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Freddy Mallet
Hi Martin,

As Sonar 1.9 no more uses JavaNCSS and the Maven Embedder, your sonar web server instance is not the good one or is corrupted.

Could you do the following things :

* Stop any sonar web servers
* Unzip the sonar-1.9.zip archive in a fresh new directory
* Configure the conf/sonar.properties file to set the database connexion
* Launch the sonar web server (in the sonar homepage footer, check the sonar version)
* Check that your maven settings.xml is pointing to your sonar web server

Once this is done, launch a new analysis with the "mvn sonar:sonar" command and come back to the mailing list with the result.

Hope it helps
Freddy



On Fri, Jun 5, 2009 at 12:26 AM, Martin Gladdish <[hidden email]> wrote:
Hi all,

Apologies for the posting, but searching this mailing list and the greater-google haven't unearthed an answer so far...

I've just performed a mammoth upgrade to get my sonar installation from 1.3 to 1.9. I installed each of 1.4.3, 1.5.1, 1.6, 1.7, 1.8 and 1.9 in turn and got themselves to upgrade the DB (sitting in Oracle) also in turn.

All went well and I now have the 1.9 webapp running very nicely.

The problem I have is that I can no longer submit new metrics to sonar. I run the following command: mvn clean install sonar:sonar and get the following error:

[xxx]$ mvn sonar:sonar -U
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApps - Journal Sites
[INFO]    task-segment: [sonar:sonar]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing sonar:sonar
[INFO] [sonar:prepare]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] Building xxx
[ maven embedder INFO]    task-segment: [org.codehaus.mojo:javancss-maven-plugin:2.0-beta-2:report]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] [javancss:report]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during sonar checkstyle config file download

Embedded error: Error occured during file http://mySonarServer:9000/rules_config/checkstyle.xml download
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Thu Jun 04 23:02:12 BST 2009
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------

It certainly is true that when I point my browser to my http://mySonarServer:9000/rules_config/checkstyle.xml I get a 404 error.

Could it be that I'm still stuck with an older version of the maven plugin? If so, where can I point my archiva repo at to get the more recent version? The docs say I should point it to http://mySonarServer:9000/deploy/maven but, again, when I point my browser to it all I get is a 404.

Annoyingly, there's nothing in the logs, either sonar.log or wrapper.log

Many thanks in anticipation,

Martin Gladdish.

Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Martin Gladdish
Hmm, but isn't it the maven plugin that's using the Maven Embedder, rather than the server-side Sonar application?

I only downloaded the zip from sonar's dist pages last night, expanded it there and then, and updated sonar.properties, wrapper.conf and my oracle driver jar accordingly.

For instance, are you saying that http://mySonarServer:9000/deploy/maven really should work, and that the fact I get a 404 is proof that my server-side installation is broken?

2009/6/5 Freddy Mallet <[hidden email]>
Hi Martin,

As Sonar 1.9 no more uses JavaNCSS and the Maven Embedder, your sonar web server instance is not the good one or is corrupted.

Could you do the following things :

* Stop any sonar web servers
* Unzip the sonar-1.9.zip archive in a fresh new directory
* Configure the conf/sonar.properties file to set the database connexion
* Launch the sonar web server (in the sonar homepage footer, check the sonar version)
* Check that your maven settings.xml is pointing to your sonar web server

Once this is done, launch a new analysis with the "mvn sonar:sonar" command and come back to the mailing list with the result.

Hope it helps
Freddy



On Fri, Jun 5, 2009 at 12:26 AM, Martin Gladdish <[hidden email]> wrote:
Hi all,

Apologies for the posting, but searching this mailing list and the greater-google haven't unearthed an answer so far...

I've just performed a mammoth upgrade to get my sonar installation from 1.3 to 1.9. I installed each of 1.4.3, 1.5.1, 1.6, 1.7, 1.8 and 1.9 in turn and got themselves to upgrade the DB (sitting in Oracle) also in turn.

All went well and I now have the 1.9 webapp running very nicely.

The problem I have is that I can no longer submit new metrics to sonar. I run the following command: mvn clean install sonar:sonar and get the following error:

[xxx]$ mvn sonar:sonar -U
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApps - Journal Sites
[INFO]    task-segment: [sonar:sonar]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing sonar:sonar
[INFO] [sonar:prepare]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] Building xxx
[ maven embedder INFO]    task-segment: [org.codehaus.mojo:javancss-maven-plugin:2.0-beta-2:report]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] [javancss:report]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during sonar checkstyle config file download

Embedded error: Error occured during file http://mySonarServer:9000/rules_config/checkstyle.xml download
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Thu Jun 04 23:02:12 BST 2009
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------

It certainly is true that when I point my browser to my http://mySonarServer:9000/rules_config/checkstyle.xml I get a 404 error.

Could it be that I'm still stuck with an older version of the maven plugin? If so, where can I point my archiva repo at to get the more recent version? The docs say I should point it to http://mySonarServer:9000/deploy/maven but, again, when I point my browser to it all I get is a 404.

Annoyingly, there's nothing in the logs, either sonar.log or wrapper.log

Many thanks in anticipation,

Martin Gladdish.


Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Martin Gladdish
Well, the plot thickens :)

On the theory that it was the maven plugin at fault, I followed some of the other suggestions around this group for blitzing my local mojo maven repo. That seems to have worked in as much as I think I've got further along the process.

So, running mvn sonar:sonar resulted in a whole bunch of messages like this:
which worked.

I now get a different error though:

$ mvn sonar:sonar
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] ------------------------------------------------------------------------
[INFO] Building xxx
[INFO]    task-segment: [sonar:sonar] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [sonar:sonar]
[INFO] Sonar host: http://mySonarServer:9000
[INFO] Sonar version: 1.9
[INFO] [sonar-core:internal]
[INFO] Sonar JDBC URL: jdbc:oracle:oci:@xxx
[INFO] Sonar JDBC login: xxx
[INFO] Sonar JDBC driver: oracle.jdbc.driver.OracleDriver
[INFO] Sonar branch:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Database schema must be updated [version/required=-1/67]. Please browse to your sonar homepage.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Fri Jun 05 12:36:42 BST 2009
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------

The problem being that the web app is up and running just fine (and the upgrade process via sonar's front page worked fine with no errors for each of the versions that I installed in turn), and it claims to be running version 1.9.

select * from schema_info = VERSION | 38

Again, there are no errors in either of sonar's logs.


2009/6/5 Martin Gladdish <[hidden email]>
Hmm, but isn't it the maven plugin that's using the Maven Embedder, rather than the server-side Sonar application?

I only downloaded the zip from sonar's dist pages last night, expanded it there and then, and updated sonar.properties, wrapper.conf and my oracle driver jar accordingly.

For instance, are you saying that http://mySonarServer:9000/deploy/maven really should work, and that the fact I get a 404 is proof that my server-side installation is broken?

2009/6/5 Freddy Mallet <[hidden email]>

Hi Martin,

As Sonar 1.9 no more uses JavaNCSS and the Maven Embedder, your sonar web server instance is not the good one or is corrupted.

Could you do the following things :

* Stop any sonar web servers
* Unzip the sonar-1.9.zip archive in a fresh new directory
* Configure the conf/sonar.properties file to set the database connexion
* Launch the sonar web server (in the sonar homepage footer, check the sonar version)
* Check that your maven settings.xml is pointing to your sonar web server

Once this is done, launch a new analysis with the "mvn sonar:sonar" command and come back to the mailing list with the result.

Hope it helps
Freddy



On Fri, Jun 5, 2009 at 12:26 AM, Martin Gladdish <[hidden email]> wrote:
Hi all,

Apologies for the posting, but searching this mailing list and the greater-google haven't unearthed an answer so far...

I've just performed a mammoth upgrade to get my sonar installation from 1.3 to 1.9. I installed each of 1.4.3, 1.5.1, 1.6, 1.7, 1.8 and 1.9 in turn and got themselves to upgrade the DB (sitting in Oracle) also in turn.

All went well and I now have the 1.9 webapp running very nicely.

The problem I have is that I can no longer submit new metrics to sonar. I run the following command: mvn clean install sonar:sonar and get the following error:

[xxx]$ mvn sonar:sonar -U
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApps - Journal Sites
[INFO]    task-segment: [sonar:sonar]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing sonar:sonar
[INFO] [sonar:prepare]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] Building xxx
[ maven embedder INFO]    task-segment: [org.codehaus.mojo:javancss-maven-plugin:2.0-beta-2:report]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] [javancss:report]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during sonar checkstyle config file download

Embedded error: Error occured during file http://mySonarServer:9000/rules_config/checkstyle.xml download
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Thu Jun 04 23:02:12 BST 2009
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------

It certainly is true that when I point my browser to my http://mySonarServer:9000/rules_config/checkstyle.xml I get a 404 error.

Could it be that I'm still stuck with an older version of the maven plugin? If so, where can I point my archiva repo at to get the more recent version? The docs say I should point it to http://mySonarServer:9000/deploy/maven but, again, when I point my browser to it all I get is a 404.

Annoyingly, there's nothing in the logs, either sonar.log or wrapper.log

Many thanks in anticipation,

Martin Gladdish.



Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Cedric Munger
Hi,
I've already seen the problem where the version is not correctly detected when connecting to an oracle database with multiple sonar schemas.
Is it your case ?

On Fri, Jun 5, 2009 at 1:50 PM, Martin Gladdish <[hidden email]> wrote:
Well, the plot thickens :)

On the theory that it was the maven plugin at fault, I followed some of the other suggestions around this group for blitzing my local mojo maven repo. That seems to have worked in as much as I think I've got further along the process.

So, running mvn sonar:sonar resulted in a whole bunch of messages like this:
which worked.

I now get a different error though:

$ mvn sonar:sonar
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] ------------------------------------------------------------------------
[INFO] Building xxx
[INFO]    task-segment: [sonar:sonar] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [sonar:sonar]
[INFO] Sonar host: http://mySonarServer:9000
[INFO] Sonar version: 1.9
[INFO] [sonar-core:internal]
[INFO] Sonar JDBC URL: jdbc:oracle:oci:@xxx
[INFO] Sonar JDBC login: xxx
[INFO] Sonar JDBC driver: oracle.jdbc.driver.OracleDriver
[INFO] Sonar branch:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Database schema must be updated [version/required=-1/67]. Please browse to your sonar homepage.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Fri Jun 05 12:36:42 BST 2009
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------

The problem being that the web app is up and running just fine (and the upgrade process via sonar's front page worked fine with no errors for each of the versions that I installed in turn), and it claims to be running version 1.9.

select * from schema_info = VERSION | 38

Again, there are no errors in either of sonar's logs.


2009/6/5 Martin Gladdish <[hidden email]>
Hmm, but isn't it the maven plugin that's using the Maven Embedder, rather than the server-side Sonar application?

I only downloaded the zip from sonar's dist pages last night, expanded it there and then, and updated sonar.properties, wrapper.conf and my oracle driver jar accordingly.

For instance, are you saying that http://mySonarServer:9000/deploy/maven really should work, and that the fact I get a 404 is proof that my server-side installation is broken?

2009/6/5 Freddy Mallet <[hidden email]>

Hi Martin,

As Sonar 1.9 no more uses JavaNCSS and the Maven Embedder, your sonar web server instance is not the good one or is corrupted.

Could you do the following things :

* Stop any sonar web servers
* Unzip the sonar-1.9.zip archive in a fresh new directory
* Configure the conf/sonar.properties file to set the database connexion
* Launch the sonar web server (in the sonar homepage footer, check the sonar version)
* Check that your maven settings.xml is pointing to your sonar web server

Once this is done, launch a new analysis with the "mvn sonar:sonar" command and come back to the mailing list with the result.

Hope it helps
Freddy



On Fri, Jun 5, 2009 at 12:26 AM, Martin Gladdish <[hidden email]> wrote:
Hi all,

Apologies for the posting, but searching this mailing list and the greater-google haven't unearthed an answer so far...

I've just performed a mammoth upgrade to get my sonar installation from 1.3 to 1.9. I installed each of 1.4.3, 1.5.1, 1.6, 1.7, 1.8 and 1.9 in turn and got themselves to upgrade the DB (sitting in Oracle) also in turn.

All went well and I now have the 1.9 webapp running very nicely.

The problem I have is that I can no longer submit new metrics to sonar. I run the following command: mvn clean install sonar:sonar and get the following error:

[xxx]$ mvn sonar:sonar -U
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApps - Journal Sites
[INFO]    task-segment: [sonar:sonar]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing sonar:sonar
[INFO] [sonar:prepare]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] Building xxx
[ maven embedder INFO]    task-segment: [org.codehaus.mojo:javancss-maven-plugin:2.0-beta-2:report]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] [javancss:report]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during sonar checkstyle config file download

Embedded error: Error occured during file http://mySonarServer:9000/rules_config/checkstyle.xml download
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Thu Jun 04 23:02:12 BST 2009
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------

It certainly is true that when I point my browser to my http://mySonarServer:9000/rules_config/checkstyle.xml I get a 404 error.

Could it be that I'm still stuck with an older version of the maven plugin? If so, where can I point my archiva repo at to get the more recent version? The docs say I should point it to http://mySonarServer:9000/deploy/maven but, again, when I point my browser to it all I get is a 404.

Annoyingly, there's nothing in the logs, either sonar.log or wrapper.log

Many thanks in anticipation,

Martin Gladdish.




Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Martin Gladdish
It's certainly Oracle, but I'm pretty sure there's only one Sonar schema. There are plenty of other non-sonar schemas in this DB instance though.

2009/6/5 Cedric Munger <[hidden email]>
Hi,
I've already seen the problem where the version is not correctly detected when connecting to an oracle database with multiple sonar schemas.
Is it your case ?


On Fri, Jun 5, 2009 at 1:50 PM, Martin Gladdish <[hidden email]> wrote:
Well, the plot thickens :)

On the theory that it was the maven plugin at fault, I followed some of the other suggestions around this group for blitzing my local mojo maven repo. That seems to have worked in as much as I think I've got further along the process.

So, running mvn sonar:sonar resulted in a whole bunch of messages like this:
which worked.

I now get a different error though:

$ mvn sonar:sonar
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] ------------------------------------------------------------------------
[INFO] Building xxx
[INFO]    task-segment: [sonar:sonar] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [sonar:sonar]
[INFO] Sonar host: http://mySonarServer:9000
[INFO] Sonar version: 1.9
[INFO] [sonar-core:internal]
[INFO] Sonar JDBC URL: jdbc:oracle:oci:@xxx
[INFO] Sonar JDBC login: xxx
[INFO] Sonar JDBC driver: oracle.jdbc.driver.OracleDriver
[INFO] Sonar branch:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Database schema must be updated [version/required=-1/67]. Please browse to your sonar homepage.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Fri Jun 05 12:36:42 BST 2009
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------

The problem being that the web app is up and running just fine (and the upgrade process via sonar's front page worked fine with no errors for each of the versions that I installed in turn), and it claims to be running version 1.9.

select * from schema_info = VERSION | 38

Again, there are no errors in either of sonar's logs.


2009/6/5 Martin Gladdish <[hidden email]>
Hmm, but isn't it the maven plugin that's using the Maven Embedder, rather than the server-side Sonar application?

I only downloaded the zip from sonar's dist pages last night, expanded it there and then, and updated sonar.properties, wrapper.conf and my oracle driver jar accordingly.

For instance, are you saying that http://mySonarServer:9000/deploy/maven really should work, and that the fact I get a 404 is proof that my server-side installation is broken?

2009/6/5 Freddy Mallet <[hidden email]>

Hi Martin,

As Sonar 1.9 no more uses JavaNCSS and the Maven Embedder, your sonar web server instance is not the good one or is corrupted.

Could you do the following things :

* Stop any sonar web servers
* Unzip the sonar-1.9.zip archive in a fresh new directory
* Configure the conf/sonar.properties file to set the database connexion
* Launch the sonar web server (in the sonar homepage footer, check the sonar version)
* Check that your maven settings.xml is pointing to your sonar web server

Once this is done, launch a new analysis with the "mvn sonar:sonar" command and come back to the mailing list with the result.

Hope it helps
Freddy



On Fri, Jun 5, 2009 at 12:26 AM, Martin Gladdish <[hidden email]> wrote:
Hi all,

Apologies for the posting, but searching this mailing list and the greater-google haven't unearthed an answer so far...

I've just performed a mammoth upgrade to get my sonar installation from 1.3 to 1.9. I installed each of 1.4.3, 1.5.1, 1.6, 1.7, 1.8 and 1.9 in turn and got themselves to upgrade the DB (sitting in Oracle) also in turn.

All went well and I now have the 1.9 webapp running very nicely.

The problem I have is that I can no longer submit new metrics to sonar. I run the following command: mvn clean install sonar:sonar and get the following error:

[xxx]$ mvn sonar:sonar -U
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApps - Journal Sites
[INFO]    task-segment: [sonar:sonar]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing sonar:sonar
[INFO] [sonar:prepare]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] Building xxx
[ maven embedder INFO]    task-segment: [org.codehaus.mojo:javancss-maven-plugin:2.0-beta-2:report]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] [javancss:report]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during sonar checkstyle config file download

Embedded error: Error occured during file http://mySonarServer:9000/rules_config/checkstyle.xml download
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Thu Jun 04 23:02:12 BST 2009
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------

It certainly is true that when I point my browser to my http://mySonarServer:9000/rules_config/checkstyle.xml I get a 404 error.

Could it be that I'm still stuck with an older version of the maven plugin? If so, where can I point my archiva repo at to get the more recent version? The docs say I should point it to http://mySonarServer:9000/deploy/maven but, again, when I point my browser to it all I get is a 404.

Annoyingly, there's nothing in the logs, either sonar.log or wrapper.log

Many thanks in anticipation,

Martin Gladdish.





Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Freddy Mallet
Hi Martin,

Could you execute the following sql request on the sonar schema and say what you get :

SELECT * FROM schema_migrations


It's exactly what the Sonar Maven plugin does to know which is the current version of the sonar db model (1.9 = version 67)

Hope it helps
Freddy

On Fri, Jun 5, 2009 at 2:12 PM, Martin Gladdish <[hidden email]> wrote:
It's certainly Oracle, but I'm pretty sure there's only one Sonar schema. There are plenty of other non-sonar schemas in this DB instance though.

2009/6/5 Cedric Munger <[hidden email]>

Hi,
I've already seen the problem where the version is not correctly detected when connecting to an oracle database with multiple sonar schemas.
Is it your case ?


On Fri, Jun 5, 2009 at 1:50 PM, Martin Gladdish <[hidden email]> wrote:
Well, the plot thickens :)

On the theory that it was the maven plugin at fault, I followed some of the other suggestions around this group for blitzing my local mojo maven repo. That seems to have worked in as much as I think I've got further along the process.

So, running mvn sonar:sonar resulted in a whole bunch of messages like this:
which worked.

I now get a different error though:

$ mvn sonar:sonar
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] ------------------------------------------------------------------------
[INFO] Building xxx
[INFO]    task-segment: [sonar:sonar] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [sonar:sonar]
[INFO] Sonar host: http://mySonarServer:9000
[INFO] Sonar version: 1.9
[INFO] [sonar-core:internal]
[INFO] Sonar JDBC URL: jdbc:oracle:oci:@xxx
[INFO] Sonar JDBC login: xxx
[INFO] Sonar JDBC driver: oracle.jdbc.driver.OracleDriver
[INFO] Sonar branch:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Database schema must be updated [version/required=-1/67]. Please browse to your sonar homepage.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Fri Jun 05 12:36:42 BST 2009
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------

The problem being that the web app is up and running just fine (and the upgrade process via sonar's front page worked fine with no errors for each of the versions that I installed in turn), and it claims to be running version 1.9.

select * from schema_info = VERSION | 38

Again, there are no errors in either of sonar's logs.


2009/6/5 Martin Gladdish <[hidden email]>
Hmm, but isn't it the maven plugin that's using the Maven Embedder, rather than the server-side Sonar application?

I only downloaded the zip from sonar's dist pages last night, expanded it there and then, and updated sonar.properties, wrapper.conf and my oracle driver jar accordingly.

For instance, are you saying that http://mySonarServer:9000/deploy/maven really should work, and that the fact I get a 404 is proof that my server-side installation is broken?

2009/6/5 Freddy Mallet <[hidden email]>

Hi Martin,

As Sonar 1.9 no more uses JavaNCSS and the Maven Embedder, your sonar web server instance is not the good one or is corrupted.

Could you do the following things :

* Stop any sonar web servers
* Unzip the sonar-1.9.zip archive in a fresh new directory
* Configure the conf/sonar.properties file to set the database connexion
* Launch the sonar web server (in the sonar homepage footer, check the sonar version)
* Check that your maven settings.xml is pointing to your sonar web server

Once this is done, launch a new analysis with the "mvn sonar:sonar" command and come back to the mailing list with the result.

Hope it helps
Freddy



On Fri, Jun 5, 2009 at 12:26 AM, Martin Gladdish <[hidden email]> wrote:
Hi all,

Apologies for the posting, but searching this mailing list and the greater-google haven't unearthed an answer so far...

I've just performed a mammoth upgrade to get my sonar installation from 1.3 to 1.9. I installed each of 1.4.3, 1.5.1, 1.6, 1.7, 1.8 and 1.9 in turn and got themselves to upgrade the DB (sitting in Oracle) also in turn.

All went well and I now have the 1.9 webapp running very nicely.

The problem I have is that I can no longer submit new metrics to sonar. I run the following command: mvn clean install sonar:sonar and get the following error:

[xxx]$ mvn sonar:sonar -U
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApps - Journal Sites
[INFO]    task-segment: [sonar:sonar]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing sonar:sonar
[INFO] [sonar:prepare]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] Building xxx
[ maven embedder INFO]    task-segment: [org.codehaus.mojo:javancss-maven-plugin:2.0-beta-2:report]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] [javancss:report]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during sonar checkstyle config file download

Embedded error: Error occured during file http://mySonarServer:9000/rules_config/checkstyle.xml download
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Thu Jun 04 23:02:12 BST 2009
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------

It certainly is true that when I point my browser to my http://mySonarServer:9000/rules_config/checkstyle.xml I get a 404 error.

Could it be that I'm still stuck with an older version of the maven plugin? If so, where can I point my archiva repo at to get the more recent version? The docs say I should point it to http://mySonarServer:9000/deploy/maven but, again, when I point my browser to it all I get is a 404.

Annoyingly, there's nothing in the logs, either sonar.log or wrapper.log

Many thanks in anticipation,

Martin Gladdish.






Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Martin Gladdish
There's no such table/view. The only schema_* table is schema_info.

2009/6/5 Freddy Mallet <[hidden email]>
Hi Martin,

Could you execute the following sql request on the sonar schema and say what you get :

SELECT * FROM schema_migrations


It's exactly what the Sonar Maven plugin does to know which is the current version of the sonar db model (1.9 = version 67)

Hope it helps
Freddy

On Fri, Jun 5, 2009 at 2:12 PM, Martin Gladdish <[hidden email]> wrote:
It's certainly Oracle, but I'm pretty sure there's only one Sonar schema. There are plenty of other non-sonar schemas in this DB instance though.

2009/6/5 Cedric Munger <[hidden email]>

Hi,
I've already seen the problem where the version is not correctly detected when connecting to an oracle database with multiple sonar schemas.
Is it your case ?


On Fri, Jun 5, 2009 at 1:50 PM, Martin Gladdish <[hidden email]> wrote:
Well, the plot thickens :)

On the theory that it was the maven plugin at fault, I followed some of the other suggestions around this group for blitzing my local mojo maven repo. That seems to have worked in as much as I think I've got further along the process.

So, running mvn sonar:sonar resulted in a whole bunch of messages like this:
which worked.

I now get a different error though:

$ mvn sonar:sonar
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] ------------------------------------------------------------------------
[INFO] Building xxx
[INFO]    task-segment: [sonar:sonar] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [sonar:sonar]
[INFO] Sonar host: http://mySonarServer:9000
[INFO] Sonar version: 1.9
[INFO] [sonar-core:internal]
[INFO] Sonar JDBC URL: jdbc:oracle:oci:@xxx
[INFO] Sonar JDBC login: xxx
[INFO] Sonar JDBC driver: oracle.jdbc.driver.OracleDriver
[INFO] Sonar branch:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Database schema must be updated [version/required=-1/67]. Please browse to your sonar homepage.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Fri Jun 05 12:36:42 BST 2009
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------

The problem being that the web app is up and running just fine (and the upgrade process via sonar's front page worked fine with no errors for each of the versions that I installed in turn), and it claims to be running version 1.9.

select * from schema_info = VERSION | 38

Again, there are no errors in either of sonar's logs.


2009/6/5 Martin Gladdish <[hidden email]>
Hmm, but isn't it the maven plugin that's using the Maven Embedder, rather than the server-side Sonar application?

I only downloaded the zip from sonar's dist pages last night, expanded it there and then, and updated sonar.properties, wrapper.conf and my oracle driver jar accordingly.

For instance, are you saying that http://mySonarServer:9000/deploy/maven really should work, and that the fact I get a 404 is proof that my server-side installation is broken?

2009/6/5 Freddy Mallet <[hidden email]>

Hi Martin,

As Sonar 1.9 no more uses JavaNCSS and the Maven Embedder, your sonar web server instance is not the good one or is corrupted.

Could you do the following things :

* Stop any sonar web servers
* Unzip the sonar-1.9.zip archive in a fresh new directory
* Configure the conf/sonar.properties file to set the database connexion
* Launch the sonar web server (in the sonar homepage footer, check the sonar version)
* Check that your maven settings.xml is pointing to your sonar web server

Once this is done, launch a new analysis with the "mvn sonar:sonar" command and come back to the mailing list with the result.

Hope it helps
Freddy



On Fri, Jun 5, 2009 at 12:26 AM, Martin Gladdish <[hidden email]> wrote:
Hi all,

Apologies for the posting, but searching this mailing list and the greater-google haven't unearthed an answer so far...

I've just performed a mammoth upgrade to get my sonar installation from 1.3 to 1.9. I installed each of 1.4.3, 1.5.1, 1.6, 1.7, 1.8 and 1.9 in turn and got themselves to upgrade the DB (sitting in Oracle) also in turn.

All went well and I now have the 1.9 webapp running very nicely.

The problem I have is that I can no longer submit new metrics to sonar. I run the following command: mvn clean install sonar:sonar and get the following error:

[xxx]$ mvn sonar:sonar -U
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApps - Journal Sites
[INFO]    task-segment: [sonar:sonar]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing sonar:sonar
[INFO] [sonar:prepare]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] Building xxx
[ maven embedder INFO]    task-segment: [org.codehaus.mojo:javancss-maven-plugin:2.0-beta-2:report]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] [javancss:report]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during sonar checkstyle config file download

Embedded error: Error occured during file http://mySonarServer:9000/rules_config/checkstyle.xml download
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Thu Jun 04 23:02:12 BST 2009
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------

It certainly is true that when I point my browser to my http://mySonarServer:9000/rules_config/checkstyle.xml I get a 404 error.

Could it be that I'm still stuck with an older version of the maven plugin? If so, where can I point my archiva repo at to get the more recent version? The docs say I should point it to http://mySonarServer:9000/deploy/maven but, again, when I point my browser to it all I get is a 404.

Annoyingly, there's nothing in the logs, either sonar.log or wrapper.log

Many thanks in anticipation,

Martin Gladdish.







Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Freddy Mallet
Martin, give a new look to your sonar.properties file. It looks like your sonar web server is using the embedded Derby DB.

If this is not the case, could you tell which tables are contained in your oracle sonar schema ?

thanks
Freddy

On Fri, Jun 5, 2009 at 2:48 PM, Martin Gladdish <[hidden email]> wrote:
There's no such table/view. The only schema_* table is schema_info.


2009/6/5 Freddy Mallet <[hidden email]>
Hi Martin,

Could you execute the following sql request on the sonar schema and say what you get :

SELECT * FROM schema_migrations


It's exactly what the Sonar Maven plugin does to know which is the current version of the sonar db model (1.9 = version 67)

Hope it helps
Freddy

On Fri, Jun 5, 2009 at 2:12 PM, Martin Gladdish <[hidden email]> wrote:
It's certainly Oracle, but I'm pretty sure there's only one Sonar schema. There are plenty of other non-sonar schemas in this DB instance though.

2009/6/5 Cedric Munger <[hidden email]>

Hi,
I've already seen the problem where the version is not correctly detected when connecting to an oracle database with multiple sonar schemas.
Is it your case ?


On Fri, Jun 5, 2009 at 1:50 PM, Martin Gladdish <[hidden email]> wrote:
Well, the plot thickens :)

On the theory that it was the maven plugin at fault, I followed some of the other suggestions around this group for blitzing my local mojo maven repo. That seems to have worked in as much as I think I've got further along the process.

So, running mvn sonar:sonar resulted in a whole bunch of messages like this:
which worked.

I now get a different error though:

$ mvn sonar:sonar
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] ------------------------------------------------------------------------
[INFO] Building xxx
[INFO]    task-segment: [sonar:sonar] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [sonar:sonar]
[INFO] Sonar host: http://mySonarServer:9000
[INFO] Sonar version: 1.9
[INFO] [sonar-core:internal]
[INFO] Sonar JDBC URL: jdbc:oracle:oci:@xxx
[INFO] Sonar JDBC login: xxx
[INFO] Sonar JDBC driver: oracle.jdbc.driver.OracleDriver
[INFO] Sonar branch:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Database schema must be updated [version/required=-1/67]. Please browse to your sonar homepage.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Fri Jun 05 12:36:42 BST 2009
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------

The problem being that the web app is up and running just fine (and the upgrade process via sonar's front page worked fine with no errors for each of the versions that I installed in turn), and it claims to be running version 1.9.

select * from schema_info = VERSION | 38

Again, there are no errors in either of sonar's logs.


2009/6/5 Martin Gladdish <[hidden email]>
Hmm, but isn't it the maven plugin that's using the Maven Embedder, rather than the server-side Sonar application?

I only downloaded the zip from sonar's dist pages last night, expanded it there and then, and updated sonar.properties, wrapper.conf and my oracle driver jar accordingly.

For instance, are you saying that http://mySonarServer:9000/deploy/maven really should work, and that the fact I get a 404 is proof that my server-side installation is broken?

2009/6/5 Freddy Mallet <[hidden email]>

Hi Martin,

As Sonar 1.9 no more uses JavaNCSS and the Maven Embedder, your sonar web server instance is not the good one or is corrupted.

Could you do the following things :

* Stop any sonar web servers
* Unzip the sonar-1.9.zip archive in a fresh new directory
* Configure the conf/sonar.properties file to set the database connexion
* Launch the sonar web server (in the sonar homepage footer, check the sonar version)
* Check that your maven settings.xml is pointing to your sonar web server

Once this is done, launch a new analysis with the "mvn sonar:sonar" command and come back to the mailing list with the result.

Hope it helps
Freddy



On Fri, Jun 5, 2009 at 12:26 AM, Martin Gladdish <[hidden email]> wrote:
Hi all,

Apologies for the posting, but searching this mailing list and the greater-google haven't unearthed an answer so far...

I've just performed a mammoth upgrade to get my sonar installation from 1.3 to 1.9. I installed each of 1.4.3, 1.5.1, 1.6, 1.7, 1.8 and 1.9 in turn and got themselves to upgrade the DB (sitting in Oracle) also in turn.

All went well and I now have the 1.9 webapp running very nicely.

The problem I have is that I can no longer submit new metrics to sonar. I run the following command: mvn clean install sonar:sonar and get the following error:

[xxx]$ mvn sonar:sonar -U
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApps - Journal Sites
[INFO]    task-segment: [sonar:sonar]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing sonar:sonar
[INFO] [sonar:prepare]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] Building xxx
[ maven embedder INFO]    task-segment: [org.codehaus.mojo:javancss-maven-plugin:2.0-beta-2:report]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] [javancss:report]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during sonar checkstyle config file download

Embedded error: Error occured during file http://mySonarServer:9000/rules_config/checkstyle.xml download
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Thu Jun 04 23:02:12 BST 2009
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------

It certainly is true that when I point my browser to my http://mySonarServer:9000/rules_config/checkstyle.xml I get a 404 error.

Could it be that I'm still stuck with an older version of the maven plugin? If so, where can I point my archiva repo at to get the more recent version? The docs say I should point it to http://mySonarServer:9000/deploy/maven but, again, when I point my browser to it all I get is a 404.

Annoyingly, there's nothing in the logs, either sonar.log or wrapper.log

Many thanks in anticipation,

Martin Gladdish.








Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Simon
Administrator
I think that you forgot to upgrade your oracle database. Just browse to http://mySonarServer:9000 and click on setup.
Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Martin Gladdish
In reply to this post by Freddy Mallet
Nope, I'm certain that sonar's connected to our Oracle DB. If that weren't the case, I wouldn't be seeing the data that was in Oracle from when we were on version 1.3 before I upgraded. The sonar.properties file is indeed pointing to Oracle.

Here's the full list of tables:
ACTIVE_RULE_PARAMETERS
ACTIVE_RULES
COLUMNS_VIEWS
EXTERNAL_MEASURE_PARAMS
EXTERNAL_MEASURES
METRICS
PROJECT_LINKS
PROJECT_MEASURES
PROJECTS
PROPERTIES
ROLES
ROLES_USERS
RULE_FAILURE_PARAMS
RULE_FAILURES
RULES
RULES_CATEGORIES
RULES_PARAMETERS
RULES_PROFILES
SCHEMA_INFO
SNAPSHOT_LABELS
SNAPSHOT_SOURCES
SNAPSHOTS
USERS

And the sonar web application v1.9 appears to be running fine.

Martin.

2009/6/5 Freddy Mallet <[hidden email]>
Martin, give a new look to your sonar.properties file. It looks like your sonar web server is using the embedded Derby DB.

If this is not the case, could you tell which tables are contained in your oracle sonar schema ?

thanks
Freddy


On Fri, Jun 5, 2009 at 2:48 PM, Martin Gladdish <[hidden email]> wrote:
There's no such table/view. The only schema_* table is schema_info.


2009/6/5 Freddy Mallet <[hidden email]>
Hi Martin,

Could you execute the following sql request on the sonar schema and say what you get :

SELECT * FROM schema_migrations


It's exactly what the Sonar Maven plugin does to know which is the current version of the sonar db model (1.9 = version 67)

Hope it helps
Freddy

On Fri, Jun 5, 2009 at 2:12 PM, Martin Gladdish <[hidden email]> wrote:
It's certainly Oracle, but I'm pretty sure there's only one Sonar schema. There are plenty of other non-sonar schemas in this DB instance though.

2009/6/5 Cedric Munger <[hidden email]>

Hi,
I've already seen the problem where the version is not correctly detected when connecting to an oracle database with multiple sonar schemas.
Is it your case ?


On Fri, Jun 5, 2009 at 1:50 PM, Martin Gladdish <[hidden email]> wrote:
Well, the plot thickens :)

On the theory that it was the maven plugin at fault, I followed some of the other suggestions around this group for blitzing my local mojo maven repo. That seems to have worked in as much as I think I've got further along the process.

So, running mvn sonar:sonar resulted in a whole bunch of messages like this:
which worked.

I now get a different error though:

$ mvn sonar:sonar
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] ------------------------------------------------------------------------
[INFO] Building xxx
[INFO]    task-segment: [sonar:sonar] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [sonar:sonar]
[INFO] Sonar host: http://mySonarServer:9000
[INFO] Sonar version: 1.9
[INFO] [sonar-core:internal]
[INFO] Sonar JDBC URL: jdbc:oracle:oci:@xxx
[INFO] Sonar JDBC login: xxx
[INFO] Sonar JDBC driver: oracle.jdbc.driver.OracleDriver
[INFO] Sonar branch:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Database schema must be updated [version/required=-1/67]. Please browse to your sonar homepage.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Fri Jun 05 12:36:42 BST 2009
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------

The problem being that the web app is up and running just fine (and the upgrade process via sonar's front page worked fine with no errors for each of the versions that I installed in turn), and it claims to be running version 1.9.

select * from schema_info = VERSION | 38

Again, there are no errors in either of sonar's logs.


2009/6/5 Martin Gladdish <[hidden email]>
Hmm, but isn't it the maven plugin that's using the Maven Embedder, rather than the server-side Sonar application?

I only downloaded the zip from sonar's dist pages last night, expanded it there and then, and updated sonar.properties, wrapper.conf and my oracle driver jar accordingly.

For instance, are you saying that http://mySonarServer:9000/deploy/maven really should work, and that the fact I get a 404 is proof that my server-side installation is broken?

2009/6/5 Freddy Mallet <[hidden email]>

Hi Martin,

As Sonar 1.9 no more uses JavaNCSS and the Maven Embedder, your sonar web server instance is not the good one or is corrupted.

Could you do the following things :

* Stop any sonar web servers
* Unzip the sonar-1.9.zip archive in a fresh new directory
* Configure the conf/sonar.properties file to set the database connexion
* Launch the sonar web server (in the sonar homepage footer, check the sonar version)
* Check that your maven settings.xml is pointing to your sonar web server

Once this is done, launch a new analysis with the "mvn sonar:sonar" command and come back to the mailing list with the result.

Hope it helps
Freddy



On Fri, Jun 5, 2009 at 12:26 AM, Martin Gladdish <[hidden email]> wrote:
Hi all,

Apologies for the posting, but searching this mailing list and the greater-google haven't unearthed an answer so far...

I've just performed a mammoth upgrade to get my sonar installation from 1.3 to 1.9. I installed each of 1.4.3, 1.5.1, 1.6, 1.7, 1.8 and 1.9 in turn and got themselves to upgrade the DB (sitting in Oracle) also in turn.

All went well and I now have the 1.9 webapp running very nicely.

The problem I have is that I can no longer submit new metrics to sonar. I run the following command: mvn clean install sonar:sonar and get the following error:

[xxx]$ mvn sonar:sonar -U
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApps - Journal Sites
[INFO]    task-segment: [sonar:sonar]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing sonar:sonar
[INFO] [sonar:prepare]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] Building xxx
[ maven embedder INFO]    task-segment: [org.codehaus.mojo:javancss-maven-plugin:2.0-beta-2:report]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] [javancss:report]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during sonar checkstyle config file download

Embedded error: Error occured during file http://mySonarServer:9000/rules_config/checkstyle.xml download
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Thu Jun 04 23:02:12 BST 2009
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------

It certainly is true that when I point my browser to my http://mySonarServer:9000/rules_config/checkstyle.xml I get a 404 error.

Could it be that I'm still stuck with an older version of the maven plugin? If so, where can I point my archiva repo at to get the more recent version? The docs say I should point it to http://mySonarServer:9000/deploy/maven but, again, when I point my browser to it all I get is a 404.

Annoyingly, there's nothing in the logs, either sonar.log or wrapper.log

Many thanks in anticipation,

Martin Gladdish.









Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Freddy Mallet
Hello Martin,

This schema DB is an old version of the Sonar DB model. You really can't have Sonar web server version 1.9 up and running on this schema.

Freddy

On Fri, Jun 5, 2009 at 3:06 PM, Martin Gladdish <[hidden email]> wrote:
Nope, I'm certain that sonar's connected to our Oracle DB. If that weren't the case, I wouldn't be seeing the data that was in Oracle from when we were on version 1.3 before I upgraded. The sonar.properties file is indeed pointing to Oracle.

Here's the full list of tables:
ACTIVE_RULE_PARAMETERS
ACTIVE_RULES
COLUMNS_VIEWS
EXTERNAL_MEASURE_PARAMS
EXTERNAL_MEASURES
METRICS
PROJECT_LINKS
PROJECT_MEASURES
PROJECTS
PROPERTIES
ROLES
ROLES_USERS
RULE_FAILURE_PARAMS
RULE_FAILURES
RULES
RULES_CATEGORIES
RULES_PARAMETERS
RULES_PROFILES
SCHEMA_INFO
SNAPSHOT_LABELS
SNAPSHOT_SOURCES
SNAPSHOTS
USERS

And the sonar web application v1.9 appears to be running fine.

Martin.

2009/6/5 Freddy Mallet <[hidden email]>
Martin, give a new look to your sonar.properties file. It looks like your sonar web server is using the embedded Derby DB.

If this is not the case, could you tell which tables are contained in your oracle sonar schema ?

thanks
Freddy


On Fri, Jun 5, 2009 at 2:48 PM, Martin Gladdish <[hidden email]> wrote:
There's no such table/view. The only schema_* table is schema_info.


2009/6/5 Freddy Mallet <[hidden email]>
Hi Martin,

Could you execute the following sql request on the sonar schema and say what you get :

SELECT * FROM schema_migrations


It's exactly what the Sonar Maven plugin does to know which is the current version of the sonar db model (1.9 = version 67)

Hope it helps
Freddy

On Fri, Jun 5, 2009 at 2:12 PM, Martin Gladdish <[hidden email]> wrote:
It's certainly Oracle, but I'm pretty sure there's only one Sonar schema. There are plenty of other non-sonar schemas in this DB instance though.

2009/6/5 Cedric Munger <[hidden email]>

Hi,
I've already seen the problem where the version is not correctly detected when connecting to an oracle database with multiple sonar schemas.
Is it your case ?


On Fri, Jun 5, 2009 at 1:50 PM, Martin Gladdish <[hidden email]> wrote:
Well, the plot thickens :)

On the theory that it was the maven plugin at fault, I followed some of the other suggestions around this group for blitzing my local mojo maven repo. That seems to have worked in as much as I think I've got further along the process.

So, running mvn sonar:sonar resulted in a whole bunch of messages like this:
which worked.

I now get a different error though:

$ mvn sonar:sonar
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] ------------------------------------------------------------------------
[INFO] Building xxx
[INFO]    task-segment: [sonar:sonar] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [sonar:sonar]
[INFO] Sonar host: http://mySonarServer:9000
[INFO] Sonar version: 1.9
[INFO] [sonar-core:internal]
[INFO] Sonar JDBC URL: jdbc:oracle:oci:@xxx
[INFO] Sonar JDBC login: xxx
[INFO] Sonar JDBC driver: oracle.jdbc.driver.OracleDriver
[INFO] Sonar branch:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Database schema must be updated [version/required=-1/67]. Please browse to your sonar homepage.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Fri Jun 05 12:36:42 BST 2009
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------

The problem being that the web app is up and running just fine (and the upgrade process via sonar's front page worked fine with no errors for each of the versions that I installed in turn), and it claims to be running version 1.9.

select * from schema_info = VERSION | 38

Again, there are no errors in either of sonar's logs.


2009/6/5 Martin Gladdish <[hidden email]>
Hmm, but isn't it the maven plugin that's using the Maven Embedder, rather than the server-side Sonar application?

I only downloaded the zip from sonar's dist pages last night, expanded it there and then, and updated sonar.properties, wrapper.conf and my oracle driver jar accordingly.

For instance, are you saying that http://mySonarServer:9000/deploy/maven really should work, and that the fact I get a 404 is proof that my server-side installation is broken?

2009/6/5 Freddy Mallet <[hidden email]>

Hi Martin,

As Sonar 1.9 no more uses JavaNCSS and the Maven Embedder, your sonar web server instance is not the good one or is corrupted.

Could you do the following things :

* Stop any sonar web servers
* Unzip the sonar-1.9.zip archive in a fresh new directory
* Configure the conf/sonar.properties file to set the database connexion
* Launch the sonar web server (in the sonar homepage footer, check the sonar version)
* Check that your maven settings.xml is pointing to your sonar web server

Once this is done, launch a new analysis with the "mvn sonar:sonar" command and come back to the mailing list with the result.

Hope it helps
Freddy



On Fri, Jun 5, 2009 at 12:26 AM, Martin Gladdish <[hidden email]> wrote:
Hi all,

Apologies for the posting, but searching this mailing list and the greater-google haven't unearthed an answer so far...

I've just performed a mammoth upgrade to get my sonar installation from 1.3 to 1.9. I installed each of 1.4.3, 1.5.1, 1.6, 1.7, 1.8 and 1.9 in turn and got themselves to upgrade the DB (sitting in Oracle) also in turn.

All went well and I now have the 1.9 webapp running very nicely.

The problem I have is that I can no longer submit new metrics to sonar. I run the following command: mvn clean install sonar:sonar and get the following error:

[xxx]$ mvn sonar:sonar -U
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   xxx
[INFO]   xxx
[INFO]   xxx
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building WebApps - Journal Sites
[INFO]    task-segment: [sonar:sonar]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing sonar:sonar
[INFO] [sonar:prepare]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] Building xxx
[ maven embedder INFO]    task-segment: [org.codehaus.mojo:javancss-maven-plugin:2.0-beta-2:report]
[ maven embedder INFO] ------------------------------------------------------------------------
[ maven embedder INFO] [javancss:report]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during sonar checkstyle config file download

Embedded error: Error occured during file http://mySonarServer:9000/rules_config/checkstyle.xml download
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Thu Jun 04 23:02:12 BST 2009
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------

It certainly is true that when I point my browser to my http://mySonarServer:9000/rules_config/checkstyle.xml I get a 404 error.

Could it be that I'm still stuck with an older version of the maven plugin? If so, where can I point my archiva repo at to get the more recent version? The docs say I should point it to http://mySonarServer:9000/deploy/maven but, again, when I point my browser to it all I get is a 404.

Annoyingly, there's nothing in the logs, either sonar.log or wrapper.log

Many thanks in anticipation,

Martin Gladdish.










Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Simon
Administrator
In reply to this post by Martin Gladdish

And the sonar web application v1.9 appears to be running fine.

So you confirm that http://mySonarServer:9000 displays all your projects ?
Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Martin Gladdish
Apologies for the confusion; I've just realised the DB I'm looking at here is a different version of the DB to which the application is pointing to. I'll work out where the confusion has crept in and get back to you. I suspect that once this is fixed then this problem will go away.

Sorry for the red herring.

2009/6/5 Simon Brandhof <[hidden email]>

And the sonar web application v1.9 appears to be running fine.

So you confirm that http://mySonarServer:9000 displays all your projects ?

Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Freddy Mallet
Thanks Martin for this notification !
no problem.

On Fri, Jun 5, 2009 at 4:09 PM, Martin Gladdish <[hidden email]> wrote:
Apologies for the confusion; I've just realised the DB I'm looking at here is a different version of the DB to which the application is pointing to. I'll work out where the confusion has crept in and get back to you. I suspect that once this is fixed then this problem will go away.

Sorry for the red herring.

2009/6/5 Simon Brandhof <[hidden email]>


And the sonar web application v1.9 appears to be running fine.

So you confirm that http://mySonarServer:9000 displays all your projects ?


Reply | Threaded
Open this post in threaded view
|

Re: Mammoth upgrade help

Martin Gladdish
In reply to this post by Martin Gladdish
That has indeed fixed it. I can only apologies again :(

So, to summarise, the action to fix my problem was to blitz my local codehaus mojo repository. All subsequent issues were to do with my local machine pointing to the wrong (non-upgraded) DB instance.

Thanks for all your help.

Martin.

2009/6/5 Martin Gladdish <[hidden email]>
Apologies for the confusion; I've just realised the DB I'm looking at here is a different version of the DB to which the application is pointing to. I'll work out where the confusion has crept in and get back to you. I suspect that once this is fixed then this problem will go away.

Sorry for the red herring.

2009/6/5 Simon Brandhof <[hidden email]>


And the sonar web application v1.9 appears to be running fine.

So you confirm that http://mySonarServer:9000 displays all your projects ?