Cobertura: Error reading file, multi module project

View: New views
16 Messages — Rating Filter:   Alert me  

Cobertura: Error reading file, multi module project

by Daniel Wood-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel


Re: Cobertura: Error reading file, multi module project

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Daniel,

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

Thanks
Freddy

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel



Re: Cobertura: Error reading file, multi module project

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Daniel,

I've analyzed the log file you sent me off list. I've still a couple of question :

- Do you always get this error on the two Maven modules or does it occur randomly ?
- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?
- How many classes do those maven modules contain ?

Thanks
Freddy


On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:
Hi Daniel,

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

Thanks
Freddy


On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel




RE: Cobertura: Error reading file, multi module project

by Daniel Wood-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31
To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel

 

 


Re: Cobertura: Error reading file, multi module project

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Daniel,

Could you try the workaround provided by Wouter De Vaal on http://jira.codehaus.org/browse/SONAR-172 ?

For that, you need to update you pom.xml in order to add the following lines :

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<systemProperties>
<property>
<name>cobertura.use.java.nio</name>
<value>false</value>
</property>
</systemProperties>
</configuration>
</plugin>

Hope it helps,
Freddy

On Fri, Nov 13, 2009 at 5:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel

 

 



RE: Cobertura: Error reading file, multi module project

by Daniel Wood-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi Freddy, thanks for this. Unfortunately after making this change the problem persists.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 13 November 2009 22:47
To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

Could you try the workaround provided by Wouter De Vaal on http://jira.codehaus.org/browse/SONAR-172 ?

 

For that, you need to update you pom.xml in order to add the following lines :

 

<plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-surefire-plugin</artifactId>

            <version>2.4.3</version>

            <configuration>

                        <systemProperties>

                                    <property>

                                                <name>cobertura.use.java.nio</name>

                                                <value>false</value>

                                    </property>

                        </systemProperties>

            </configuration>

</plugin>


Hope it helps,

Freddy

 

On Fri, Nov 13, 2009 at 5:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel

 

 

 


Re: Cobertura: Error reading file, multi module project

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Argh... I can't manage to understand why you don't get the error when you directly launch mvn cobertura:cobertura.

Which version of Maven do you use and if you use a version 2.0.X, could you try with Maven 2.2.X ?

Thanks for your help Daniel,
Freddy



On Tue, Nov 17, 2009 at 2:32 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, thanks for this. Unfortunately after making this change the problem persists.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 13 November 2009 22:47


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

Could you try the workaround provided by Wouter De Vaal on http://jira.codehaus.org/browse/SONAR-172 ?

 

For that, you need to update you pom.xml in order to add the following lines :

 

<plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-surefire-plugin</artifactId>

            <version>2.4.3</version>

            <configuration>

                        <systemProperties>

                                    <property>

                                                <name>cobertura.use.java.nio</name>

                                                <value>false</value>

                                    </property>

                        </systemProperties>

            </configuration>

</plugin>


Hope it helps,

Freddy

 

On Fri, Nov 13, 2009 at 5:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel

 

 

 



RE: Cobertura: Error reading file, multi module project

by Daniel Wood-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

We’re using 2.0.10. I’ll switch to 2.2.1 and let you know the results.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 17 November 2009 23:04
To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Argh... I can't manage to understand why you don't get the error when you directly launch mvn cobertura:cobertura.

 

Which version of Maven do you use and if you use a version 2.0.X, could you try with Maven 2.2.X ?

 

Thanks for your help Daniel,

Freddy

 

 

On Tue, Nov 17, 2009 at 2:32 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, thanks for this. Unfortunately after making this change the problem persists.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 13 November 2009 22:47


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

Could you try the workaround provided by Wouter De Vaal on http://jira.codehaus.org/browse/SONAR-172 ?

 

For that, you need to update you pom.xml in order to add the following lines :

 

<plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-surefire-plugin</artifactId>

            <version>2.4.3</version>

            <configuration>

                        <systemProperties>

                                    <property>

                                                <name>cobertura.use.java.nio</name>

                                                <value>false</value>

                                    </property>

                        </systemProperties>

            </configuration>

</plugin>


Hope it helps,

Freddy

 

On Fri, Nov 13, 2009 at 5:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel

 

 

 

 


RE: Cobertura: Error reading file, multi module project

by Daniel Wood-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi Freddy,

 

I’ve been reviewing the environment where this issue occurs and it turns out that the JDK version has been switched back to the environments default, ie an IBM JDK.

Keeping the maven version as it was (2.0.10) and adding your recommended surefire change back into the pom, everything now works when executed from the Sun JDK.

 

Thanks for all your help and support on this.

 

Regards,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 17 November 2009 23:04
To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Argh... I can't manage to understand why you don't get the error when you directly launch mvn cobertura:cobertura.

 

Which version of Maven do you use and if you use a version 2.0.X, could you try with Maven 2.2.X ?

 

Thanks for your help Daniel,

Freddy

 

 

On Tue, Nov 17, 2009 at 2:32 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, thanks for this. Unfortunately after making this change the problem persists.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 13 November 2009 22:47


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

Could you try the workaround provided by Wouter De Vaal on http://jira.codehaus.org/browse/SONAR-172 ?

 

For that, you need to update you pom.xml in order to add the following lines :

 

<plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-surefire-plugin</artifactId>

            <version>2.4.3</version>

            <configuration>

                        <systemProperties>

                                    <property>

                                                <name>cobertura.use.java.nio</name>

                                                <value>false</value>

                                    </property>

                        </systemProperties>

            </configuration>

</plugin>


Hope it helps,

Freddy

 

On Fri, Nov 13, 2009 at 5:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel

 

 

 

 


Re: Cobertura: Error reading file, multi module project

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Cool Daniel !

On Wed, Nov 18, 2009 at 3:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy,

 

I’ve been reviewing the environment where this issue occurs and it turns out that the JDK version has been switched back to the environments default, ie an IBM JDK.

Keeping the maven version as it was (2.0.10) and adding your recommended surefire change back into the pom, everything now works when executed from the Sun JDK.

 

Thanks for all your help and support on this.

 

Regards,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]

Sent: 17 November 2009 23:04
To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Argh... I can't manage to understand why you don't get the error when you directly launch mvn cobertura:cobertura.

 

Which version of Maven do you use and if you use a version 2.0.X, could you try with Maven 2.2.X ?

 

Thanks for your help Daniel,

Freddy

 

 

On Tue, Nov 17, 2009 at 2:32 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, thanks for this. Unfortunately after making this change the problem persists.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 13 November 2009 22:47


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

Could you try the workaround provided by Wouter De Vaal on http://jira.codehaus.org/browse/SONAR-172 ?

 

For that, you need to update you pom.xml in order to add the following lines :

 

<plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-surefire-plugin</artifactId>

            <version>2.4.3</version>

            <configuration>

                        <systemProperties>

                                    <property>

                                                <name>cobertura.use.java.nio</name>

                                                <value>false</value>

                                    </property>

                        </systemProperties>

            </configuration>

</plugin>


Hope it helps,

Freddy

 

On Fri, Nov 13, 2009 at 5:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel

 

 

 

 



RE: Cobertura: Error reading file, multi module project

by Mohamed-Ali Sfaxi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

I have the same problem with sonar 1.11.1. I had to downgrade to version 1.10.1. I am using JVM IBM also on AIX.

Freddy, is there any possibility to get Cobertura running on  sonar 1.11.1 using JDK IBM ?

Thank you

Dali

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: mercredi 18 novembre 2009 15:58
To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Cool Daniel !

 

On Wed, Nov 18, 2009 at 3:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy,

 

I’ve been reviewing the environment where this issue occurs and it turns out that the JDK version has been switched back to the environments default, ie an IBM JDK.

Keeping the maven version as it was (2.0.10) and adding your recommended surefire change back into the pom, everything now works when executed from the Sun JDK.

 

Thanks for all your help and support on this.

 

Regards,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]

Sent: 17 November 2009 23:04

To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Argh... I can't manage to understand why you don't get the error when you directly launch mvn cobertura:cobertura.

 

Which version of Maven do you use and if you use a version 2.0.X, could you try with Maven 2.2.X ?

 

Thanks for your help Daniel,

Freddy

 

 

On Tue, Nov 17, 2009 at 2:32 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, thanks for this. Unfortunately after making this change the problem persists.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 13 November 2009 22:47


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

Could you try the workaround provided by Wouter De Vaal on http://jira.codehaus.org/browse/SONAR-172 ?

 

For that, you need to update you pom.xml in order to add the following lines :

 

<plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-surefire-plugin</artifactId>

            <version>2.4.3</version>

            <configuration>

                        <systemProperties>

                                    <property>

                                                <name>cobertura.use.java.nio</name>

                                                <value>false</value>

                                    </property>

                        </systemProperties>

            </configuration>

</plugin>


Hope it helps,

Freddy

 

On Fri, Nov 13, 2009 at 5:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel

 

 

 

 

 


Re: Cobertura: Error reading file, multi module project

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dali,

The only difference between Sonar 1.10 and Sonar 1.11 concerning Cobertura is :


With this ticket Maven Cobertura 2.2 is no more used  even if it is specified in the Maven pom. I've done a quick search to find any known issues about Maven Cobertura 2.3 or Cobertura 1.9 with JDK IBM but I haven't found anything :-(

What would be great is to launch Maven in debug mode with IBM JDK, to attach to it remotely for instance with Eclipse or Netbeans to see exactly where and what root exception is thrown in Cobertura source code.

regards,
Freddy

On Mon, Nov 23, 2009 at 8:35 AM, Mohamed-Ali Sfaxi <mohamed-ali.sfaxi@...> wrote:

Hi,

I have the same problem with sonar 1.11.1. I had to downgrade to version 1.10.1. I am using JVM IBM also on AIX.

Freddy, is there any possibility to get Cobertura running on  sonar 1.11.1 using JDK IBM ?

Thank you

Dali

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: mercredi 18 novembre 2009 15:58


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Cool Daniel !

 

On Wed, Nov 18, 2009 at 3:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy,

 

I’ve been reviewing the environment where this issue occurs and it turns out that the JDK version has been switched back to the environments default, ie an IBM JDK.

Keeping the maven version as it was (2.0.10) and adding your recommended surefire change back into the pom, everything now works when executed from the Sun JDK.

 

Thanks for all your help and support on this.

 

Regards,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]

Sent: 17 November 2009 23:04

To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Argh... I can't manage to understand why you don't get the error when you directly launch mvn cobertura:cobertura.

 

Which version of Maven do you use and if you use a version 2.0.X, could you try with Maven 2.2.X ?

 

Thanks for your help Daniel,

Freddy

 

 

On Tue, Nov 17, 2009 at 2:32 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, thanks for this. Unfortunately after making this change the problem persists.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 13 November 2009 22:47


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

Could you try the workaround provided by Wouter De Vaal on http://jira.codehaus.org/browse/SONAR-172 ?

 

For that, you need to update you pom.xml in order to add the following lines :

 

<plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-surefire-plugin</artifactId>

            <version>2.4.3</version>

            <configuration>

                        <systemProperties>

                                    <property>

                                                <name>cobertura.use.java.nio</name>

                                                <value>false</value>

                                    </property>

                        </systemProperties>

            </configuration>

</plugin>


Hope it helps,

Freddy

 

On Fri, Nov 13, 2009 at 5:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel

 

 

 

 

 



RE: Cobertura: Error reading file, multi module project

by Mohamed-Ali Sfaxi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi Freddy,

 

Just to give some information maybe it helps.

I tested sonar cobertura plugin of sonar 1.10.1 on sonar 1.11.1 (I modified the file parent-20091130120007.pom in local repository inside /org/codehaus/sonar/runtime/plugins/parent/ ) and I got the right result of cobertura. So now it is running.

 

I wish this gives you some hints.

Best regards,

Dali

---------------------- parent-20091130120007.pom -------------------------------

……

    <dependency>

      <groupId>org.codehaus.sonar.runtime.plugins</groupId>

      <artifactId>sonar-plugin-cobertura-1.10.1</artifactId>

      <version>20091026155351</version>

      <type>jar</type>

    </dependency>

    <!--    <dependency>

      <groupId>org.codehaus.sonar.runtime.plugins</groupId>

      <artifactId>sonar-plugin-cobertura-1.11.1</artifactId>

      <version>20091130120007</version>

      <type>jar</type>

    </dependency> -->

……

-------------------------------------------

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: lundi 23 novembre 2009 22:32
To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Dali,

 

The only difference between Sonar 1.10 and Sonar 1.11 concerning Cobertura is :

 

 

With this ticket Maven Cobertura 2.2 is no more used  even if it is specified in the Maven pom. I've done a quick search to find any known issues about Maven Cobertura 2.3 or Cobertura 1.9 with JDK IBM but I haven't found anything :-(

 

What would be great is to launch Maven in debug mode with IBM JDK, to attach to it remotely for instance with Eclipse or Netbeans to see exactly where and what root exception is thrown in Cobertura source code.

 

regards,

Freddy

On Mon, Nov 23, 2009 at 8:35 AM, Mohamed-Ali Sfaxi <mohamed-ali.sfaxi@...> wrote:

Hi,

I have the same problem with sonar 1.11.1. I had to downgrade to version 1.10.1. I am using JVM IBM also on AIX.

Freddy, is there any possibility to get Cobertura running on  sonar 1.11.1 using JDK IBM ?

Thank you

Dali

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: mercredi 18 novembre 2009 15:58


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Cool Daniel !

 

On Wed, Nov 18, 2009 at 3:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy,

 

I’ve been reviewing the environment where this issue occurs and it turns out that the JDK version has been switched back to the environments default, ie an IBM JDK.

Keeping the maven version as it was (2.0.10) and adding your recommended surefire change back into the pom, everything now works when executed from the Sun JDK.

 

Thanks for all your help and support on this.

 

Regards,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]

Sent: 17 November 2009 23:04

To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Argh... I can't manage to understand why you don't get the error when you directly launch mvn cobertura:cobertura.

 

Which version of Maven do you use and if you use a version 2.0.X, could you try with Maven 2.2.X ?

 

Thanks for your help Daniel,

Freddy

 

 

On Tue, Nov 17, 2009 at 2:32 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, thanks for this. Unfortunately after making this change the problem persists.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 13 November 2009 22:47


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

Could you try the workaround provided by Wouter De Vaal on http://jira.codehaus.org/browse/SONAR-172 ?

 

For that, you need to update you pom.xml in order to add the following lines :

 

<plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-surefire-plugin</artifactId>

            <version>2.4.3</version>

            <configuration>

                        <systemProperties>

                                    <property>

                                                <name>cobertura.use.java.nio</name>

                                                <value>false</value>

                                    </property>

                        </systemProperties>

            </configuration>

</plugin>


Hope it helps,

Freddy

 

On Fri, Nov 13, 2009 at 5:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel

 

 

 

 

 

 


Re: Cobertura: Error reading file, multi module project

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks a lot Mohamed for this new input. I'm going to investigate.


On Mon, Nov 30, 2009 at 1:28 PM, Mohamed-Ali Sfaxi <mohamed-ali.sfaxi@...> wrote:

Hi Freddy,

 

Just to give some information maybe it helps.

I tested sonar cobertura plugin of sonar 1.10.1 on sonar 1.11.1 (I modified the file parent-20091130120007.pom in local repository inside /org/codehaus/sonar/runtime/plugins/parent/ ) and I got the right result of cobertura. So now it is running.

 

I wish this gives you some hints.

Best regards,

Dali

---------------------- parent-20091130120007.pom -------------------------------

……

    <dependency>

      <groupId>org.codehaus.sonar.runtime.plugins</groupId>

      <artifactId>sonar-plugin-cobertura-1.10.1</artifactId>

      <version>20091026155351</version>

      <type>jar</type>

    </dependency>

    <!--    <dependency>

      <groupId>org.codehaus.sonar.runtime.plugins</groupId>

      <artifactId>sonar-plugin-cobertura-1.11.1</artifactId>

      <version>20091130120007</version>

      <type>jar</type>

    </dependency> -->

……

-------------------------------------------

 

From: Freddy Mallet [mailto:freddy.mallet@...]

Sent: lundi 23 novembre 2009 22:32
To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Dali,

 

The only difference between Sonar 1.10 and Sonar 1.11 concerning Cobertura is :

 

 

With this ticket Maven Cobertura 2.2 is no more used  even if it is specified in the Maven pom. I've done a quick search to find any known issues about Maven Cobertura 2.3 or Cobertura 1.9 with JDK IBM but I haven't found anything :-(

 

What would be great is to launch Maven in debug mode with IBM JDK, to attach to it remotely for instance with Eclipse or Netbeans to see exactly where and what root exception is thrown in Cobertura source code.

 

regards,

Freddy

On Mon, Nov 23, 2009 at 8:35 AM, Mohamed-Ali Sfaxi <mohamed-ali.sfaxi@...> wrote:

Hi,

I have the same problem with sonar 1.11.1. I had to downgrade to version 1.10.1. I am using JVM IBM also on AIX.

Freddy, is there any possibility to get Cobertura running on  sonar 1.11.1 using JDK IBM ?

Thank you

Dali

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: mercredi 18 novembre 2009 15:58


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Cool Daniel !

 

On Wed, Nov 18, 2009 at 3:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy,

 

I’ve been reviewing the environment where this issue occurs and it turns out that the JDK version has been switched back to the environments default, ie an IBM JDK.

Keeping the maven version as it was (2.0.10) and adding your recommended surefire change back into the pom, everything now works when executed from the Sun JDK.

 

Thanks for all your help and support on this.

 

Regards,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]

