Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.2
    • Fix Version/s: None
    • Component/s: None
    • Environment:
      Windows 7 x64
      .NET 3.5
      Maven 3.0.4
      Sonar 2.13.1
      sonar-csharp-gendarme-plugin-1.2
    • Number of attachments :
      0

      Description

      Gendarme plugin fails to load report XML if .NET code violates rule and suggestion has null character (I have to skip Gendarme to make the build):

      Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxParsingException: Invalid character
      reference: null character not allowed in XML content.
       at [row,col {unknown-source}]: [354,279]
              at org.sonar.runner.Runner.delegateExecution(Runner.java:155)
              at org.sonar.runner.Runner.execute(Runner.java:58)
              at org.sonar.runner.Main.main(Main.java:52)
      Caused by: [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxParsingException: Invalid character reference: null character not allowed in XML content.
       at [row,col {unknown-source}]: [354,279]
              at com.ctc.wstx.exc.WstxLazyException.throwLazily(WstxLazyException.java:43)
              at com.ctc.wstx.sr.StreamScanner.throwLazyError(StreamScanner.java:693)
              at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3617)
              at com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:845)
              at org.codehaus.staxmate.in.SMInputCursor.getText(SMInputCursor.java:457)
              at org.codehaus.staxmate.in.SMInputCursor.collectDescendantText(SMInputCursor.java:491)
              at org.codehaus.staxmate.in.SMInputCursor.collectDescendantText(SMInputCursor.java:522)
              at org.sonar.plugins.csharp.gendarme.results.GendarmeResultParser.parseTargetBloc(GendarmeResultParser.java:130)
              at org.sonar.plugins.csharp.gendarme.results.GendarmeResultParser.parseRuleDefects(GendarmeResultParser.java:116)
              at org.sonar.plugins.csharp.gendarme.results.GendarmeResultParser.parseRuleBlocs(GendarmeResultParser.java:99)
              at org.sonar.plugins.csharp.gendarme.results.GendarmeResultParser.parse(GendarmeResultParser.java:79)
              at org.sonar.plugins.csharp.gendarme.GendarmeSensor.analyseResults(GendarmeSensor.java:159)
              at org.sonar.plugins.csharp.gendarme.GendarmeSensor.analyse(GendarmeSensor.java:115)
              at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)
              at org.sonar.batch.phases.Phases.execute(Phases.java:93)
              at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)
              at org.sonar.batch.bootstrap.Module.start(Module.java:89)
              at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110)
              at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:105)
              at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100)
              at org.sonar.batch.bootstrap.Module.start(Module.java:89)
              at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96)
              at org.sonar.batch.bootstrap.Module.start(Module.java:89)
              at org.sonar.batch.Batch.execute(Batch.java:74)
              at org.sonar.runner.Launcher.executeBatch(Launcher.java:60)
              at org.sonar.runner.Launcher.execute(Launcher.java:53)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at org.sonar.runner.Runner.delegateExecution(Runner.java:152)
              ... 2 more
      Caused by: com.ctc.wstx.exc.WstxParsingException: Invalid character reference: null character not allowed in XML content.
       at [row,col {unknown-source}]: [354,279]
              at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:580)
              at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:453)
              at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:438)
              at com.ctc.wstx.sr.StreamScanner.checkAndExpandChar(StreamScanner.java:2303)
              at com.ctc.wstx.sr.StreamScanner.resolveSimpleEntity(StreamScanner.java:1185)
              at com.ctc.wstx.sr.BasicStreamReader.readTextSecondary(BasicStreamReader.java:4633)
              at com.ctc.wstx.sr.BasicStreamReader.readCoalescedText(BasicStreamReader.java:4084)
              at com.ctc.wstx.sr.BasicStreamReader.finishToken(BasicStreamReader.java:3659)
              at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3615)
      

        Activity

        Hide
        Juan Cuello added a comment -

        I was using Gendarme 2.8. Problem solved with Gendarme 2.10

        Show
        Juan Cuello added a comment - I was using Gendarme 2.8. Problem solved with Gendarme 2.10
        Hide
        Evgeny Mandrikov added a comment -

        Please do not create Jira tickets before discussion in Users Mailing List.

        Show
        Evgeny Mandrikov added a comment - Please do not create Jira tickets before discussion in Users Mailing List.
        Hide
        Juan Cuello added a comment -

        Tested on other project and fails with Gendarme 2.10 too

        Show
        Juan Cuello added a comment - Tested on other project and fails with Gendarme 2.10 too
        Hide
        Freddy Mallet added a comment -

        Hi Juan, please suggest a more meaningful ticket title. Thanks

        Show
        Freddy Mallet added a comment - Hi Juan, please suggest a more meaningful ticket title. Thanks
        Hide
        Alexandre Victoor added a comment -

        Juan, could you attach to this ticket an xml report where this parsing issue occurs ?

        Show
        Alexandre Victoor added a comment - Juan, could you attach to this ticket an xml report where this parsing issue occurs ?
        Hide
        Murali Mogalayapalli added a comment -

        I have the similar issue in 2.0 Eco system

        Show
        Murali Mogalayapalli added a comment - I have the similar issue in 2.0 Eco system
        Hide
        Alexandre Victoor added a comment -

        Hello
        Without any xml report I cannot fix this issue...
        Please attach an xml report provoking this parsing exception to this ticket

        Show
        Alexandre Victoor added a comment - Hello Without any xml report I cannot fix this issue... Please attach an xml report provoking this parsing exception to this ticket

          People

          • Assignee:
            Unassigned
            Reporter:
            Anonymous
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: