hudson-maven-embedder-plexus-utils-NoClassDefFoundError-issue

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

hudson-maven-embedder-plexus-utils-NoClassDefFoundError-issue

Tom Huybrechts
Doing MavenUtil.createEmbedder(listener, null) in a plugin throws this
exception:

This is blocking my GAP submission a little, so any help would be appreciated...

Cannot lookup required component.
org.apache.maven.embedder.MavenEmbedderException: Cannot lookup
required component.
        at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:675)
        at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:57)
        at hudson.staging.UploadArtifactsAction.run(UploadArtifactsAction.java:94)
        at hudson.staging.UploadArtifactsAction$1.run(UploadArtifactsAction.java:69)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException:
Unable to lookup component
'org.apache.maven.project.MavenProjectBuilder', it could not be
created
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335)
        at org.codehaus.plexus.embed.Embedder.lookup(Embedder.java:78)
        at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:639)
        ... 4 more
Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException:
Could not instanciate component: role:
'org.apache.maven.project.MavenProjectBuilder', implementation:
'org.apache.maven.project.DefaultMavenProjectBuilder'
        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeException(JavaComponentFactory.java:77)
        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:62)
        at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464)
        at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93)
        at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
        ... 6 more
Caused by: java.lang.NoClassDefFoundError:
org/codehaus/plexus/util/xml/XmlStreamReader
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
        at java.lang.Class.getConstructor0(Class.java:2699)
        at java.lang.Class.newInstance0(Class.java:326)
        at java.lang.Class.newInstance(Class.java:308)
        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)
        ... 10 more
Caused by: java.lang.ClassNotFoundException:
org.codehaus.plexus.util.xml.XmlStreamReader
        at java.lang.ClassLoader.findClass(ClassLoader.java:358)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at org.jvnet.hudson.maven.plugins.hpi.MaskingClassLoader.loadClass(MaskingClassLoader.java:22)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:325)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        ... 16 more

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: hudson-maven-embedder-plexus-utils-NoClassDefFoundError-issue

Tom Huybrechts
Adding plexus-utils to the war helps. Won't others users of the
embedder have the same problem ?

On Fri, Jun 20, 2008 at 3:33 PM, Tom Huybrechts
<[hidden email]> wrote:

> Doing MavenUtil.createEmbedder(listener, null) in a plugin throws this
> exception:
>
> This is blocking my GAP submission a little, so any help would be appreciated...
>
> Cannot lookup required component.
> org.apache.maven.embedder.MavenEmbedderException: Cannot lookup
> required component.
>        at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:675)
>        at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:57)
>        at hudson.staging.UploadArtifactsAction.run(UploadArtifactsAction.java:94)
>        at hudson.staging.UploadArtifactsAction$1.run(UploadArtifactsAction.java:69)
>        at java.lang.Thread.run(Thread.java:619)
> Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException:
> Unable to lookup component
> 'org.apache.maven.project.MavenProjectBuilder', it could not be
> created
>        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335)
>        at org.codehaus.plexus.embed.Embedder.lookup(Embedder.java:78)
>        at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:639)
>        ... 4 more
> Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException:
> Could not instanciate component: role:
> 'org.apache.maven.project.MavenProjectBuilder', implementation:
> 'org.apache.maven.project.DefaultMavenProjectBuilder'
>        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeException(JavaComponentFactory.java:77)
>        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:62)
>        at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464)
>        at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93)
>        at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)
>        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
>        ... 6 more
> Caused by: java.lang.NoClassDefFoundError:
> org/codehaus/plexus/util/xml/XmlStreamReader
>        at java.lang.Class.getDeclaredConstructors0(Native Method)
>        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
>        at java.lang.Class.getConstructor0(Class.java:2699)
>        at java.lang.Class.newInstance0(Class.java:326)
>        at java.lang.Class.newInstance(Class.java:308)
>        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)
>        ... 10 more
> Caused by: java.lang.ClassNotFoundException:
> org.codehaus.plexus.util.xml.XmlStreamReader
>        at java.lang.ClassLoader.findClass(ClassLoader.java:358)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>        at org.jvnet.hudson.maven.plugins.hpi.MaskingClassLoader.loadClass(MaskingClassLoader.java:22)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
>        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:325)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>        ... 16 more
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: hudson-maven-embedder-plexus-utils-NoClassDefFoundError-issue

Kohsuke Kawaguchi
Administrator
Tom Huybrechts wrote:
> Adding plexus-utils to the war helps. Won't others users of the
> embedder have the same problem ?

According to "mvn dependency:tree" on core, I get:

> [INFO] +- org.apache.maven:maven-core:jar:2.0.9:compile
> [INFO] |  +- org.apache.maven:maven-settings:jar:2.0.9:compile
> [INFO] |  +- org.apache.maven.wagon:wagon-file:jar:1.0-beta-2:runtime
     ...
> [INFO] |  +- org.codehaus.plexus:plexus-utils:jar:1.5.1:compile
> [INFO] |  \- classworlds:classworlds:jar:1.1:compile

so plexus-utils should be a part of the war, and indeed I see it in
hudson.war

What's your dependency listing?

