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

Class not found when using OSGI class loader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.2
    • 1.4.3, 1.5-M1
    • wicket-guice
    • None

    Description

      I am presently using Guice and OSGi. Our OSGi platform is used as a plugin platform for our web application. We load the OSGi framework and load it into Guice as a service provider. The plugins can be used to return panel or other wicket components that are then used in the pages.

      When one of the plugins components have a Guice injection, there is a class not found problem that is seen when trying to use injected stuff :
      org.apache.wicket.guice.GuiceProxyTargetLocator.locateProxyTarget(GuiceProxyTargetLocator.java:79)

      This class not found is because the Guice injector is trying to access the class directly by making a Class.forName. Since using an OSGi framework, the classloader is not capable of returning the class correctly.

      To solve this issue, the wicket-guice integration should use the wicket Classes.resolveClass static method that is using a class resolver that can be changed and check for class in other class loader.

      Attachments

        1. wicket-guice-patch.txt
          1 kB
          Marc-Andre Houle

        Activity

          People

            jdonnerstag Juegen Donnerstag
            mhoule Marc-Andre Houle
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: