Hi list, Hi Al,
i´m fooling around with resin/persistent sessions as well as the new
DiskPageStore in order to get persistent Page-State after a context reload.
Everything seems to work fine, until Guice comes into play. Application
as usual:
protected void init() {
Module module = new AbstractModule(){
protected void configure() {
bind(ITest.class).to(TestImpl.class);
}};
addComponentInstantiationListener(new GuiceComponentInjector(this,module));
}
with
public interface ITest { void foo(); }
public class TestImpl implements ITest{ public void foo() {
System.out.println("foo"); } }
public class HomePage extends WebPage {
@Inject ITest test;
public HomePage(final PageParameters parameters) {
add(new Link("l") {
public void onClick() {
test.foo();
}
});
...
Unfortunately, reinjection of TestImpl fails with:
WicketMessage: Method onLinkClicked of interface
org.apache.wicket.markup.html.link.ILinkListener targeted at component
[MarkupContainer [Component id = l, page = org.codesmell.HomePage, path
= 11:l.HomePage$1, isVisible = true, isVersioned = true]] threw an exception
Root cause:
java.lang.NullPointerException: type
at com.google.inject.util.Objects.nonNull(Objects.java:35)
at com.google.inject.TypeLiteral.<init>(TypeLiteral.java:69)
at
com.google.inject.TypeLiteral$SimpleTypeLiteral.<init>(TypeLiteral.java:181)
at com.google.inject.TypeLiteral.get(TypeLiteral.java:169)
at
org.apache.wicket.guice.GuiceProxyTargetLocator.locateProxyTarget(GuiceProxyTargetLocator.java:61)
at
org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:412)
Is this a known problem, or should i file a bug for that ?
cu uwe
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]