Wicket
  1. Wicket
  2. WICKET-1130

Injection of Bound Instance Fails with Exception

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.3.0-beta4
    • Fix Version/s: None
    • Component/s: wicket-guice
    • Labels:
      None

      Description

      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...

        Activity

        Igor Vaynberg made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Assignee Igor Vaynberg [ ivaynberg ]
        Resolution Won't Fix [ 2 ]
        Martin Grigorov made changes -
        Fix Version/s 1.5-M4 [ 12315483 ]
        Jeremy Thomerson made changes -
        Fix Version/s 1.5-M4 [ 12315483 ]
        Fix Version/s 1.5-M3 [ 12315329 ]
        Eelco Hillenius made changes -
        Attachment GuiceLazyInitProxyFactory.java [ 12451134 ]
        Igor Vaynberg made changes -
        Fix Version/s 1.5-M3 [ 12315329 ]
        Fix Version/s 1.5-M2 [ 12315237 ]
        Igor Vaynberg made changes -
        Fix Version/s 1.5-M1 [ 12313078 ]
        Fix Version/s 1.5-M2 [ 12315237 ]
        Eelco Hillenius made changes -
        Assignee Alastair Maw [ almaw ]
        Eelco Hillenius made changes -
        Attachment GuiceLazyInitProxyFactory.java [ 12451134 ]
        Igor Vaynberg made changes -
        Fix Version/s 1.3.3 [ 12313047 ]
        Fix Version/s 1.5-M1 [ 12313078 ]
        Alastair Maw made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Frank Bille Jensen made changes -
        Fix Version/s 1.3.2 [ 12312942 ]
        Fix Version/s 1.3.3 [ 12313047 ]
        Frank Bille Jensen made changes -
        Fix Version/s 1.3.1 [ 12312500 ]
        Fix Version/s 1.3.2 [ 12312942 ]
        Frank Bille Jensen made changes -
        Fix Version/s 1.3.1 [ 12312500 ]
        Fix Version/s 1.3.0-rc3 [ 12312886 ]
        Frank Bille Jensen made changes -
        Fix Version/s 1.3.0-rc2 [ 12312513 ]
        Fix Version/s 1.3.0-rc3 [ 12312886 ]
        Johan Compagner made changes -
        Field Original Value New Value
        Assignee Alastair Maw [ almaw ]
        Fix Version/s 1.3.0-rc2 [ 12312513 ]
        Daniel Spiewak created issue -

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Daniel Spiewak
          • Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development