You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Caspar MacRae (JIRA)" <ji...@apache.org> on 2010/08/04 13:16:18 UTC

[jira] Commented: (WICKET-1130) Injection of Bound Instance Fails with Exception

    [ https://issues.apache.org/jira/browse/WICKET-1130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895220#action_12895220 ] 

Caspar MacRae commented on WICKET-1130:
---------------------------------------



@Eelco would you please attach the rest of the source?

I've only looked at this briefly, but am guessing you've had to refactor back from GuiceComponentInjector down to the underlying Inject interface to pass the type back.

thanks.

> 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
>             Fix For: 1.5-M1
>
>         Attachments: GuiceLazyInitProxyFactory.java
>
>
> 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.