I use sonarcloud with travis,upload cppunit xml reports has some error

cpp

(Freeeyes) #1

in June 30th, I did not have a problem with Travis + sonarcloud, but today I submitted my code as if the XML report generated by CPPUnit was prompted to parse the error. I checked Google. It seems that no similar problem has been found.

Travis LogURL:https://www.travis-ci.org/freeeyes/PSS/jobs/399015951

github: https://github.com/freeeyes/PSS

thank for your help.

[cppunit xml reports File]

    <?xml version="1.0" encoding='ISO-8859-1' standalone='yes' ?>
<TestRun>
  <FailedTests></FailedTests>
  <SuccessfulTests>
    <Test id="1">
      <Name>CUnit_ModuleMessageManager::Test_SendModuleMessage</Name>
    </Test>
    <Test id="2">
      <Name>CUnit_ModuleMessageManager::Test_SendFrameMessage</Name>
    </Test>
    <Test id="3">
      <Name>CUnit_TimerManager::Test_TimerManager</Name>
    </Test>
    <Test id="4">
      <Name>CUnit_ConnectUdp::Test_Connect_Udp_Server</Name>
    </Test>
    <Test id="5">
      <Name>CUnit_FrameCommand::Test_Frame_Command</Name>
    </Test>
    <Test id="6">
      <Name>CUnit_FrameCommand::Test_Frame_Command</Name>
    </Test>
    <Test id="7">
      <Name>CUnit_IPAccount::Test_IPAccount_Add</Name>
    </Test>
    <Test id="8">
      <Name>CUnit_IPAccount::Test_IPAccount_Count</Name>
    </Test>
    <Test id="9">
      <Name>CUnit_IPAccount::Test_IPAccount_LastConnectCount</Name>
    </Test>
    <Test id="10">
      <Name>CUnit_IPAccount::Test_IPAccount_GetInfo</Name>
    </Test>
    <Test id="11">
      <Name>CUnit_MessageDefine::Test_GetDyeingCommand</Name>
    </Test>
    <Test id="12">
      <Name>CUnit_MessageDefine::Test_GetDyeingIP</Name>
    </Test>
    <Test id="13">
      <Name>CUnit_MessageDefine::Test_GetFileInfo</Name>
    </Test>
    <Test id="14">
      <Name>CUnit_MessageDefine::Test_GetTrackIP</Name>
    </Test>
    <Test id="15">
      <Name>CUnit_MessageDefine::Test_GetLogLevel</Name>
    </Test>
    <Test id="16">
      <Name>CUnit_MessageDefine::Test_GetAIInfo</Name>
    </Test>
    <Test id="17">
      <Name>CUnit_MessageDefine::Test_GetConnectID</Name>
    </Test>
    <Test id="18">
      <Name>CUnit_MessageDefine::Test_GetMaxConnectCount</Name>
    </Test>
    <Test id="19">
      <Name>CUnit_MessageDefine::Test_GetListenInfo</Name>
    </Test>
    <Test id="20">
      <Name>CUnit_MessageDefine::Test_GetPoolSet</Name>
    </Test>
    <Test id="21">
      <Name>CUnit_Basehandler::Test_Udp_Common_Recv_Stream</Name>
    </Test>
    <Test id="22">
      <Name>CUnit_Basehandler::Test_Common_Recv_Stream</Name>
    </Test>
    <Test id="23">
      <Name>CUnit_Basehandler::Test_Tcp_Common_File_Message</Name>
    </Test>
    <Test id="24">
      <Name>CUnit_Basehandler::Test_Tcp_Common_ClientInfo</Name>
    </Test>
    <Test id="25">
      <Name>CUnit_Basehandler::Test_Tcp_Common_Send_Input_To_Cache</Name>
    </Test>
    <Test id="26">
      <Name>CUnit_Basehandler::Test_Tcp_Common_Manager_Timeout_CheckInfo</Name>
    </Test>
    <Test id="27">
      <Name>CUnit_ConnectTcp::Test_Connect_Tcp_Server</Name>
    </Test>
    <Test id="28">
      <Name>CUnit_Aes::Test_Aes</Name>
    </Test>
    <Test id="29">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ShowModule</Name>
    </Test>
    <Test id="30">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ClientMessageCount</Name>
    </Test>
    <Test id="31">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_CommandInfo</Name>
    </Test>
    <Test id="32">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_WorkThreadState</Name>
    </Test>
    <Test id="33">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ClientInfo</Name>
    </Test>
    <Test id="34">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ForbiddenIP</Name>
    </Test>
    <Test id="35">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ShowForbiddenList</Name>
    </Test>
    <Test id="36">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_LifedIP</Name>
    </Test>
    <Test id="37">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ServerConnectTCP</Name>
    </Test>
    <Test id="38">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ServerConnectUDP</Name>
    </Test>
    <Test id="39">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ShowProcessInfo</Name>
    </Test>
    <Test id="40">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ShowClientHisTory</Name>
    </Test>
    <Test id="41">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ShowAllCommandInfo</Name>
    </Test>
    <Test id="42">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ShowServerInfo</Name>
    </Test>
    <Test id="43">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ReConnectServer</Name>
    </Test>
    <Test id="44">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_CommandTimeout</Name>
    </Test>
    <Test id="45">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_CommandTimeoutclr</Name>
    </Test>
    <Test id="46">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_CommandDataLog</Name>
    </Test>
    <Test id="47">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_SetDebug</Name>
    </Test>
    <Test id="48">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ShowDebug</Name>
    </Test>
    <Test id="49">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_GetTrackCommand</Name>
    </Test>
    <Test id="50">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_GetConnectIPInfo</Name>
    </Test>
    <Test id="51">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_GetLogLevelInfo</Name>
    </Test>
    <Test id="52">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_GetThreadAI</Name>
    </Test>
    <Test id="53">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_GetWorkThreadTO</Name>
    </Test>
    <Test id="54">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_GetNickNameInfo</Name>
    </Test>
    <Test id="55">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_ShowListen</Name>
    </Test>
    <Test id="56">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_MonitorInfo</Name>
    </Test>
    <Test id="57">
      <Name>CUnit_ConsoleMessage::Test_DoMessage_PortList</Name>
    </Test>
    <Test id="58">
      <Name>CUnit_ConsoleMessage::Test_Do_Message_BuffPacket</Name>
    </Test>
    <Test id="59">
      <Name>CUnit_ConsolePromissions::Test_Promission_User</Name>
    </Test>
    <Test id="60">
      <Name>CUnit_AppConfig::Test_XML_Read</Name>
    </Test>
    <Test id="61">
      <Name>CUnit_AppConfig::Test_XML_Write</Name>
    </Test>
    <Test id="62">
      <Name>CUnit_CommandAccount::Test_CommandAccount_Init</Name>
    </Test>
    <Test id="63">
      <Name>CUnit_CommandAccount::Test_CommandAccount_Alert</Name>
    </Test>
    <Test id="64">
      <Name>CUnit_CommandAccount::Test_CommandAccount_Flow</Name>
    </Test>
    <Test id="65">
      <Name>CUnit_CommandAccount::Test_CommandAccount_PortList</Name>
    </Test>
    <Test id="66">
      <Name>CUnit_FileTestManager::Test_FileTestStart</Name>
    </Test>
    <Test id="67">
      <Name>CUnit_FileTestManager::Test_handle_timeout</Name>
    </Test>
    <Test id="68">
      <Name>CUnit_FileTestManager::Test_FileTestStop</Name>
    </Test>
    <Test id="69">
      <Name>CUnit_BuffPacket::Read_Write_BuffPacket</Name>
    </Test>
    <Test id="70">
      <Name>CUnit_BuffPacket::Read_Write_String_BuffPacket</Name>
    </Test>
    <Test id="71">
      <Name>CUnit_BuffPacket::Read_Write_Binary_BuffPacket</Name>
    </Test>
    <Test id="72">
      <Name>CUnit_BuffPacket::Check_Size_BuffPacket</Name>
    </Test>
    <Test id="73">
      <Name>CUnit_BuffPacket::Check_AddBuff</Name>
    </Test>
    <Test id="74">
      <Name>CUnit_BuffPacket::Check_RollBack</Name>
    </Test>
    <Test id="75">
      <Name>CUnit_BuffPacket::Check_String</Name>
    </Test>
  </SuccessfulTests>
  <Statistics>
    <Tests>75</Tests>
    <FailuresTotal>0</FailuresTotal>
    <Errors>0</Errors>
    <Failures>0</Failures>
  </Statistics>
</TestRun>

[sonar error log]

07:38:50.969 INFO: Sensor gcov [cpp] (done) | time=984ms
07:38:50.969 INFO: Sensor cppunit [cpp]
07:38:50.974 INFO: ------------------------------------------------------------------------
07:38:50.974 INFO: EXECUTION FAILURE
07:38:50.974 INFO: ------------------------------------------------------------------------
07:38:50.975 INFO: Total time: 12.715s
07:38:51.174 INFO: Final Memory: 61M/297M
07:38:51.174 INFO: ------------------------------------------------------------------------
07:38:51.174 ERROR: Error during SonarQube Scanner execution
java.lang.NoClassDefFoundError: org/sonar/api/utils/StaxParser$XmlStreamHandler
	at com.sonar.cpp.plugin.A.B.execute(na:2017)
	at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:45)
	at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:88)
	at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:62)
	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:74)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:166)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:300)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:295)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:269)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:131)
	at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.ClassNotFoundException: org.sonar.api.utils.StaxParser$XmlStreamHandler
	at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
	... 32 more
07:38:51.179 DEBUG: Execution getVersion
07:38:51.180 DEBUG: Execution stop

Sonarcloud with travis, upload cppunit xml reports has some error
(Fabrice Bellingard) #2

Hi,

this problem should be fixed by now, can you confirm?


(Freeeyes) #3

There is no problem at the moment, thanks for you help.