• Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • emma-plugin
    • None
    • Hudson 1.378, Emma 1.21, Solaris 10

      Since updating Hudson (1.371 to 1.378) and Emma (1.20 to 1.21) all our builds are failing due to a nullpointer in EmmaPublisher:

      ERROR: Publisher hudson.plugins.emma.EmmaPublisher aborted due to exception
      java.lang.NullPointerException
      at hudson.plugins.emma.EmmaPublisher.perform(EmmaPublisher.java:132)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558)
      at hudson.model.Build$RunnerImpl.post2(Build.java:157)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
      at hudson.model.Run.run(Run.java:1303)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:137)

      Same problem occurs with Version 1.20 of the Emma-Plugin which was installed previously.

          [JENKINS-7586] Null Pointer in EmmaPublisher

          lbrinkmann created issue -

          crbeng added a comment -

          I have the same problem.

          hudson version: 1.379
          emma version: 1.21

          Code coverage is one of the criteria for shipping our product. So this is quite a serious problem for us. Can this issue be escalated? Thanks.

          crbeng added a comment - I have the same problem. hudson version: 1.379 emma version: 1.21 Code coverage is one of the criteria for shipping our product. So this is quite a serious problem for us. Can this issue be escalated? Thanks.

          egilwilde added a comment -

          Error still there using Hudson 1.382.

          I would also appreciate it very much if this could be corrected.

          egilwilde added a comment - Error still there using Hudson 1.382. I would also appreciate it very much if this could be corrected.

          egilwilde added a comment -

          I have been monitoring this problem on our installation for a few days. Not all builds fail because of this, so it seems to be an intermittent problem.

          I have noted, though, that for all builds that fail, the copy of the coverage report that is saved in the build result/emma folder (on master) is incomplete. As if the copy operation was interrupted mid-file. All our builds are executed on SSH linux slaves, build results are stored on our linux/tomcat master.

          This incomplete copy seems to cause a SAXParseException when calling getResult() on the EmmaBuildAction. See attached tomcat log excerpt.

          egilwilde added a comment - I have been monitoring this problem on our installation for a few days. Not all builds fail because of this, so it seems to be an intermittent problem. I have noted, though, that for all builds that fail, the copy of the coverage report that is saved in the build result/emma folder (on master) is incomplete. As if the copy operation was interrupted mid-file. All our builds are executed on SSH linux slaves, build results are stored on our linux/tomcat master. This incomplete copy seems to cause a SAXParseException when calling getResult() on the EmmaBuildAction. See attached tomcat log excerpt.
          egilwilde made changes -
          Attachment New: EmmaException.txt [ 19926 ]

          I have the same problem using emma 1.21 and Hudson 1.387.
          With this setup the NullPointerException only accours sometimes and only on slaves not master.

          Could this issue be escalated?

          Christian Bremer added a comment - I have the same problem using emma 1.21 and Hudson 1.387. With this setup the NullPointerException only accours sometimes and only on slaves not master. Could this issue be escalated?

          Hi guys, I was setting up a job with Emma to show to a prospect when this exception occurred. I googled it and found this issue.

          As it seems there is no solution yet I tried a quick hack.

          My emma coverage xml files contain a comment right after the <?xml...?> tag. It looks like this:

          <?xml version="1.0" encoding="UTF-8"?><!-- EMMA v2.1.5320 (stable) report, generated Tue Jan 11 16:29:35 BRST 2011 -->

          I added a build step to invoke an ant build file with the following task:

          <replaceregexp file="coverage.xml" match="<!-.*->" replace="" byline="true" />

          I executed again my job and the exception was gone. It seems SAX has some problems with comments?

          This is a dirty workaround. If someone more experienced with SAX could take a look on how does it deal with comments. Maybe setting some option before calling the parser. I'll investigate it further when I find some free time. In the meanwhile I hope it helps you guys.

          Cheers
          Bruno

          Bruno P. Kinoshita added a comment - Hi guys, I was setting up a job with Emma to show to a prospect when this exception occurred. I googled it and found this issue. As it seems there is no solution yet I tried a quick hack. My emma coverage xml files contain a comment right after the <?xml...?> tag. It looks like this: <?xml version="1.0" encoding="UTF-8"?><!-- EMMA v2.1.5320 (stable) report, generated Tue Jan 11 16:29:35 BRST 2011 --> I added a build step to invoke an ant build file with the following task: <replaceregexp file="coverage.xml" match="<!- .* ->" replace="" byline="true" /> I executed again my job and the exception was gone. It seems SAX has some problems with comments? This is a dirty workaround. If someone more experienced with SAX could take a look on how does it deal with comments. Maybe setting some option before calling the parser. I'll investigate it further when I find some free time. In the meanwhile I hope it helps you guys. Cheers Bruno

          gjeudy added a comment -

          I'm seeing the same problems as egilwilde:

          Running hudson 1.384, tomcat 6.0.29, JDK 1.5.0_13

          1. Exception only occurs when build runs on slave
          2. Running with linux SSH slave mode
          3. coverage.xml is incomplete on master
          4. IOException Pipe is already closed (probably that is what causes the incomplete coverage.xml file)
          4. As a consequence SAXParseException in tomcat logs and later NPE causing the build to fail.

          See exception stacktraces logs extracted from tomcat.

          nairb774 added a comment - 02/Feb/11 10:28 AM

          Step 4.1 in gjeudy's post is JENKINS-8592 and I hope to have that solved in the coming week. This won't solve this issue, but I just wanted to note that the 'pipe already closed' exceptions is a known issue that will be hopefully fixed soon.

          gjeudy added a comment - I'm seeing the same problems as egilwilde: Running hudson 1.384, tomcat 6.0.29, JDK 1.5.0_13 1. Exception only occurs when build runs on slave 2. Running with linux SSH slave mode 3. coverage.xml is incomplete on master 4. IOException Pipe is already closed (probably that is what causes the incomplete coverage.xml file) 4. As a consequence SAXParseException in tomcat logs and later NPE causing the build to fail. See exception stacktraces logs extracted from tomcat. nairb774 added a comment - 02/Feb/11 10:28 AM Step 4.1 in gjeudy's post is JENKINS-8592 and I hope to have that solved in the coming week. This won't solve this issue, but I just wanted to note that the 'pipe already closed' exceptions is a known issue that will be hopefully fixed soon.
          gjeudy made changes -
          Attachment New: gjeudy_tomcat_stacktraces.txt [ 20200 ]

          nrhalland added a comment -

          Same problem

          Hudson 1.395
          Emma Plugin 1.24

          @kinow/Bruno Thanks for the suggestion, I tried the same fix, but removing the comments doesn't fix the problem.

          nrhalland added a comment - Same problem Hudson 1.395 Emma Plugin 1.24 @kinow/Bruno Thanks for the suggestion, I tried the same fix, but removing the comments doesn't fix the problem.

            kohsuke Kohsuke Kawaguchi
            lbrinkmann lbrinkmann
            Votes:
            17 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved: