Discussion:
Strange message: 'null' needs....
Daniel Hinojosa
2008-05-23 17:56:42 UTC
Permalink
org.picocontainer.injectors.AbstractInjector$AmbiguousComponentResolutionException:
null needs a 'javax.swing.JMenu' injected, but there are too many
choices to inject. These:[class gov.xyzcorp.swing.FileMenu, class
gov.xyzcorp.swing.EditMenu], refer
http://picocontainer.org/ambiguous-injectable-help.html

The message: 'null needs' isn't helping me much. Was this intent or a bug?
--
Daniel Hinojosa
Programmer, Instructor, and Consultant

2529 Wisconsin St. NE
Albuquerque, NM 87110
dhinojosa-sRlC7LJHFRkitjMjQMKR8gC/***@public.gmane.org

http://www.evolutionnext.com
http://www.abqjug.org

(505) 363-5832

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Paul Hammant
2008-05-24 03:40:13 UTC
Permalink
Dan,

I fixed that to be clearer in the release that just went out.

It now says "<no-component>" in place of null. What it means that you
were trying to get a component with getComponent(Class) from your app.

AmbiguousComponentResolutionException: <no-component> needs a
'Apple' injected, but there are too many choices to inject. These:
[class Apple1, class Apple2], refer ...

Perhaps it could we worded altogether differently - like for humans!

In a different scenario, you might be trying to
getComponent(Apple.class) where Apple had a dependency on Orange. and
the message might say -\

AmbiguousComponentResolutionException: class Apple needs a 'Orange'
injected, but there are too many choices to inject. These:[class
Orange1, class Orange2], refer ...

Does that explain it? I think yes unless there is some bug that we
don't have a testcase for, please advise. Can you point me to
somewhere in Subversion ?

- Paul
Post by Daniel Hinojosa
org.picocontainer.injectors.AbstractInjector
null needs a 'javax.swing.JMenu' injected, but there are too many
choices to inject. These:[class gov.xyzcorp.swing.FileMenu, class
gov.xyzcorp.swing.EditMenu], refer
http://picocontainer.org/ambiguous-injectable-help.html
The message: 'null needs' isn't helping me much. Was this intent or a bug?
--
Daniel Hinojosa
Programmer, Instructor, and Consultant
2529 Wisconsin St. NE
Albuquerque, NM 87110
http://www.evolutionnext.com
http://www.abqjug.org
(505) 363-5832
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
Loading...