SonarQube C#
  1. SonarQube C#
  2. SONARCS-94

Error while trying to get the next element name

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5
    • Fix Version/s: 1.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP
    • Number of attachments :
      2

      Description

      Sonar DotNet 0.6-SNAPSHOT is throwing error at the end of processing

      [INFO] Error while trying to get the next element name
      ParseError at [row,col]:[1,75]
      Message: Can not call 'getLocalName(): cursor does not point to a valid node (curr event [null]; cursor state CLOSED)
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.sonar.plugin.dotnet.core.SonarPluginException: Error while trying to get the next element name
      	at org.sonar.plugin.dotnet.core.StaxHelper.findNextElementName(StaxHelper.java:131)
      	at org.sonar.plugin.dotnet.coverage.stax.PartCoverParsingStrategy.findFiles(PartCoverParsingStrategy.java:58)
      	at org.sonar.plugin.dotnet.coverage.stax.CoverageResultStaxParser.parse(CoverageResultStaxParser.java:109)
      	at org.sonar.plugin.dotnet.coverage.CoverageSensor.analyse(CoverageSensor.java:118)
      	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:60)
      	at org.sonar.batch.phases.Phases.execute(Phases.java:72)
      	at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:61)
      	at org.sonar.batch.Batch.analyzeModule(Batch.java:149)
      	at org.sonar.batch.Batch.analyzeModules(Batch.java:106)
      	at org.sonar.batch.Batch.execute(Batch.java:66)
      	at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:142)
      	at org.sonar.maven.SonarMojo.execute(SonarMojo.java:133)
      	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,75]
      Message: Can not call 'getLocalName(): cursor does not point to a valid node (curr event [null]; cursor state CLOSED)
      	at org.codehaus.staxmate.in.SMInputCursor.constructStreamException(SMInputCursor.java:1855)
      	at org.codehaus.staxmate.in.CursorBase._notAccessible(CursorBase.java:296)
      	at org.codehaus.staxmate.in.SMInputCursor.getLocalName(SMInputCursor.java:587)
      	at org.sonar.plugin.dotnet.core.StaxHelper.findNextElementName(StaxHelper.java:129)
      	... 30 more
      
      1. coverage-report.xml
        0.1 kB
        Luke Robertson
      2. coverage-report.xml
        59 kB
        Enguerrand RAYMOND

        Activity

        Hide
        Enguerrand RAYMOND added a comment -

        Hi RobinQiao,

        I already explained my mistake in my last post. The .NET PDB files generated by debug compilation for both Nunit DLL and project DLL (the DLLs to test) was not available in the same folder for coverage analysis as the DLL itself.

        Hope this helps.

        Kind regards,

        Show
        Enguerrand RAYMOND added a comment - Hi RobinQiao, I already explained my mistake in my last post. The .NET PDB files generated by debug compilation for both Nunit DLL and project DLL (the DLLs to test) was not available in the same folder for coverage analysis as the DLL itself. Hope this helps. Kind regards,
        Hide
        Luke Robertson added a comment - - edited

        Hi Alexandre,

        We are having the problem using the dotnet-0.5 plugin.
        We use Nunit as our testing framework.
        I have attached my coverage-report.xml at the top (unfortunately same name as previous attachment, mine is the one uploaded on 11/08/11

        Any help would be greatly appreciated, thanks

        Show
        Luke Robertson added a comment - - edited Hi Alexandre, We are having the problem using the dotnet-0.5 plugin. We use Nunit as our testing framework. I have attached my coverage-report.xml at the top (unfortunately same name as previous attachment, mine is the one uploaded on 11/08/11 Any help would be greatly appreciated, thanks
        Hide
        Marko Lahma added a comment -

        We have the same problem with .NET Plugin 1.0-RC2.

        Show
        Marko Lahma added a comment - We have the same problem with .NET Plugin 1.0-RC2.
        Hide
        RobinQiao added a comment - - edited

        Hi Marko,

        You can try to use the NCover for a quick test.
        My sonar can works with the NCover.
        By the way, my partcover works right on the windows xp and 2003, but cannot works on the windows 7 64-bit.

        Show
        RobinQiao added a comment - - edited Hi Marko, You can try to use the NCover for a quick test. My sonar can works with the NCover. By the way, my partcover works right on the windows xp and 2003, but cannot works on the windows 7 64-bit.
        Hide
        Alexandre Victoor added a comment -

        The "bug" was occuring when partcover failed, producing an empty xml report.
        Now an error message is logged but the analysis goes on.

        Show
        Alexandre Victoor added a comment - The "bug" was occuring when partcover failed, producing an empty xml report. Now an error message is logged but the analysis goes on.

          People

          • Assignee:
            Alexandre Victoor
            Reporter:
            Michal Wojcik
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: