Issue Details (XML | Word | Printable)

Key: PICO-278
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Michael Rimov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
PicoContainer

AmbiguousComponentResolutionException not printing component key within VerifyingVisitor

Created: 30/Apr/06 01:57 AM   Updated: 30/Apr/06 01:57 AM
Component/s: PicoContainer (Java)
Affects Version/s: 1.3
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
I had a set of components I was running the VerifyingVisitor on and was getting the exception:

org.picocontainer.PicoVerificationException: [org.picocontainer.defaults.AmbiguousComponentResolutionException: null has ambiguous dependency on interface java.util.Map, resolves to multiple classes: [class com.genfw.command.wrappers.impl.DefaultAttributeMap, class com.genfw.command.servlet.impl.DefaultEnteredValues]]

at org.picocontainer.defaults.VerifyingVisitor.traverse(VerifyingVisitor.java:56)

at com.genfw.command.servlet.impl.NoWebServerServiceLocatorFactoryTestCase.testGetLocator(NoWebServerServiceLocatorFactoryTestCase.java:28)

The problem I have is that the original component key causing the problem wasn't being included in the stack trace. Putting a break point at VerifyingVisitor 76:
try { componentAdapter.verify(currentPico); } catch (RuntimeException e) { nestedVerificationExceptions.add(e); }

and grabbing a componentAdapter.toString() in my debugger nabbed the real culprint:

[CachingCA delegate=org.picocontainer.defaults.ConstructorInjectionComponentAdapter[interface com.genfw.command.wrappers.ParameterSource]]

I believe the suspect is probably the AmbiguousComponentResolutionException's getMessage() since the key printed in the stack trace is null – but it could be in the code throwing the AmbiguousComponentResolutionException.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.