Sent: 17 November 2009 23:04

To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Argh... I can't manage to understand why you don't get the error when you directly launch mvn cobertura:cobertura.

 

Which version of Maven do you use and if you use a version 2.0.X, could you try with Maven 2.2.X ?

 

Thanks for your help Daniel,

Freddy

 

 

On Tue, Nov 17, 2009 at 2:32 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, thanks for this. Unfortunately after making this change the problem persists.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 13 November 2009 22:47


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

Could you try the workaround provided by Wouter De Vaal on http://jira.codehaus.org/browse/SONAR-172 ?

 

For that, you need to update you pom.xml in order to add the following lines :

 

<plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-surefire-plugin</artifactId>

            <version>2.4.3</version>

            <configuration>

                        <systemProperties>

                                    <property>

                                                <name>cobertura.use.java.nio</name>

                                                <value>false</value>

                                    </property>

                        </systemProperties>

            </configuration>

</plugin>


Hope it helps,

Freddy

 

On Fri, Nov 13, 2009 at 5:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel

 

 

 

 

 

 



Re: Cobertura: Error reading file, multi module project

by Freddy Mallet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dali,

I've double-checked the difference between Sonar 1.10 and Sonar 1.11 and the only difference is that Sonar is no more using the Maven Cobertura version specified in the pom.xml file. Could you confirm that the use of version 2.2 of the Maven Cobertura plugin is specified somewhere in your pom file or parent pom ?

Thanks
Freddy


On Mon, Nov 30, 2009 at 1:28 PM, Mohamed-Ali Sfaxi <mohamed-ali.sfaxi@...> wrote:

Hi Freddy,

 

Just to give some information maybe it helps.

I tested sonar cobertura plugin of sonar 1.10.1 on sonar 1.11.1 (I modified the file parent-20091130120007.pom in local repository inside /org/codehaus/sonar/runtime/plugins/parent/ ) and I got the right result of cobertura. So now it is running.

 

I wish this gives you some hints.

Best regards,

Dali

---------------------- parent-20091130120007.pom -------------------------------

……

    <dependency>

      <groupId>org.codehaus.sonar.runtime.plugins</groupId>

      <artifactId>sonar-plugin-cobertura-1.10.1</artifactId>

      <version>20091026155351</version>

      <type>jar</type>

    </dependency>

    <!--    <dependency>

      <groupId>org.codehaus.sonar.runtime.plugins</groupId>

      <artifactId>sonar-plugin-cobertura-1.11.1</artifactId>

      <version>20091130120007</version>

      <type>jar</type>

    </dependency> -->

……

-------------------------------------------

 

From: Freddy Mallet [mailto:freddy.mallet@...]

Sent: lundi 23 novembre 2009 22:32
To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Dali,

 

The only difference between Sonar 1.10 and Sonar 1.11 concerning Cobertura is :

 

 

With this ticket Maven Cobertura 2.2 is no more used  even if it is specified in the Maven pom. I've done a quick search to find any known issues about Maven Cobertura 2.3 or Cobertura 1.9 with JDK IBM but I haven't found anything :-(

 

What would be great is to launch Maven in debug mode with IBM JDK, to attach to it remotely for instance with Eclipse or Netbeans to see exactly where and what root exception is thrown in Cobertura source code.

 

regards,

Freddy

On Mon, Nov 23, 2009 at 8:35 AM, Mohamed-Ali Sfaxi <mohamed-ali.sfaxi@...> wrote:

Hi,

I have the same problem with sonar 1.11.1. I had to downgrade to version 1.10.1. I am using JVM IBM also on AIX.

Freddy, is there any possibility to get Cobertura running on  sonar 1.11.1 using JDK IBM ?

Thank you

Dali

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: mercredi 18 novembre 2009 15:58


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Cool Daniel !

 

On Wed, Nov 18, 2009 at 3:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy,

 

I’ve been reviewing the environment where this issue occurs and it turns out that the JDK version has been switched back to the environments default, ie an IBM JDK.

Keeping the maven version as it was (2.0.10) and adding your recommended surefire change back into the pom, everything now works when executed from the Sun JDK.

 

Thanks for all your help and support on this.

 

Regards,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]

