Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Release 09.04.01, Release 10.04, Release Branch 11.04, Trunk
    • Fix Version/s: None
    • Component/s: framework
    • Labels:
      None
    • Environment:

      UBUNTU 10.04 LTS, Mac OS X 10.6.8

      Description

      When running ./ant cobertura-report or ./ant cobertura-report-xml following error is generated:

      Buildfile: /Users/s0001/Documents/workspace/ofbiz-trunk/build.xml

      cobertura-report-xml:
      [delete] Deleting directory /Users/s0001/Documents/workspace/ofbiz-trunk/runtime/logs/cobertura-report
      [mkdir] Created dir: /Users/s0001/Documents/workspace/ofbiz-trunk/runtime/logs/cobertura-report
      [cobertura-merge] Cobertura 1.9.4.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
      [cobertura-merge] Error: No files were specified for merging.

      BUILD FAILED
      /Users/s0001/Documents/workspace/ofbiz-trunk/build.xml:1003: Error running reports. See messages above.

      1. log.ofbiz.cobertura
        19 kB
        Erwan de FERRIERES

        Issue Links

          Activity

          Jacopo Cappellato made changes -
          Fix Version/s Trunk [ 12311928 ]
          Fix Version/s Release Branch 11.04 [ 12316420 ]
          Jacques Le Roux made changes -
          Link This issue blocks INFRA-3590 [ INFRA-3590 ]
          Jacques Le Roux made changes -
          Summary Cobertura targets fail Cobertura target fails
          Hide
          Jacques Le Roux added a comment -

          Actually forgot to report here that Cobertura is now compatible with Java 7 (and further it seems)

          Show
          Jacques Le Roux added a comment - Actually forgot to report here that Cobertura is now compatible with Java 7 (and further it seems)
          Jacques Le Roux made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Hide
          Jacques Le Roux added a comment -

          r1308301 was reverted at r1309337. So this had no influence and should not have closed this issue which still exists today.

          Erwan said then (2012-03-26) it worked in trunk (see attached log.ofbiz.cobertura) and R11.04. For further analysis, I noticed these lines at the bottom of the log:

               [java] Cobertura: Loaded information on 2264 classes.
               [java] Cobertura: Saved information on 2264 classes.
               [java] Java Result: 99
          

          I guess (I never used the cobertura feature) those lines were related with cobertura-base.dat and cobertura-components.dat files creation.

          In trunk an error was introduced with OFBIZ-3651 and r1230444. This was reported byt OFBIZ-4783 and this thread explains it. So it was actually fixed with r1341021 and r1341086. At least the line

          [java] java.lang.ClassNotFoundException: org.ofbiz.base.config.CoberturaInstrumenter 
          

          does not appear currently either in R11.04 nor trunk. So I believe OFBIZ-4783 can be closed.

          Though I tried Pierre's trick about removing lines in base/build.xml, now the Cobertura lines above don't appear either in R11.04 when running run-tests,

               [java] 2013-10-21 19:51:34,250 (Thread-0) [  ServiceDispatcher.java:857:INFO ] Shutting down the service engine...
               [java] Java Result: 99
          

          nor in trunk

              [java] 2013-10-21 23:31:12,593 (Thread-0) [    ContainerLoader.java:268:INFO ] Stopped container component-container
              [java] Java Result: 99
          

          As a side note, I had also to remove the antcall target="clean-downloads" from clean-all at r1201110

          After spending some times on all this, I'm wondering now if the best solution is not to get rid of Cobertura in favor of Jacoco as Pierre Smits proposed at OFBIZ-4773. It makese sense when you read

          We don't use Maven so seem not concerned by

          This would have the double advantage of

          • closing pending issues related to Cobertura which BTW does not support Java 7 and especially Java 8 "soon" coming
          • Follow the SonarQuBe flow where Jacoco is default
          Show
          Jacques Le Roux added a comment - r1308301 was reverted at r1309337 . So this had no influence and should not have closed this issue which still exists today. Erwan said then (2012-03-26) it worked in trunk (see attached log.ofbiz.cobertura) and R11.04. For further analysis, I noticed these lines at the bottom of the log: [java] Cobertura: Loaded information on 2264 classes. [java] Cobertura: Saved information on 2264 classes. [java] Java Result: 99 I guess (I never used the cobertura feature) those lines were related with cobertura-base.dat and cobertura-components.dat files creation. In trunk an error was introduced with OFBIZ-3651 and r1230444 . This was reported byt OFBIZ-4783 and this thread explains it. So it was actually fixed with r1341021 and r1341086 . At least the line [java] java.lang.ClassNotFoundException: org.ofbiz.base.config.CoberturaInstrumenter does not appear currently either in R11.04 nor trunk. So I believe OFBIZ-4783 can be closed. Though I tried Pierre's trick about removing lines in base/build.xml, now the Cobertura lines above don't appear either in R11.04 when running run-tests, [java] 2013-10-21 19:51:34,250 ( Thread -0) [ ServiceDispatcher.java:857:INFO ] Shutting down the service engine... [java] Java Result: 99 nor in trunk [java] 2013-10-21 23:31:12,593 ( Thread -0) [ ContainerLoader.java:268:INFO ] Stopped container component-container [java] Java Result: 99 As a side note, I had also to remove the antcall target="clean-downloads" from clean-all at r1201110 After spending some times on all this, I'm wondering now if the best solution is not to get rid of Cobertura in favor of Jacoco as Pierre Smits proposed at OFBIZ-4773 . It makese sense when you read http://jira.codehaus.org/browse/SONAR-3536 , http://docs.codehaus.org/display/SONAR/Release+3.4+Upgrade+Notes and https://en.wikipedia.org/wiki/Java_Code_Coverage_Tools . We don't use Maven so seem not concerned by http://sonarqube.15.x6.nabble.com/Questions-about-JaCoCo-vs-Cobertura-exclusion-coverage-capabilities-td3223823.html nor https://mail-archives.apache.org/mod_mbox/commons-dev/201305.mbox/%3CCAOGo0VaUFeMP5wd0FPq_3FPhVyH0z+q6VwObs2oqv4G5xk67TQ@mail.gmail.com%3E (tough last raises some concerns) This would have the double advantage of closing pending issues related to Cobertura which BTW does not support Java 7 and especially Java 8 "soon" coming Follow the SonarQuBe flow where Jacoco is default
          Erwan de FERRIERES made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Hide
          Erwan de FERRIERES added a comment -

          Pierre,

          please look at rev 1308301, which is correcting the issue you reported.

          Cheers,

          Show
          Erwan de FERRIERES added a comment - Pierre, please look at rev 1308301, which is correcting the issue you reported. Cheers,
          Erwan de FERRIERES committed 1308301 (1 file)
          Reviews: none

          Seems using ./ant for running install and tests is not detecting the class for cobertura. Testing if the jar is present is making it right. Resolves OFBIZ-4757

          Hide
          Pierre Smits added a comment -

          The above mentioned files are not generated, because in the file 'framework/base/build.xml following pieces of code in the 'init' target prevents the Cobertura worker to be started:

          <condition property="exclude.cobertura" value="org/ofbiz/base/config/Cobertura*.java">
          <not>
          <available classname="net.sourceforge.cobertura.instrument.ClassInstrumenter" classpathref="local.class.path"/>
          </not>
          </condition>

          and later on:

          <exclude name="$

          {exclude.cobertura}

          "/>

          In a testbed on Mac where I excluded (remmed out) the pieces of code, the run-tests targets runs properly and cobertura output is generated.

          Show
          Pierre Smits added a comment - The above mentioned files are not generated, because in the file 'framework/base/build.xml following pieces of code in the 'init' target prevents the Cobertura worker to be started: <condition property="exclude.cobertura" value="org/ofbiz/base/config/Cobertura*.java"> <not> <available classname="net.sourceforge.cobertura.instrument.ClassInstrumenter" classpathref="local.class.path"/> </not> </condition> and later on: <exclude name="$ {exclude.cobertura} "/> In a testbed on Mac where I excluded (remmed out) the pieces of code, the run-tests targets runs properly and cobertura output is generated.
          Pierre Smits made changes -
          Environment UBUNTU 10.04 LTS, Mac OS X 10.6.8
          Hide
          Erwan de FERRIERES added a comment -

          I've done the same with release11.04, and everything is working well too.

          Show
          Erwan de FERRIERES added a comment - I've done the same with release11.04, and everything is working well too.
          Erwan de FERRIERES made changes -
          Attachment log.ofbiz.cobertura [ 12519941 ]
          Hide
          Erwan de FERRIERES added a comment -

          Pierre,

          here is a complete log from the different steps to use cobertura with OFBiz trunk.

          Everything is working well.

          Show
          Erwan de FERRIERES added a comment - Pierre, here is a complete log from the different steps to use cobertura with OFBiz trunk. Everything is working well.
          Erwan de FERRIERES made changes -
          Field Original Value New Value
          Assignee Erwan de FERRIERES [ erwan ]
          Hide
          Pierre Smits added a comment -

          The target looks for runtime/logs/cobertura-base.dat and runtime/logs/cobertura-components.dat, but these file are not generated.

          Show
          Pierre Smits added a comment - The target looks for runtime/logs/cobertura-base.dat and runtime/logs/cobertura-components.dat, but these file are not generated.
          Pierre Smits created issue -

            People

            • Assignee:
              Erwan de FERRIERES
              Reporter:
              Pierre Smits
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development