hudson.util.IOException2: Failed to read /var/lib/jenkins/jobs/risk-alerts_site/workspace/credit-pool/target/surefire-reports/TEST-com.ften.creditpool.CreditPoolBeanTest.xml

Jenkins JIRA | scooper4711 | 5 years ago
  1. 0

    When generating a website with mvn clean site site:deploy, I will consistently get a ClassCastException when jenkins is trying to parse the junit surefire reports. This does not happen if I run the command from the command-line, and interestingly enough it doesn't happen for the non-site build (e.g. mvn clean deploy) ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.ften.creditpool.latency.ThroughputStatsTest Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.566 sec Running com.ften.creditpool.latency.ThroughputCreditPoolTest Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec Running com.ften.creditpool.latency.MinMaxAverageTest Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec Running com.ften.creditpool.audit.AuditingCreditPoolTest Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec Running com.ften.creditpool.CreditPoolBeanTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec Results : Tests run: 29, Failures: 0, Errors: 0, Skipped: 0 mojoSucceeded org.apache.maven.plugins:maven-surefire-plugin:2.12(default-test) [JENKINS] Recording test results hudson.util.IOException2: Failed to read /var/lib/jenkins/jobs/risk-alerts_site/workspace/credit-pool/target/surefire-reports/TEST-com.ften.creditpool.CreditPoolBeanTest.xml at hudson.tasks.junit.TestResult.parse(TestResult.java:244) at hudson.tasks.junit.TestResult.parse(TestResult.java:163) at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:141) at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:421) at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:403) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeForkedExecutions(DefaultLifecycleExecutor.java:173) at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildReportPlugin(DefaultMavenReportExecutor.java:284) at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildMavenReports(DefaultMavenReportExecutor.java:150) at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getReports(AbstractSiteRenderingMojo.java:247) at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:121) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:98) at hudson.maven.Maven3Builder.call(Maven3Builder.java:64) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory at org.dom4j.io.SAXReader.read(SAXReader.java:484) at org.dom4j.io.SAXReader.read(SAXReader.java:264) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:112) at hudson.tasks.junit.TestResult.parse(TestResult.java:227) ... 44 more Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory at org.dom4j.DocumentFactory.getInstance(DocumentFactory.java:97) at org.dom4j.io.SAXReader.getDocumentFactory(SAXReader.java:645) at org.dom4j.io.SAXReader.createContentHandler(SAXReader.java:969) at org.dom4j.io.SAXReader.read(SAXReader.java:449) ... 47 more forkedProjectSucceeded com.ften.creditpool:credit-pool:0.0.2-SNAPSHOT

    Jenkins JIRA | 5 years ago | scooper4711
    hudson.util.IOException2: Failed to read /var/lib/jenkins/jobs/risk-alerts_site/workspace/credit-pool/target/surefire-reports/TEST-com.ften.creditpool.CreditPoolBeanTest.xml
  2. 0

    When generating a website with mvn clean site site:deploy, I will consistently get a ClassCastException when jenkins is trying to parse the junit surefire reports. This does not happen if I run the command from the command-line, and interestingly enough it doesn't happen for the non-site build (e.g. mvn clean deploy) ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.ften.creditpool.latency.ThroughputStatsTest Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.566 sec Running com.ften.creditpool.latency.ThroughputCreditPoolTest Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec Running com.ften.creditpool.latency.MinMaxAverageTest Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec Running com.ften.creditpool.audit.AuditingCreditPoolTest Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec Running com.ften.creditpool.CreditPoolBeanTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec Results : Tests run: 29, Failures: 0, Errors: 0, Skipped: 0 mojoSucceeded org.apache.maven.plugins:maven-surefire-plugin:2.12(default-test) [JENKINS] Recording test results hudson.util.IOException2: Failed to read /var/lib/jenkins/jobs/risk-alerts_site/workspace/credit-pool/target/surefire-reports/TEST-com.ften.creditpool.CreditPoolBeanTest.xml at hudson.tasks.junit.TestResult.parse(TestResult.java:244) at hudson.tasks.junit.TestResult.parse(TestResult.java:163) at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:141) at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:421) at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:403) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeForkedExecutions(DefaultLifecycleExecutor.java:173) at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildReportPlugin(DefaultMavenReportExecutor.java:284) at org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildMavenReports(DefaultMavenReportExecutor.java:150) at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getReports(AbstractSiteRenderingMojo.java:247) at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:121) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:98) at hudson.maven.Maven3Builder.call(Maven3Builder.java:64) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory at org.dom4j.io.SAXReader.read(SAXReader.java:484) at org.dom4j.io.SAXReader.read(SAXReader.java:264) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:112) at hudson.tasks.junit.TestResult.parse(TestResult.java:227) ... 44 more Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory at org.dom4j.DocumentFactory.getInstance(DocumentFactory.java:97) at org.dom4j.io.SAXReader.getDocumentFactory(SAXReader.java:645) at org.dom4j.io.SAXReader.createContentHandler(SAXReader.java:969) at org.dom4j.io.SAXReader.read(SAXReader.java:449) ... 47 more forkedProjectSucceeded com.ften.creditpool:credit-pool:0.0.2-SNAPSHOT

    Jenkins JIRA | 5 years ago | scooper4711
    hudson.util.IOException2: Failed to read /var/lib/jenkins/jobs/risk-alerts_site/workspace/credit-pool/target/surefire-reports/TEST-com.ften.creditpool.CreditPoolBeanTest.xml
  3. 0

    I've found exactly the same issue as "SONAR-20", but the resolved issue is still reproducing. When i try to use sonar:sonar plugin in Hudson job I've got the error "org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory" (stack trace listed below). It happens after sonar runs unit test. Tests run: 43, Failures: 0, Errors: 0, Skipped: 0 07:56:23,606 INFO Thread-13 GenericApplicationContext:doClose:1002 - Closing org.springframework.context.support.GenericApplicationContext@5f0ab09f: startup date [Sat Dec 10 07:56:14 UTC 2011]; root of context hierarchy 07:56:23,617 INFO Thread-13 DefaultListableBeanFactory:destroySingletons:422 - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3fe2670b: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,props,bootstrapBeforeDBLoaded,bootstrapAfterDBLoaded,mainDataSource,mainTransactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,mainSessionFactory,liquibaseExecutor,configChangeObserver,propertyDAO,userDAO,webGroupDAO,webUserDAO,propertyService,clientService,webGroupService,webUserService,cardIdGeneratorService]; root of factory hierarchy Flushing results... 07:56:23,637 INFO Thread-13 AnnotationSessionFactoryBean:destroy:246 - Closing Hibernate SessionFactory Flushing results done Cobertura: Loaded information on 59 classes. Cobertura: Saved information on 59 classes. [HUDSON] Recording test results hudson.util.IOException2: Failed to read /var/lib/hudson/jobs/FPKLOYAL-sonar/workspace/projectname-library/target/surefire-reports/TEST-projectname.dao.impl.PropertyDAOImplTest.xml at hudson.tasks.junit.TestResult.parse(TestResult.java:214) at hudson.tasks.junit.TestResult.parse(TestResult.java:155) at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:126) at hudson.maven.Maven3Builder$MavenExecutionListener.reccordMojoSucceeded(Maven3Builder.java:568) at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:531) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:85) at org.sonar.maven3.Maven3PluginExecutor.concreteExecute(Maven3PluginExecutor.java:49) at org.sonar.batch.AbstractMavenPluginExecutor.execute(AbstractMavenPluginExecutor.java:49) at org.sonar.batch.AbstractMavenPluginExecutor.execute(AbstractMavenPluginExecutor.java:38) at org.sonar.batch.phases.InitializersExecutor.executeMavenPlugin(InitializersExecutor.java:73) at org.sonar.batch.phases.InitializersExecutor.execute(InitializersExecutor.java:60) at org.sonar.batch.phases.Phases.execute(Phases.java:90) at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:111) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:106) at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:101) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:102) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.Batch.execute(Batch.java:100) at org.sonar.maven3.SonarMojo.executeBatch(SonarMojo.java:146) at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:136) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113) at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65) at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:146) at hudson.maven.Maven3Builder.call(Maven3Builder.java:124) at hudson.maven.Maven3Builder.call(Maven3Builder.java:71) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:283) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory at org.dom4j.io.SAXReader.read(SAXReader.java:484) at org.dom4j.io.SAXReader.read(SAXReader.java:264) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:98) at hudson.tasks.junit.TestResult.parse(TestResult.java:199) ... 67 more Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory at org.dom4j.DocumentFactory.getInstance(DocumentFactory.java:97) at org.dom4j.io.SAXReader.getDocumentFactory(SAXReader.java:645) at org.dom4j.io.SAXReader.createContentHandler(SAXReader.java:969) at org.dom4j.io.SAXReader.read(SAXReader.java:449) ... 70 more forkedProjectSucceeded ru.rzd:projectname-library0.3-SNAPSHOT

    SonarSource JIRA | 5 years ago | Alexey Kutuzov
    hudson.util.IOException2: Failed to read /var/lib/hudson/jobs/FPKLOYAL-sonar/workspace/projectname-library/target/surefire-reports/TEST-projectname.dao.impl.PropertyDAOImplTest.xml
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    {{Started by user anonymous Building remotely on Dev-Build3 Updating http://code/sw/iE2/trunk/iBO-iE2 At revision 23722 no change for http://code/sw/iE2/trunk/iBO-iE2 since the previous build No emails were triggered. Parsing POMs [iBO-iE2] $ "C:\Program Files\Java\jdk1.6.0_20/bin/java" -Xmx512m -XX:MaxPermSize=128m -Dmaven.test.failure.ignore=false -cp "C:\HudsonHome\Slave1\maven-agent.jar;C:\Program Files\apache-maven-2.2.1\boot\classworlds-1.1.jar" hudson.maven.agent.Main "C:\Program Files\apache-maven-2.2.1" C:\HudsonHome\Slave1\slave.jar C:\HudsonHome\Slave1\maven-interceptor.jar 58208 C:\HudsonHome\Slave1\maven2.1-interceptor.jar <===[HUDSON REMOTING CAPACITY]===>���channel started Executing Maven: -B -f C:\HudsonHome\Slave1\workspace\iBO-iE2\iBO-iE2\pom.xml clean -X -U -e org.codehaus.mojo:sonar-maven-plugin:1.0-beta-2:sonar + Error stacktraces are turned on. Apache Maven 2.2.1 (r801777; 2009-08-07 07:16:01+1200) Java version: 1.6.0_20 }} ... {{Results : Tests run: 73, Failures: 0, Errors: 0, Skipped: 0 Flushing results... Flushing results done Cobertura: Loaded information on 330 classes. Cobertura: Saved information on 330 classes. [HUDSON] Recording test results [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar Embedded error: Unable to execute maven plugin org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory [INFO] ------------------------------------------------------------------------ [DEBUG] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at hudson.maven.agent.Main.launch(Main.java:165) at hudson.maven.MavenBuilder.call(MavenBuilder.java:165) at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:744) at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:688) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103) at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79) at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 28 more Caused by: org.sonar.api.utils.SonarException: Unable to execute maven plugin at org.sonar.maven.Maven2PluginExecutor.execute(Maven2PluginExecutor.java:67) at org.sonar.maven.Maven2PluginExecutor.execute(Maven2PluginExecutor.java:46) at org.sonar.batch.SensorsExecutor.executeMavenPlugin(SensorsExecutor.java:69) at org.sonar.batch.SensorsExecutor.execute(SensorsExecutor.java:55) at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:59) at org.sonar.batch.Batch.analyzeProject(Batch.java:120) at org.sonar.batch.Batch.analyzeProjects(Batch.java:83) at org.sonar.batch.Batch.execute(Batch.java:58) at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:142) at org.sonar.maven.SonarMojo.execute(SonarMojo.java:133) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98) ... 33 more Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test': Failed to read C:\HudsonHome\Slave1\workspace\iBO-iE2\iBO-iE2\target\surefire-reports\TEST-com.energyintellect.TestDateHelperCheckTimeAlign.xml at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:698) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1205) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1038) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:643) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65) at org.sonar.maven.Maven2PluginExecutor.execute(Maven2PluginExecutor.java:64) ... 45 more Caused by: org.apache.maven.plugin.PluginManagerException: Failed to read C:\HudsonHome\Slave1\workspace\iBO-iE2\iBO-iE2\target\surefire-reports\TEST-com.energyintellect.TestDateHelperCheckTimeAlign.xml at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:196) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 56 more Caused by: hudson.util.IOException2: Failed to read C:\HudsonHome\Slave1\workspace\iBO-iE2\iBO-iE2\target\surefire-reports\TEST-com.energyintellect.TestDateHelperCheckTimeAlign.xml at hudson.tasks.junit.TestResult.parse(TestResult.java:214) at hudson.tasks.junit.TestResult.parse(TestResult.java:155) at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:108) at hudson.maven.MavenModuleSetBuild$Builder.postExecute(MavenModuleSetBuild.java:822) at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:300) at hudson.maven.agent.PluginManagerInterceptor$1MojoIntercepterImpl.callPost(PluginManagerInterceptor.java:170) at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:183) ... 57 more Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory at org.dom4j.io.SAXReader.read(SAXReader.java:484) at org.dom4j.io.SAXReader.read(SAXReader.java:264) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:99) at hudson.tasks.junit.TestResult.parse(TestResult.java:199) ... 63 more Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory at org.dom4j.DocumentFactory.getInstance(DocumentFactory.java:97) at org.dom4j.io.SAXReader.getDocumentFactory(SAXReader.java:645) at org.dom4j.io.SAXReader.createContentHandler(SAXReader.java:969) at org.dom4j.io.SAXReader.read(SAXReader.java:449) ... 66 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 minutes 14 seconds [INFO] Finished at: Fri Dec 17 14:34:07 GMT+12:00 2010 [INFO] Final Memory: 51M/167M [INFO] ------------------------------------------------------------------------ Waiting for Hudson to finish collecting data channel stopped [WARNINGS] Skipping publisher since build result is FAILURE Email was triggered for: Failure Email was triggered for: Still Failing Trigger Failure was overridden by another trigger and will not send an email. Sending email for trigger: Still Failing An attempt to send an e-mail to empty list of recipients, ignored. Finished: FAILURE}} More details in the attachment. This problem doesn't occur if I start the same maven command locally on that slave computer or if I start the test run on the Hudson master. So the problem must be somewhere in the slave agent starting the maven job. The Hudson Sonar plugin doesn't work here as it constantly fails to load its dependencies under Maven 2.2.1, but this is a bug from the maven-sonar-plugin - that is why we hardcoded the plugin version number in the call above

    Jenkins JIRA | 6 years ago | schlaufuchs
    org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar

    41 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory

      at org.dom4j.DocumentFactory.getInstance()
    2. dom4j
      SAXReader.read
      1. org.dom4j.DocumentFactory.getInstance(DocumentFactory.java:97)
      2. org.dom4j.io.SAXReader.getDocumentFactory(SAXReader.java:645)
      3. org.dom4j.io.SAXReader.createContentHandler(SAXReader.java:969)
      4. org.dom4j.io.SAXReader.read(SAXReader.java:449)
      5. org.dom4j.io.SAXReader.read(SAXReader.java:264)
      5 frames
    3. Hudson
      TestResult.parse
      1. hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:112)
      2. hudson.tasks.junit.TestResult.parse(TestResult.java:227)
      3. hudson.tasks.junit.TestResult.parse(TestResult.java:163)
      3 frames
    4. Legacy Maven 2 job type Plugin
      SurefireArchiver.postExecute
      1. hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:141)
      1 frame
    5. Hudson Maven Embedder
      Maven3Builder$MavenExecutionListener.mojoSucceeded
      1. hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:421)
      2. hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:403)
      2 frames
    6. Maven Core
      DefaultLifecycleExecutor.executeForkedExecutions
      1. org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87)
      2. org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
      3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228)
      4. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      5. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      6. org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
      7. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeForkedExecutions(DefaultLifecycleExecutor.java:173)
      7 frames
    7. Apache Maven Reporting Executor
      DefaultMavenReportExecutor.buildMavenReports
      1. org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildReportPlugin(DefaultMavenReportExecutor.java:284)
      2. org.apache.maven.reporting.exec.DefaultMavenReportExecutor.buildMavenReports(DefaultMavenReportExecutor.java:150)
      2 frames
    8. Apache Maven Site Plugin
      SiteMojo.execute
      1. org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getReports(AbstractSiteRenderingMojo.java:247)
      2. org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:121)
      2 frames
    9. Maven Plugin
      DefaultBuildPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      1 frame
    10. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      6. org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      9. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      9 frames
    11. M3 Interceptor
      Maven3Launcher.main
      1. org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
      1 frame
    12. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:601)
      4 frames
    13. Plexus
      Launcher.launch
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
      2 frames
    14. M3 Agent
      Maven3Main.launch
      1. org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
      1 frame
    15. Hudson Maven Embedder
      Maven3Builder.call
      1. hudson.maven.Maven3Builder.call(Maven3Builder.java:98)
      2. hudson.maven.Maven3Builder.call(Maven3Builder.java:64)
      2 frames
    16. Hudson :: Remoting Layer
      InterceptingExecutorService$1.call
      1. hudson.remoting.UserRequest.perform(UserRequest.java:118)
      2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
      3. hudson.remoting.Request$2.run(Request.java:287)
      4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      4 frames
    17. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:166)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      5. java.lang.Thread.run(Thread.java:722)
      5 frames