|
It could be that JDK 1.4.2 as opposed to 1.4.1 is an issue.
We can't reproduce this bug. We'll close this one in a week or so if we don't get any more feedback on this.
I was getting this bug with Java 1.4.2 as well as 1.4.1 when using picocontainer-1.0-RC1.jar. But when I downloaded everything through CVS and rebuilt, it worked fine. I guess the problem has been fixed.
What about the final release though?
With the latest release (picocontainer-1.0.jar) it works fine. Here's the exception it spits out:
org.picocontainer.PicoInitializationException at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:212) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:37) at org.picocontainer.defaults.GenericCollectionComponentAdapter.getArrayInstance(GenericCollectionComponentAdapter.java:79) at org.picocontainer.defaults.GenericCollectionComponentAdapter.getComponentInstance(GenericCollectionComponentAdapter.java:66) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198) at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48) at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42) at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:37) at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:298) at tutorial.Bowl.main(Bowl.java:30) Caused by: java.lang.IllegalAccessException: Class org.picocontainer.defaults.InstantiatingComponentAdapter can not access a member of class tutorial.Shark with modifiers "public" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57) at java.lang.reflect.Constructor.newInstance(Constructor.java:268) at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:100) at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:200) ... 12 more |
|||||||||||||||||||||||||||||||||||||||||||||||
Daniel, can you catch up with the CVS version of Pico, and see if you can mod the test ( Issue0191TestCase.java ) to get the issue to happen as you describe.