jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven Surefire
  • SUREFIRE-347

regression: plexus is not properly isolated

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 2.3
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Complexity:
    Intermediate

Description

Currently, if you use 2.3.1-SNAPSHOT on doxia-site-renderer, you get a test error due to a class incompatibility in Plexus.

The same issue occurs if you use forkMode=never under 2.3 or earlier.

this could be related to, or caused by SUREFIRE-334. Fix that first and see if this is still an issue. However, note that it works under 2.3 with forkMode=once and useSystemClassLoader=true.

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. SUREFIRE-334 useSystemClassLoader introduces dependencies

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Brett Porter added a comment - 14/Aug/07 7:22 AM

testRender(org.apache.maven.doxia.siterenderer.DefaultSiteRendererTest) Time elapsed: 0.275 sec <<< ERROR!
java.lang.NoSuchMethodError: org.codehaus.plexus.component.repository.ComponentDescriptor.setSource(Ljava/lang/String;)V
at org.codehaus.plexus.component.discovery.DefaultComponentDiscoverer.createComponentDescriptors(DefaultComponentDiscoverer.java:68)

see: http://mail-archives.apache.org/mod_mbox/maven-dev/200708.mbox/%3C821E0489-9315-4523-B967-1A0945BCF291@apache.org%3E

Show
Brett Porter added a comment - 14/Aug/07 7:22 AM testRender(org.apache.maven.doxia.siterenderer.DefaultSiteRendererTest) Time elapsed: 0.275 sec <<< ERROR! java.lang.NoSuchMethodError: org.codehaus.plexus.component.repository.ComponentDescriptor.setSource(Ljava/lang/String;)V at org.codehaus.plexus.component.discovery.DefaultComponentDiscoverer.createComponentDescriptors(DefaultComponentDiscoverer.java:68) see: http://mail-archives.apache.org/mod_mbox/maven-dev/200708.mbox/%3C821E0489-9315-4523-B967-1A0945BCF291@apache.org%3E
Hide
Permalink
Dennis Lundberg added a comment - 27/Aug/07 10:18 AM

Another example of this is maven-project-info-reports-plugin. The current trunk version has surefire locked to version=2.3 to get around this. If forkMode=true is added or if the version is changed to 2.3.1-SNAPSHOT the following error occurs (just showing 1 of 11).

Running org.apache.maven.report.projectinfo.CimReportTest
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] artifact org.apache.maven.skins:maven-default-skin: checking for updates from central
[ERROR] VM #displayTree: error : too few arguments to macro. Wanted 2 got 0
[ERROR] VM #menuItem: error : too few arguments to macro. Wanted 1 got 0
-----------------------------------------------------
this realm = plexus.core
Number of imports: 0
-----------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.703 sec <<< FAILURE!

And in the surefire report:

-------------------------------------------------------------------------------
Test set: org.apache.maven.report.projectinfo.CimReportTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.703 sec <<< FAILURE!
testReport(org.apache.maven.report.projectinfo.CimReportTest)  Time elapsed: 0.703 sec  <<< ERROR!
org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component
  'org.apache.maven.project.MavenProjectBuilder', it could not be started
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:339)
	at org.codehaus.plexus.PlexusTestCase.lookup(PlexusTestCase.java:216)
	at org.apache.maven.report.projectinfo.AbstractProjectInfoTestCase.generateReport(AbstractProjectInfoTestCase.java:173)
	at org.apache.maven.report.projectinfo.CimReportTest.testReport(CimReportTest.java:51)
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)
	... 48 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)
	... 51 more
Caused by: org.codehaus.plexus.component.composition.CompositionException: Composition failed of field modelInterpolator in object of type
  org.apache.maven.project.DefaultMavenProjectBuilder because the requirement
  ComponentRequirement{role='org.apache.maven.project.interpolation.ModelInterpolator', roleHint='null', fieldName='null'} was missing
	at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:154)
	at org.codehaus.plexus.component.composition.FieldComponentComposer.assembleComponent(FieldComponentComposer.java:73)
	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)
	... 53 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component
  'org.apache.maven.project.interpolation.ModelInterpolator', it could not be created
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335)
	at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:129)
	... 57 more
Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException: Could not instanciate component:
  role: 'org.apache.maven.project.interpolation.ModelInterpolator',
  implementation: 'org.apache.maven.project.interpolation.RegexBasedModelInterpolator'
	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)
	... 58 more
