• 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

          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.

          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.

          A. Ullrich added a comment - - edited

          We have the same issue with Jenkins 1.399 and Emma Plugin 1.24.

          Like mentioned in the comment above the coverage.xml file coming from the slave is incomplete.

          A. Ullrich added a comment - - edited We have the same issue with Jenkins 1.399 and Emma Plugin 1.24. Like mentioned in the comment above the coverage.xml file coming from the slave is incomplete.

          Andries Inzé added a comment -

          Also in 1.400 and Emma 1.24

          Andries Inzé added a comment - Also in 1.400 and Emma 1.24

          gjeudy added a comment -

          still in 1.400 with emma 1.21
          only happens when running emma plugin on a slave machine; it happens intermittently.

          gjeudy added a comment - still in 1.400 with emma 1.21 only happens when running emma plugin on a slave machine; it happens intermittently.

          Andries Inzé added a comment -

          Andries Inzé added a comment - It's fixed in http://issues.hudson-ci.org/browse/HUDSON-7586 btw

          Any chance of applying the Hudson fix to Jenkins?

          Maarten Dirkse added a comment - Any chance of applying the Hudson fix to Jenkins?

          Mark Waite added a comment -

          The Jenkins emma plugin is deprecated. The functionality of the emma plugin has been replaced by the JaCoCo plugin

          Mark Waite added a comment - The Jenkins emma plugin is deprecated. The functionality of the emma plugin has been replaced by the JaCoCo plugin

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

              Created:
              Updated:
              Resolved: