[ 
https://issues.apache.org/jira/browse/WICKET-1130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg updated WICKET-1130:
----------------------------------

    Fix Version/s:     (was: 1.3.3)
                   1.5-M1

moving this to 1.5.

basically when injecting instances of concrete classes we are limited by cglib 
which requires a default visible constructor and no final methods so that it 
can create a subclass for our proxy.

once we switch to jdk5 we can require usage of annotations for injection and 
then we can remove the proxies and use hooks in page serialization to inject 
objects and hooks in deserialzation to make sure injected fields are skipped.

> Injection of Bound Instance Fails with Exception
> ------------------------------------------------
>
>                 Key: WICKET-1130
>                 URL: https://issues.apache.org/jira/browse/WICKET-1130
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-guice
>    Affects Versions: 1.3.0-beta4
>            Reporter: Daniel Spiewak
>            Assignee: Alastair Maw
>             Fix For: 1.5-M1
>
>
> If I try to inject an explicitly bound instance into a component, injection 
> fails with an exception in the creation of the CGLIB proxy:
> java.lang.IllegalArgumentException: Superclass has no null constructors but 
> no arguments were given
> Stupidly, I forgot to save the whole stack trace and the code is now gone 
> from my codebase (since I needed it to work).  To repeat:
> @Override
> public void configure() {
>     bind(EntityManager.class).toInstance(manager);
> }
> Seems wicket-guice is assuming that it needs to create a new instance of 
> everything that's injected, and since EntityManager doesn't have a no-args 
> constructor, such an action fails.  Just an assumption anyway...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to