Caused by: java.lang.NoSuchMethodError: org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars()Ljava/util/Properties;
	at org.apache.maven.project.interpolation.RegexBasedModelInterpolator.<init>(RegexBasedModelInterpolator.java:60)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
	at java.lang.Class.newInstance0(Class.java:308)
	at java.lang.Class.newInstance(Class.java:261)
	at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)
	... 62 more
Show
Dennis Lundberg added a comment - 27/Aug/07 10:18 AM Another example of this is maven-project-info-reports-plugin. The current trunk version has surefire locked to version=2.3 to get around this. If forkMode=true is added or if the version is changed to 2.3.1-SNAPSHOT the following error occurs (just showing 1 of 11).
Running org.apache.maven.report.projectinfo.CimReportTest
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] artifact org.apache.maven.skins:maven-default-skin: checking for updates from central
[ERROR] VM #displayTree: error : too few arguments to macro. Wanted 2 got 0
[ERROR] VM #menuItem: error : too few arguments to macro. Wanted 1 got 0
-----------------------------------------------------
this realm = plexus.core
Number of imports: 0
-----------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.703 sec <<< FAILURE!
And in the surefire report:
-------------------------------------------------------------------------------
Test set: org.apache.maven.report.projectinfo.CimReportTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.703 sec <<< FAILURE!
testReport(org.apache.maven.report.projectinfo.CimReportTest)  Time elapsed: 0.703 sec  <<< ERROR!
org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component
  'org.apache.maven.project.MavenProjectBuilder', it could not be started
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:339)
	at org.codehaus.plexus.PlexusTestCase.lookup(PlexusTestCase.java:216)
	at org.apache.maven.report.projectinfo.AbstractProjectInfoTestCase.generateReport(AbstractProjectInfoTestCase.java:173)
	at org.apache.maven.report.projectinfo.CimReportTest.testReport(CimReportTest.java:51)
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)
	... 48 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)
	... 51 more
Caused by: org.codehaus.plexus.component.composition.CompositionException: Composition failed of field modelInterpolator in object of type
  org.apache.maven.project.DefaultMavenProjectBuilder because the requirement
  ComponentRequirement{role='org.apache.maven.project.interpolation.ModelInterpolator', roleHint='null', fieldName='null'} was missing
	at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:154)
	at org.codehaus.plexus.component.composition.FieldComponentComposer.assembleComponent(FieldComponentComposer.java:73)
	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)
	... 53 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component
  'org.apache.maven.project.interpolation.ModelInterpolator', it could not be created
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335)
	at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:129)
	... 57 more
Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException: Could not instanciate component:
  role: 'org.apache.maven.project.interpolation.ModelInterpolator',
  implementation: 'org.apache.maven.project.interpolation.RegexBasedModelInterpolator'
	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)
	... 58 more
Caused by: java.lang.NoSuchMethodError: org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars()Ljava/util/Properties;
	at org.apache.maven.project.interpolation.RegexBasedModelInterpolator.<init>(RegexBasedModelInterpolator.java:60)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
	at java.lang.Class.newInstance0(Class.java:308)
	at java.lang.Class.newInstance(Class.java:261)
	at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)
	... 62 more
Hide
Permalink
Mauro Talevi added a comment - 05/Dec/07 2:35 AM

Moving to 2.3.2

Show
Mauro Talevi added a comment - 05/Dec/07 2:35 AM Moving to 2.3.2
Hide
Permalink
Mauro Talevi added a comment - 05/Dec/07 2:35 AM

Moving to 2.3.2

Show
Mauro Talevi added a comment - 05/Dec/07 2:35 AM Moving to 2.3.2
Hide
Permalink
Dan Fabulich added a comment - 09/Dec/07 12:22 AM

Using the plexus-conflict test checked into surefire trunk, I was unable to reproduce this issue with either Surefire 2.3 or the latest trunk. I was able to reproduce the related bug SUREFIRE-334 in trunk when useSystemClassLoader=true, but not in Surefire 2.3, where I found that useSystemClassLoader=true was just broken.

Show
Dan Fabulich added a comment - 09/Dec/07 12:22 AM Using the plexus-conflict test checked into surefire trunk, I was unable to reproduce this issue with either Surefire 2.3 or the latest trunk. I was able to reproduce the related bug SUREFIRE-334 in trunk when useSystemClassLoader=true, but not in Surefire 2.3, where I found that useSystemClassLoader=true was just broken.

People

  • Assignee:
    Unassigned
    Reporter:
    Brett Porter
Vote (0)
Watch (0)

Dates

  • Created:
    13/Aug/07 12:11 AM
    Updated:
    26/Jan/10 4:21 PM
    Resolved:
    09/Dec/07 12:22 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.