Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-3706

Maven2-based build fails with "Cannot lookup required component" when run on slave

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      Maven2-based build fails with "Cannot lookup required component" when run on slave
      in Hudson ver. 1.306 - in 1.304 it seemed to be OK.

      The message is:

      Parsing POMs
      ERROR: Failed to parse POMs
      org.apache.maven.embedder.MavenEmbedderException: Cannot lookup required component.
      at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:722)
      at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:116)
      at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:728)
      at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:676)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1638)
      at hudson.remoting.UserRequest.perform(UserRequest.java:103)
      at hudson.remoting.UserRequest.perform(UserRequest.java:47)
      at hudson.remoting.Request$2.run(Request.java:236)
      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.codehaus.plexus.component.repository.exception.ComponentLookupException:
      Unable to lookup component 'org.apache.maven.lifecycle.LifecycleExecutor', it
      could not be started
      at
      org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:339)
      at org.codehaus.plexus.embed.Embedder.lookup(Embedder.java:78)
      at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:700)
      ... 13 more
      Caused by:
      org.codehaus.plexus.component.repository.exception.ComponentLifecycleException:
      Error starting component
      at
      org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:109)
      at
      org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:95)
      at
      org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)
      at
      org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
      ... 15 more
      Caused by:
      org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException:
      Error composing component
      at
      org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:33)
      at
      org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:101)
      at
      org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:105)
      ... 18 more
      Caused by: org.codehaus.plexus.component.composition.CompositionException:
      Component composition failed. No field of type: 'interface
      org.apache.maven.project.MavenProjectBuilder' exists in class
      'org.apache.maven.lifecycle.LifecycleExecutorInterceptor'. Component: role:
      'org.apache.maven.lifecycle.LifecycleExecutor', implementation:
      'org.apache.maven.lifecycle.LifecycleExecutorInterceptor'
      at
      org.codehaus.plexus.component.composition.FieldComponentComposer.getFieldByType(FieldComponentComposer.java:305)
      at
      org.codehaus.plexus.component.composition.FieldComponentComposer.findMatchingField(FieldComponentComposer.java:204)
      at
      org.codehaus.plexus.component.composition.FieldComponentComposer.assembleComponent(FieldComponentComposer.java:62)
      at
      org.codehaus.plexus.component.composition.DefaultComponentComposerManager.assembleComponent(DefaultComponentComposerManager.java:68)
      at
      org.codehaus.plexus.DefaultPlexusContainer.composeComponent(DefaultPlexusContainer.java:1486)
      at
      org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:29)
      ... 20 more
      Finished: FAILURE

      mvn -version
      Maven version: 2.0.10
      Java version: 1.6.0_13
      OS name: "linux" version: "2.6.21-2952xen" arch: "amd64" Family: "unix"

        Attachments

          Activity

          Hide
          krystian_nowak Krystian Nowak added a comment -

          adding myself as CC

          Show
          krystian_nowak Krystian Nowak added a comment - adding myself as CC
          Hide
          mindless Alan Harder added a comment -

          I got an exception like this (same "caused by" message) trying to run unit tests
          for sidebar-link plugin (which isn't related to maven at all). Test ran ok when
          I changed the pom to use hudson 1.304 instead of 1.307.

          Show
          mindless Alan Harder added a comment - I got an exception like this (same "caused by" message) trying to run unit tests for sidebar-link plugin (which isn't related to maven at all). Test ran ok when I changed the pom to use hudson 1.304 instead of 1.307.
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Which version of Maven did you use?

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Which version of Maven did you use?
          Hide
          mindless Alan Harder added a comment -

          oops, in my case it was maven 2.0.6.. I didn't realize the version on OSX is
          old; I've only done compiles on OSX before and hadn't hit any problems. Tried
          the tests on mavn 2.0.9 / S10-sparc, ran fine.

          Show
          mindless Alan Harder added a comment - oops, in my case it was maven 2.0.6.. I didn't realize the version on OSX is old; I've only done compiles on OSX before and hadn't hit any problems. Tried the tests on mavn 2.0.9 / S10-sparc, ran fine.
          Hide
          thedotedge thedotedge added a comment -

          Got similar exception:
          ERROR: Failed to parse POMs
          org.apache.maven.embedder.MavenEmbedderException: Cannot lookup required component.
          at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:722)
          at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:116)
          at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:728)
          at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:676)
          at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1642)
          at hudson.remoting.UserRequest.perform(UserRequest.java:103)
          at hudson.remoting.UserRequest.perform(UserRequest.java:47)
          at hudson.remoting.Request$2.run(Request.java:236)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
          at java.util.concurrent.FutureTask.run(FutureTask.java:123)
          at
          java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
          at java.lang.Thread.run(Thread.java:595)
          Caused by:
          org.codehaus.plexus.component.repository.exception.ComponentLookupException:
          Unable to lookup component 'org.apache.maven.lifecycle.LifecycleExecutor', it
          could not be started
          at
          org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:339)
          at org.codehaus.plexus.embed.Embedder.lookup(Embedder.java:78)
          at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:700)
          ... 13 more
          Caused by:
          org.codehaus.plexus.component.repository.exception.ComponentLifecycleException:
          Error starting component
          at
          org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:109)
          at
          org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:95)
          at
          org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)
          at
          org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
          ... 15 more
          Caused by:
          org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException:
          Error composing component
          at
          org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:33)
          at
          org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:101)
          at
          org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:105)
          ... 18 more
          Caused by: org.codehaus.plexus.component.composition.CompositionException:
          Component composition failed. No field of type: 'interface
          org.apache.maven.project.MavenProjectBuilder' exists in class
          'org.apache.maven.lifecycle.LifecycleExecutorInterceptor'. Component: role:
          'org.apache.maven.lifecycle.LifecycleExecutor', implementation:
          'org.apache.maven.lifecycle.LifecycleExecutorInterceptor'
          at
          org.codehaus.plexus.component.composition.FieldComponentComposer.getFieldByType(FieldComponentComposer.java:305)
          at
          org.codehaus.plexus.component.composition.FieldComponentComposer.findMatchingField(FieldComponentComposer.java:204)
          at
          org.codehaus.plexus.component.composition.FieldComponentComposer.assembleComponent(FieldComponentComposer.java:62)
          at
          org.codehaus.plexus.component.composition.DefaultComponentComposerManager.assembleComponent(DefaultComponentComposerManager.java:68)
          at
          org.codehaus.plexus.DefaultPlexusContainer.composeComponent(DefaultPlexusContainer.java:1486)
          at
          org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:29)
          ... 20 more
          Finished: FAILURE

          Master (1.307):
          Apache Maven 2.1.0 (r755702; 2009-03-18 20:10:27+0100)
          Java version: 1.5.0_17
          Java home: /local/java/jdk1.5.0_17/jre
          Default locale: en_US, platform encoding: UTF-8
          OS name: "linux" version: "2.6.18-92.el5" arch: "i386" Family: "unix"

          Slave:

          Apache Maven 2.1.0 (r755702; 2009-03-18 21:10:27+0200)
          Java version: 1.5.0_19
          Java home: /local/java/jdk1.5.0_19/jre
          Default locale: en_US, platform encoding: UTF-8
          OS name: "linux" version: "2.6.18-128.1.6.el5" arch: "amd64" Family: "unix"

          Show
          thedotedge thedotedge added a comment - Got similar exception: ERROR: Failed to parse POMs org.apache.maven.embedder.MavenEmbedderException: Cannot lookup required component. at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:722) at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:116) at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:728) at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:676) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1642) at hudson.remoting.UserRequest.perform(UserRequest.java:103) at hudson.remoting.UserRequest.perform(UserRequest.java:47) at hudson.remoting.Request$2.run(Request.java:236) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component 'org.apache.maven.lifecycle.LifecycleExecutor', it could not be started at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:339) at org.codehaus.plexus.embed.Embedder.lookup(Embedder.java:78) at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:700) ... 13 more Caused by: org.codehaus.plexus.component.repository.exception.ComponentLifecycleException: Error starting component at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:109) at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:95) at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331) ... 15 more Caused by: org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException: Error composing component at org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:33) at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:101) at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:105) ... 18 more Caused by: org.codehaus.plexus.component.composition.CompositionException: Component composition failed. No field of type: 'interface org.apache.maven.project.MavenProjectBuilder' exists in class 'org.apache.maven.lifecycle.LifecycleExecutorInterceptor'. Component: role: 'org.apache.maven.lifecycle.LifecycleExecutor', implementation: 'org.apache.maven.lifecycle.LifecycleExecutorInterceptor' at org.codehaus.plexus.component.composition.FieldComponentComposer.getFieldByType(FieldComponentComposer.java:305) at org.codehaus.plexus.component.composition.FieldComponentComposer.findMatchingField(FieldComponentComposer.java:204) at org.codehaus.plexus.component.composition.FieldComponentComposer.assembleComponent(FieldComponentComposer.java:62) at org.codehaus.plexus.component.composition.DefaultComponentComposerManager.assembleComponent(DefaultComponentComposerManager.java:68) at org.codehaus.plexus.DefaultPlexusContainer.composeComponent(DefaultPlexusContainer.java:1486) at org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:29) ... 20 more Finished: FAILURE Master (1.307): Apache Maven 2.1.0 (r755702; 2009-03-18 20:10:27+0100) Java version: 1.5.0_17 Java home: /local/java/jdk1.5.0_17/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "2.6.18-92.el5" arch: "i386" Family: "unix" Slave: Apache Maven 2.1.0 (r755702; 2009-03-18 21:10:27+0200) Java version: 1.5.0_19 Java home: /local/java/jdk1.5.0_19/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "2.6.18-128.1.6.el5" arch: "amd64" Family: "unix"
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : kohsuke
          Path:
          branches/rc/maven-interceptor/src/main/resources/META-INF/plexus/components.xml
          branches/rc/maven-plugin/pom.xml
          branches/rc/maven-plugin/src/main/java/hudson/maven/MavenUtil.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=18481
          Log:
          [FIXED JENKINS-3706]
          MaskingClassLoader that's supposed to throw awy components.xml for interceptions are still kicking in when MavenEmbedder run on slaves, as RemoteClassLoader mangles the URL that the MaskingClassLoader was looking for.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: branches/rc/maven-interceptor/src/main/resources/META-INF/plexus/components.xml branches/rc/maven-plugin/pom.xml branches/rc/maven-plugin/src/main/java/hudson/maven/MavenUtil.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=18481 Log: [FIXED JENKINS-3706] MaskingClassLoader that's supposed to throw awy components.xml for interceptions are still kicking in when MavenEmbedder run on slaves, as RemoteClassLoader mangles the URL that the MaskingClassLoader was looking for.

            People

            • Assignee:
              Unassigned
              Reporter:
              krystian_nowak Krystian Nowak
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: