-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
When trying to load a component via Plexus.lookup(...)
whose class cannot be found for some reason one gets the following exception
org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
role: org.eclipse.sisu.plexus.test.invalid.InvalidClass
roleHint:
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:271)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:247)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:241)
at ....
Caused by: java.util.NoSuchElementException
at java.util.Collections$EmptyIterator.next(Collections.java:4191)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:267)
... 22 more
The wrapped exception should contain some more concrete information why the lookup failed (i.e. the exception exposed from the class loader)
OTOH Plexus.lookupList()
and Plexus.lookupMap()
do not throw an exception at all, but just return empty wrappers.
Metadata
Metadata
Assignees
Labels
No labels