Sent: 17 November 2009 23:04

To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Argh... I can't manage to understand why you don't get the error when you directly launch mvn cobertura:cobertura.

 

Which version of Maven do you use and if you use a version 2.0.X, could you try with Maven 2.2.X ?

 

Thanks for your help Daniel,

Freddy

 

 

On Tue, Nov 17, 2009 at 2:32 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, thanks for this. Unfortunately after making this change the problem persists.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 13 November 2009 22:47


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

Could you try the workaround provided by Wouter De Vaal on http://jira.codehaus.org/browse/SONAR-172 ?

 

For that, you need to update you pom.xml in order to add the following lines :

 

<plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-surefire-plugin</artifactId>

            <version>2.4.3</version>

            <configuration>

                        <systemProperties>

                                    <property>

                                                <name>cobertura.use.java.nio</name>

                                                <value>false</value>

                                    </property>

                        </systemProperties>

            </configuration>

</plugin>


Hope it helps,

Freddy

 

On Fri, Nov 13, 2009 at 5:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel

 

 

 

 

 

 



RE: Cobertura: Error reading file, multi module project

by Mohamed-Ali Sfaxi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi Freddy,

No, I am using Cobertura version 2.3 in my parent pom.

Best regards,

Dali

 

                                               <plugin>

                                                               <artifactId>maven-compiler-plugin</artifactId>

                                                               <version>2.0.2</version>

                                                               <configuration>

                                                                              <source>1.5</source>

                                                                              <target>1.5</target>

                                                               </configuration>

                                               </plugin>

                                               <plugin>

                                                               <groupId>org.codehaus.mojo</groupId>

                                                               <artifactId>cobertura-maven-plugin</artifactId>

                                                               <version>2.3</version>

                                                               <configuration>

                                                                              <instrumentation>

                                                                                              <excludes>

                                                                                                              <exclude>**/*EJS*.class</exclude>

                                                                                                              <exclude>**/*_*.class</exclude>

                                                                                              </excludes>

                                                                              </instrumentation>

                                                               </configuration>

                                               </plugin>

                               </plugins>

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: mercredi 16 décembre 2009 10:47
To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Dali,

 

I've double-checked the difference between Sonar 1.10 and Sonar 1.11 and the only difference is that Sonar is no more using the Maven Cobertura version specified in the pom.xml file. Could you confirm that the use of version 2.2 of the Maven Cobertura plugin is specified somewhere in your pom file or parent pom ?

 

Thanks

Freddy

 

On Mon, Nov 30, 2009 at 1:28 PM, Mohamed-Ali Sfaxi <mohamed-ali.sfaxi@...> wrote:

Hi Freddy,

 

Just to give some information maybe it helps.

I tested sonar cobertura plugin of sonar 1.10.1 on sonar 1.11.1 (I modified the file parent-20091130120007.pom in local repository inside /org/codehaus/sonar/runtime/plugins/parent/ ) and I got the right result of cobertura. So now it is running.

 

I wish this gives you some hints.

Best regards,

Dali

---------------------- parent-20091130120007.pom -------------------------------

……

    <dependency>

      <groupId>org.codehaus.sonar.runtime.plugins</groupId>

      <artifactId>sonar-plugin-cobertura-1.10.1</artifactId>

      <version>20091026155351</version>

      <type>jar</type>

    </dependency>

    <!--    <dependency>

      <groupId>org.codehaus.sonar.runtime.plugins</groupId>

      <artifactId>sonar-plugin-cobertura-1.11.1</artifactId>

      <version>20091130120007</version>

      <type>jar</type>

    </dependency> -->

……

-------------------------------------------

 

From: Freddy Mallet [mailto:freddy.mallet@...]

Sent: lundi 23 novembre 2009 22:32

To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Dali,

 

The only difference between Sonar 1.10 and Sonar 1.11 concerning Cobertura is :

 

 

With this ticket Maven Cobertura 2.2 is no more used  even if it is specified in the Maven pom. I've done a quick search to find any known issues about Maven Cobertura 2.3 or Cobertura 1.9 with JDK IBM but I haven't found anything :-(

 

What would be great is to launch Maven in debug mode with IBM JDK, to attach to it remotely for instance with Eclipse or Netbeans to see exactly where and what root exception is thrown in Cobertura source code.

 

regards,

Freddy

On Mon, Nov 23, 2009 at 8:35 AM, Mohamed-Ali Sfaxi <mohamed-ali.sfaxi@...> wrote:

Hi,

I have the same problem with sonar 1.11.1. I had to downgrade to version 1.10.1. I am using JVM IBM also on AIX.

Freddy, is there any possibility to get Cobertura running on  sonar 1.11.1 using JDK IBM ?

Thank you

Dali

 

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: mercredi 18 novembre 2009 15:58


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Cool Daniel !

 

On Wed, Nov 18, 2009 at 3:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy,

 

I’ve been reviewing the environment where this issue occurs and it turns out that the JDK version has been switched back to the environments default, ie an IBM JDK.

Keeping the maven version as it was (2.0.10) and adding your recommended surefire change back into the pom, everything now works when executed from the Sun JDK.

 

Thanks for all your help and support on this.

 

Regards,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]

Sent: 17 November 2009 23:04

To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Argh... I can't manage to understand why you don't get the error when you directly launch mvn cobertura:cobertura.

 

Which version of Maven do you use and if you use a version 2.0.X, could you try with Maven 2.2.X ?

 

Thanks for your help Daniel,

Freddy

 

 

On Tue, Nov 17, 2009 at 2:32 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, thanks for this. Unfortunately after making this change the problem persists.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 13 November 2009 22:47


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

Could you try the workaround provided by Wouter De Vaal on http://jira.codehaus.org/browse/SONAR-172 ?

 

For that, you need to update you pom.xml in order to add the following lines :

 

<plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-surefire-plugin</artifactId>

            <version>2.4.3</version>

            <configuration>

                        <systemProperties>

                                    <property>

                                                <name>cobertura.use.java.nio</name>

                                                <value>false</value>

                                    </property>

                        </systemProperties>

            </configuration>

</plugin>


Hope it helps,

Freddy

 

On Fri, Nov 13, 2009 at 5:46 PM, Daniel Wood <Daniel.Wood@...> wrote:

Hi Freddy, the error always happens on the same two modules. And the cobertura.ser is created in the relevant directory. For the two modules that have this problem they have 30/60 classes in each.

 

Thanks,

Daniel

 

From: Freddy Mallet [mailto:freddy.mallet@...]
Sent: 12 November 2009 13:31


To: user@...
Subject: Re: [sonar-user] Cobertura: Error reading file, multi module project

 

Hi Daniel,

 

I've analyzed the log file you sent me off list. I've still a couple of question :

 

- Do you always get this error on the two Maven modules or does it occur randomly ?

- Even if the error occurs, do you see a file cobertura.ser in the /opt/Java/hudson/jobs/Sonar/workspace/xxxx/target/cobertura/ directory ?

- How many classes do those maven modules contain ?

 

Thanks

Freddy

 

 

On Tue, Nov 10, 2009 at 9:14 PM, Freddy Mallet <freddy.mallet@...> wrote:

Hi Daniel,

 

There is a similar open bug on the Maven Cobertura plugin (http://jira.codehaus.org/browse/MCOBERTURA-91) but I haven't already met this bug with Sonar. Could you provide the full stack trace of your error log ?

 

Thanks

Freddy

 

On Mon, Nov 9, 2009 at 5:51 PM, Daniel Wood <Daniel.Wood@...> wrote:

I’m getting a strange Cobertura error for two modules in a multi module maven project. I’m using Sonar v1.11.1 and the build is executed by Hudson (1.328).

 

[ERROR] Cobertura: Error reading file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser: null

Error: Unable to read from data file /opt/Java/hudson/jobs/Sonar/workspace/<XXX>/target/cobertura/cobertura.ser

 

[ERROR] Error in Cobertura Report generation: Unable to generate Cobertura Report for project.

org.apache.maven.plugin.MojoExecutionException: Unable to generate Cobertura Report for project.

 

I believe indicates that the Cobertura.ser is empty and doesn’t have any instrumentation data in it. However when mvn cobertura:cobertura is executed from the command line, cobertura reports are generated correctly for each module of the project (including the two that fail when called by Sonar/Hudson).

One of the failing modules is packaged as a war, the other is packaged as an ejb. Again there are other ejb & war packaged modules in this project and they are instrumented correctly.

 

Any ideas?

 

Thanks,

Daniel