Wicket
  1. Wicket
  2. WICKET-4918

LazyInitProxyFactory prevents using package private interfaces

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major 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
        Taneli Korri added a comment -

        Quickstart reproducing this behaviour

        Show
        Taneli Korri added a comment - Quickstart reproducing this behaviour
        Hide
        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
        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
        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
        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:
            Martin Grigorov
            Reporter:
            Taneli Korri
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development