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)
  • Sonar Plugins
  • SONARPLUGINS-97

Parse xml error when comment isn't encoding in utf8

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: TAGLIST-0.2
  • Fix Version/s: TAGLIST-0.4
  • Component/s: TagList
  • Labels:
    None

Description

Our sources are encoding in ANSI and some comments contain accent.
Sonar can't parse the xml report !

full stacktrace :
Caused by: org.sonar.plugins.api.maven.xml.XmlParserException: can not parse xml : <?xml version="1.0" encoding="UTF-8"?><report>
<tags>
<tag name="@todo" count="0" />
<tag name="@deprecrated" count="0" />
<tag name="FIXME" count="0" />
<tag name="TODO" count="2">
<files>
<file name="org.my.project.MyTransformer" count="2">
<comments>
<comment>
<lineNumber>173</lineNumber>
<comment>Améliorer la prise en charge des types de produits</comment>
</comment>
<comment>
<lineNumber>174</lineNumber>
<comment>Interpréter le type selon le contenu des champs</comment>
</comment>
</comments>
</file>
</files>
</tag>
<tag name="NO_PMD" count="0" />
</tags>
</report>
at org.sonar.plugins.api.maven.xml.XpathParser.parse(XpathParser.java:119)
at org.sonar.plugins.api.maven.xml.XpathParser.parse(XpathParser.java:108)
at org.sonar.plugins.api.maven.xml.XpathParser.parse(XpathParser.java:92)
at org.sonar.plugins.taglist.TaglistViolationsXmlParser.populateTaglistViolation(TaglistViolationsXmlParser.java:56)
at org.sonar.plugins.taglist.TaglistMavenCollector.collect(TaglistMavenCollector.java:60)
at org.sonar.mojo.InternalMojo.executeCollectors(InternalMojo.java:294)
at org.sonar.mojo.InternalMojo.processModules(InternalMojo.java:176)
at org.sonar.mojo.InternalMojo.execute(InternalMojo.java:160)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82)
... 20 more
Caused by: org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
at org.sonar.plugins.api.maven.xml.XpathParser.parse(XpathParser.java:114)
... 29 more

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Nicolas Coquelet added a comment - 28/May/09 9:12 AM

It's a maven taglib bug.

http://jira.codehaus.org/browse/MTAGLIST-40

=> CLOSED

Show
Nicolas Coquelet added a comment - 28/May/09 9:12 AM It's a maven taglib bug. http://jira.codehaus.org/browse/MTAGLIST-40 => CLOSED
Hide
Permalink
Cédric Munger added a comment - 12/Jun/09 6:38 AM

Fixed, should be ok even if taglist maven plugin 2.4 still not released

Show
Cédric Munger added a comment - 12/Jun/09 6:38 AM Fixed, should be ok even if taglist maven plugin 2.4 still not released

People

  • Assignee:
    Cédric Munger
    Reporter:
    Nicolas Coquelet
Vote (0)
Watch (0)

Dates

  • Created:
    28/May/09 4:01 AM
    Updated:
    08/Jul/09 4:48 PM
    Resolved:
    12/Jun/09 6:38 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.