>
> On Fri, Jun 20, 2008 at 3:33 PM, Tom Huybrechts
> <[hidden email]> wrote:
>> Doing MavenUtil.createEmbedder(listener, null) in a plugin throws this
>> exception:
>>
>> This is blocking my GAP submission a little, so any help would be appreciated...
>>
>> Cannot lookup required component.
>> org.apache.maven.embedder.MavenEmbedderException: Cannot lookup
>> required component.
>>        at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:675)
>>        at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:57)
>>        at hudson.staging.UploadArtifactsAction.run(UploadArtifactsAction.java:94)
>>        at hudson.staging.UploadArtifactsAction$1.run(UploadArtifactsAction.java:69)
>>        at java.lang.Thread.run(Thread.java:619)
>> Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException:
>> Unable to lookup component
>> 'org.apache.maven.project.MavenProjectBuilder', it could not be
>> created
>>        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335)
>>        at org.codehaus.plexus.embed.Embedder.lookup(Embedder.java:78)
>>        at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:639)
>>        ... 4 more
>> Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException:
>> Could not instanciate component: role:
>> 'org.apache.maven.project.MavenProjectBuilder', implementation:
>> 'org.apache.maven.project.DefaultMavenProjectBuilder'
>>        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeException(JavaComponentFactory.java:77)
>>        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:62)
>>        at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464)
>>        at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93)
>>        at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)
>>        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
>>        ... 6 more
>> Caused by: java.lang.NoClassDefFoundError:
>> org/codehaus/plexus/util/xml/XmlStreamReader
>>        at java.lang.Class.getDeclaredConstructors0(Native Method)
>>        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
>>        at java.lang.Class.getConstructor0(Class.java:2699)
>>        at java.lang.Class.newInstance0(Class.java:326)
>>        at java.lang.Class.newInstance(Class.java:308)
>>        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)
>>        ... 10 more
>> Caused by: java.lang.ClassNotFoundException:
>> org.codehaus.plexus.util.xml.XmlStreamReader
>>        at java.lang.ClassLoader.findClass(ClassLoader.java:358)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>        at org.jvnet.hudson.maven.plugins.hpi.MaskingClassLoader.loadClass(MaskingClassLoader.java:22)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
>>        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:325)
>>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>        ... 16 more
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: hudson-maven-embedder-plexus-utils-NoClassDefFoundError-issue

Tom Huybrechts
I removed my added dependency to plexus-utils and now I can't get it
to fail anymore. plexus-utils is indeed included.
I suppose that's good news, but I'm still wondering what went wrong before.

Tom

On Tue, Jun 24, 2008 at 9:40 PM, Kohsuke Kawaguchi
<[hidden email]> wrote:

> Tom Huybrechts wrote:
>>
>> Adding plexus-utils to the war helps. Won't others users of the
>> embedder have the same problem ?
>
> According to "mvn dependency:tree" on core, I get:
>
>> [INFO] +- org.apache.maven:maven-core:jar:2.0.9:compile
>> [INFO] |  +- org.apache.maven:maven-settings:jar:2.0.9:compile
>> [INFO] |  +- org.apache.maven.wagon:wagon-file:jar:1.0-beta-2:runtime
>
>    ...
>>
>> [INFO] |  +- org.codehaus.plexus:plexus-utils:jar:1.5.1:compile
>> [INFO] |  \- classworlds:classworlds:jar:1.1:compile
>
> so plexus-utils should be a part of the war, and indeed I see it in
> hudson.war
>
> What's your dependency listing?
>
>>
>> On Fri, Jun 20, 2008 at 3:33 PM, Tom Huybrechts
>> <[hidden email]> wrote:
>>>
>>> Doing MavenUtil.createEmbedder(listener, null) in a plugin throws this
>>> exception:
>>>
>>> This is blocking my GAP submission a little, so any help would be
>>> appreciated...
>>>
>>> Cannot lookup required component.
>>> org.apache.maven.embedder.MavenEmbedderException: Cannot lookup
>>> required component.
>>>       at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:675)
>>>       at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:57)
>>>       at
>>> hudson.staging.UploadArtifactsAction.run(UploadArtifactsAction.java:94)
>>>       at
>>> hudson.staging.UploadArtifactsAction$1.run(UploadArtifactsAction.java:69)
>>>       at java.lang.Thread.run(Thread.java:619)
>>> Caused by:
>>> org.codehaus.plexus.component.repository.exception.ComponentLookupException:
>>> Unable to lookup component
>>> 'org.apache.maven.project.MavenProjectBuilder', it could not be
>>> created
>>>       at
>>> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335)
>>>       at org.codehaus.plexus.embed.Embedder.lookup(Embedder.java:78)
>>>       at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:639)
>>>       ... 4 more
>>> Caused by:
>>> org.codehaus.plexus.component.factory.ComponentInstantiationException:
>>> Could not instanciate component: role:
>>> 'org.apache.maven.project.MavenProjectBuilder', implementation:
>>> 'org.apache.maven.project.DefaultMavenProjectBuilder'
>>>       at
>>> org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeException(JavaComponentFactory.java:77)
>>>       at
>>> org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:62)
>>>       at
>>> org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464)
>>>       at
>>> org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93)
>>>       at
>>> org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)
>>>       at
>>> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
>>>       ... 6 more
>>> Caused by: java.lang.NoClassDefFoundError:
>>> org/codehaus/plexus/util/xml/XmlStreamReader
>>>       at java.lang.Class.getDeclaredConstructors0(Native Method)
>>>       at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
>>>       at java.lang.Class.getConstructor0(Class.java:2699)
>>>       at java.lang.Class.newInstance0(Class.java:326)
>>>       at java.lang.Class.newInstance(Class.java:308)
>>>       at
>>> org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)
>>>       ... 10 more
>>> Caused by: java.lang.ClassNotFoundException:
>>> org.codehaus.plexus.util.xml.XmlStreamReader
>>>       at java.lang.ClassLoader.findClass(ClassLoader.java:358)
>>>       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>>       at
>>> org.jvnet.hudson.maven.plugins.hpi.MaskingClassLoader.loadClass(MaskingClassLoader.java:22)
>>>       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>       at
>>> org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
>>>       at
>>> org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:325)
>>>       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>>       ... 16 more
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems                   [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]