Sonar

Undeclared entites in XML report file make sonar crash

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9.1
  • Component/s: API
  • Labels:
    None
  • Number of attachments :
    3

Description

Undeclared XML entities in PMD or other XML report file make the generic XpathParser crash

See SONAR-129

  1. pmd.xml
    16/Jun/09 5:57 AM
    238 kB
    Edgar Miller
  2. pmd.xml
    01/Jun/09 9:36 AM
    396 kB
    EJ Ciramella
  3. problem.txt
    16/Jun/09 6:23 AM
    14 kB
    Edgar Miller

Activity

Hide
Cédric Munger added a comment -

Fixed with the new StaxParser, which supports undeclared XML entities

Show
Cédric Munger added a comment - Fixed with the new StaxParser, which supports undeclared XML entities
Hide
EJ Ciramella added a comment -

As requested by Cedric Munger - here is the pmd result file that has errors.

Show
EJ Ciramella added a comment - As requested by Cedric Munger - here is the pmd result file that has errors.
Hide
Cédric Munger added a comment -

Thanks for the provided XML file, your file contains some illegal ISO control chars, no illegal XML entities. I presume that these control chars are some chars that are coded in your classes and PMD simple recopy them and creates a bogus XML report. There's unfortunatly no clean solution, the Stax parser we're using simply does not handles it and generates an error during parsing. The solution is to replace found control chars by simple spaces during file reading to avoid to make the parser crash. This solution will be available in sonar 1.9.1

Regards.

Show
Cédric Munger added a comment - Thanks for the provided XML file, your file contains some illegal ISO control chars, no illegal XML entities. I presume that these control chars are some chars that are coded in your classes and PMD simple recopy them and creates a bogus XML report. There's unfortunatly no clean solution, the Stax parser we're using simply does not handles it and generates an error during parsing. The solution is to replace found control chars by simple spaces during file reading to avoid to make the parser crash. This solution will be available in sonar 1.9.1 Regards.
Hide
Edgar Miller added a comment -

with Version 1.9.2 the Problem still exists ( at least in my hudson build sonar call )

Show
Edgar Miller added a comment - with Version 1.9.2 the Problem still exists ( at least in my hudson build sonar call )
Hide
Cédric Munger added a comment - - edited

Hi,

Can you please post more informations ? a stack trace and if possible the XML report that makes sonar crash.

Thanks

Show
Cédric Munger added a comment - - edited Hi, Can you please post more informations ? a stack trace and if possible the XML report that makes sonar crash. Thanks
Hide
Edgar Miller added a comment -

Whis is the result screen in hudson, the xml file with the Problem, and the Exception.

Need some more information?

Thanks for response.

EdgarM

Show
Edgar Miller added a comment - Whis is the result screen in hudson, the xml file with the Problem, and the Exception. Need some more information? Thanks for response. EdgarM
Hide
Cédric Munger added a comment -

OK this is another bug with the taglist plugin see : http://jira.codehaus.org/browse/SONARPLUGINS-97
I've tried to fix it (kind of an hack..) but i cannot give guarantee since the root of the problem is the taglist maven plugin which is not handling correctly charsets
Upgrade your taglist plugin to version 0.4 and reopen SONARPLUGINS-97 if it is still not working.

Regards

Show
Cédric Munger added a comment - OK this is another bug with the taglist plugin see : http://jira.codehaus.org/browse/SONARPLUGINS-97 I've tried to fix it (kind of an hack..) but i cannot give guarantee since the root of the problem is the taglist maven plugin which is not handling correctly charsets Upgrade your taglist plugin to version 0.4 and reopen SONARPLUGINS-97 if it is still not working. Regards
Hide
Edgar Miller added a comment -

Hi Cédric,

thanks for the infromation, I am right now testing the new plugin.

regards
EdgarM

Show
Edgar Miller added a comment - Hi Cédric, thanks for the infromation, I am right now testing the new plugin. regards EdgarM

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: