jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Sonar .NET Ecosystem
  • Sonar .NET Ecosystem
  • SONARDOTNT-160

Gendarme

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Reopened Reopened
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.2
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    • .net
    • exception
    • gendarme
    • maven
    • plugin
    • sonar
  • 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

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Juan Cuello added a comment - 02/Mar/12 6:32 AM

I was using Gendarme 2.8. Problem solved with Gendarme 2.10

Show
Juan Cuello added a comment - 02/Mar/12 6:32 AM I was using Gendarme 2.8. Problem solved with Gendarme 2.10
Hide
Permalink
Evgeny Mandrikov added a comment - 02/Mar/12 6:38 AM

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

Show
Evgeny Mandrikov added a comment - 02/Mar/12 6:38 AM Please do not create Jira tickets before discussion in Users Mailing List.
Hide
Permalink
Juan Cuello added a comment - 02/Mar/12 6:46 AM

Tested on other project and fails with Gendarme 2.10 too

Show
Juan Cuello added a comment - 02/Mar/12 6:46 AM Tested on other project and fails with Gendarme 2.10 too
Hide
Permalink
Freddy Mallet added a comment - 02/Mar/12 6:54 AM

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

Show
Freddy Mallet added a comment - 02/Mar/12 6:54 AM Hi Juan, please suggest a more meaningful ticket title. Thanks
Hide
Permalink
Alexandre Victoor added a comment - 18/Mar/12 4:27 PM

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

Show
Alexandre Victoor added a comment - 18/Mar/12 4:27 PM Juan, could you attach to this ticket an xml report where this parsing issue occurs ?
Hide
Permalink
Murali Mogalayapalli added a comment - 20/Dec/12 3:10 PM

I have the similar issue in 2.0 Eco system

Show
Murali Mogalayapalli added a comment - 20/Dec/12 3:10 PM I have the similar issue in 2.0 Eco system
Hide
Permalink
Alexandre Victoor added a comment - 02/Mar/13 8:41 AM

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 - 02/Mar/13 8:41 AM Hello Without any xml report I cannot fix this issue... Please attach an xml report provoking this parsing exception to this ticket

People

  • Assignee:
    Alexandre Victoor
    Reporter:
    Juan Cuello
Vote (0)
Watch (2)

Dates

  • Created:
    02/Mar/12 5:29 AM
    Updated:
    02/Mar/13 8:41 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.