Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4918

LazyInitProxyFactory prevents using package private interfaces

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.3.0
    • Fix Version/s: 6.4.0, 1.5.10
    • Component/s: wicket-guice
    • Labels:
      None

      Description

      I'm trying to inject a package private interface for my model classes but I keep getting a java.lang.IllegalArgumentException: non-public interfaces from different packages.

      I'm guessing the LazyInitProxyFactory adding IWriteReplace to the proxies is the culprit here, since IWriteReplace is also an package private interface in the org.apache.wicket.proxy package.

        Activity

        Hide
        tkorri Taneli Korri added a comment -

        Quickstart reproducing this behaviour

        Show
        tkorri Taneli Korri added a comment - Quickstart reproducing this behaviour
        Hide
        stephenlujan Stephen Lujan added a comment -

        I confirmed that this works with just google guice but not wicket-guice, by replacing "Injector.get().inject(this);" with "Guice.createInjector().injectMembers(this);" in the net.korri.model.Model constructor.

        Show
        stephenlujan Stephen Lujan added a comment - I confirmed that this works with just google guice but not wicket-guice, by replacing "Injector.get().inject(this);" with "Guice.createInjector().injectMembers(this);" in the net.korri.model.Model constructor.
        Hide
        stephenlujan Stephen Lujan added a comment - - edited

        Taneli Korri was correct. Making IWrireReplace public does solve the issue. I've added a patch just in case that's helpful.

        Show
        stephenlujan Stephen Lujan added a comment - - edited Taneli Korri was correct. Making IWrireReplace public does solve the issue. I've added a patch just in case that's helpful.

          People

          • Assignee:
            mgrigorov Martin Grigorov
            Reporter:
            tkorri Taneli Korri
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development