INFO: Sensor XmlFileSensor
INFO: 2 source files to be analyzed
EXEC : error : Unable to parse xml file: D:\XXXXXX.xml [D:\XXXXX.targets]
org.xml.sax.SAXParseException: XML-Dokumentstrukturen m・sen innerhalb derselben Entity beginnen und enden.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.endEntity(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.seekCloseOfStartTag(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) ~[na:1.8.0_92]
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source) ~[na:1.8.0_92]
at javax.xml.parsers.SAXParser.parse(Unknown Source) ~[na:1.8.0_92]
at org.sonar.java.xml.XmlParser.parseXML(XmlParser.java:59) ~[java-frontend-4.1.jar:na]
at org.sonar.java.xml.XmlAnalyzer.simpleScan(XmlAnalyzer.java:95) [java-frontend-4.1.jar:na]
at org.sonar.java.xml.XmlAnalyzer.scan(XmlAnalyzer.java:81) [java-frontend-4.1.jar:na]
at org.sonar.plugins.java.XmlFileSensor.execute(XmlFileSensor.java:55) [sonar-java-plugin-4.1.jar:na]
at org.sonar.batch.sensor.SensorWrapper.analyse(SensorWrapper.java:57) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:234) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.batch.task.ScanTask.execute(ScanTask.java:47) [sonar-scanner-engine-shaded-5.6.1.jar:na]
at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86) [sonar-scanner-engine-shaded-5.6.1.jar:na]
INFO: Sensor XmlFileSensor (done) | time=112ms
Unfortunately, I cannot uninstall the java plugin because we need it for the java projects ;)
Is it normal that the java plugin parses the xml files whether the entire project contains no java file?
Best regards
SonarQube 5.6.1
Java 4.1
C# 5.3.1
XML 1.4.1
MsBuildRunner 2.1
Thanks for your reply.
You are right. This is an error in the log and the analysis is finishing. But the msbuild runner returns the error code -1, which breaks our tfs build.
This have the impact, that our tfs build is always red or I must ignore the the msbuild runner error code, whereby I miss other msbuild runner errors.
--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/438ee52b-d07b-4a53-a3ca-53022afd419c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The Sensor of the XML plugin can´t analyze the xml file too. Does this cases the -1 error code? If I uninstall the XML-Plugin, all works fine.
The attachment of the email contains the log of a small project to reproduce the scenario.
The log contains two SAXParseExceptions. One Exception is thrown by the XMLSenor (XML Pluginin) and one by the XmlFileSensor (Java-Plugin). If I uninstall the Java plugin all works fine, no -1 error code.
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="RunSonarQube">
<Exec Command=""$(MSBuildProjectDirectory)\MSBuildRunner2_1\MSBuild.SonarQube.Runner.exe" begin /key:ParseErrorBug /name:ParseErrorBug /version:1.0.0.0 " />
<MSBuild Projects="$(MSBuildProjectDirectory)\ParseErrorBug\ParseErrorBug.sln" Properties="Configuration=Release"/>
<Exec Command=""$(MSBuildProjectDirectory)\MSBuildRunner2_1\MSBuild.SonarQube.Runner.exe" end" />
</Target>
</Project>
I have the following question. The XML-Plugin logs the SAXParseException as INFO and the Java-Plugin as ERROR. Which is the correct log level? Should the JAVA-Plugin log the SAXParseException as INFO?
Regards,
Marcel
Thanks, the file exclusion works.
This morning I updated the C# Plugin from 5.3.1 to 5.3.2 and I using the MSBuildRunner 2.1.
In my case the sonar-runner and the post-processor completed successfully although there was one parse error which is also a msbuild error.
Let me know if you need some information to reproduce the scenario.
Regards,
Marcel
The link https://1drv.ms/u/s!AhcJ5tSLRCVZgbA4h-WQYvRicv8DPQ contains a reproducer which works for me with a new clear SonarQube 5.6.1 Server.
EXEC: error : Unable to parse xml file ….
The XML-Plugin can’t analyze the XML File too and logs a warning.
INFO: Cause:
org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 7.529s
INFO: Final Memory: 48M/333M
INFO: ------------------------------------------------------------------------
DEBUG: Execution getVersion
DEBUG: Execution stop
Process returned exit code 0
The SonarQube Scanner has finished
09:48:56.817 Creating a summary markdown file...
09:48:56.818 Analysis results: http://localhost:9000/dashboard/index/ParseErrorBug
Post-processing succeeded.
Regards,
Marcel
Sorry for my late reply.
I tried the workaround with the attribute IgnoreStandardErrorWarningFormat and it works for me.
Regards
Marcel