Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
6.6.0, 1.5.10
-
None
-
Tomcat 6.0.35
Java 1.6.0.37
Description
@SpringBean fails to inject properly classes with a composite interface.
eg :
interface Something1 {}
interface Something2 {}
edit-public-edit interface Something extends Something1, Something2 {}
class TestBean implements Something {}
public class TestPage extends WebPage {
@SpringBrean
private Something something;
}
Trying to inject a bean implementing the Something interface does not seems to fail at first, but when calling any method an IllegalAccessException is thrown, similar to this :
java.lang.IllegalAccessException: Class org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler can not access a member of class
with modifiers "public abstract"
I've attached different test cases reproducing the problem.
As a side note, referencing directly the implementing class like this seems to work :
public class TestPage extends WebPage {
@SpringBrean
private TestBean something;
}
But it kind of defeats the purpose of DI.
edit The visibility of the main interface was incorrectly listed as package-private, it is public (otherwise you can't reference it).